This documentation refers to versions 7.0.3 and earlier of the CAST SAP Extractor. These versions are now superseded, but can still be used with CAST AIP 7.0 to 7.3. For the documentation of the current version the SAP extractor, please see CAST SAP Extractor NG Admin Guide.
The extraction programs provided by CAST can be executed either as online programs or as batch programs. This section describes both modes.
- The extraction programs can be invoked directly by using the ABAP Editor and the associated standard transaction "SE38" or by using the Object Navigator.
- The resulting files can be saved into either a local directory ("Target Directory" option) or on the SAP server ("Target Directory server" option).
- If the "Target Directory server" option is used, then the extractor for use with SAP > 4.6 will save results in zip files in the default SAP directory on the application server. Extractor for use with SAP <= 4.6 will not.
The extraction programs can also be executed in batch mode, regularly and without user action.
In this specific case, you must use the "Target Directory server" option only to save the result files. Please note that it is not possible for the extractors to create subdirectories in the default SAP directory (DIR_HOME). The values assigned to environment fields can be found by calling the transaction code AL11. The extractor for use with SAP > 4.6 will save results in zip files in the default SAP directory on the application server. In this case, directory tree corresponding to packages will be saved in the zip file. The extractor for use with SAP <= 4.6 will not save results in zip files and directory tree corresponding to packages will not be created. This does not impact the source code analysis but this can create differences with previous online extractions (generated objects will be then considered as new objects).
You must check with the administrator of the server hosting SAP whether your account has the required rights to write files in the default SAP directory.
For instance, if the SAP server is running in a Unix environment, then the destination directory permissions should be set to 775 (owner=rwx, group=rwx, other=rx) with the "chmod" command.
If the destination directory does not have write permissions, then the extractors will not be able to save source code files.
To execute in batch mode, it is necessary to:
- Create a variant for the CAST extractors
- Create a job that could be executed immediately or that could be scheduled
In the Object Navigator, select the extraction program and right-click it. In the popup, select Execute and then Background:
The following screen is then displayed:
You can create a variant by setting its name and by using the Variants button. The following screen is displayed:
Set the program to associate to the variant and click Create. The following screen is displayed:
Set the fields you want to use and click Attributes. The following screen is displayed:
Set a description and the required fields. Then, click the Copy Screen Assignment button and go back to the previous screen (green left arrow). A message box will be displayed allowing you to save the variant attributes:
Now, go back to the screen "Execute Report in Background". You can then choose to execute the variant immediately or to schedule it.
If you want to execute the extraction process at a specific time, then you must click the Schedule button. The following screen is displayed:
Set a name for the job and a start date and time. If you want to execute the extraction process once only, then click the Schedule button once. Otherwise, click Schedule periodically and select the period interval.
If you want to check if the extractors are correctly scheduled, then call the transaction "SM37". The following screen is displayed: