Before you can generate the ABAP program, you must define the query to be executed
against the SAP tables. You can use either the Extraction Object Builder or the SQL Query Builder to
generate the query. You can edit, validate, and load the generate programs to the SAP system
directly from the stage editor.
Before you begin
Note: Starting from version 8.0.0.2, you cannot load programs to SAP for the jobs that are opened in
read only mode; for example, when the job is opened in a protected project.
Procedure
- Double-click the ABAP Extract stage.
- Click the , then specify a
name for the ABAP program.
- Select a generation method.
You can select
either the SQL query or the extraction object method as your generation
method. You can also select the Enter program as text option to specify
a custom ABAP program. However, no technical support is provided for
any issues that might be caused due to the custom ABAP programs.
-
Click Build to define the query.
-
Click Options to add custom code to the ABAP program.
You can specify header comments or the code to be executed before the program starts and code
to be executed before the program ends. The end custom code is executed irrespective of the ABAP
program completes successfully or not.
- Select a load method.
You can choose the following options to load your
program.
-
Current user loads the program from this dialog box: Using this option,
you can load the program to the SAP server directly by using the stage editor.
-
DataStage job loads the program: Using this option, you allow the stage to
load the program at run time. Up to Pack version 8.2.0.2, you can use this option only for FTP Data
Transfer Method. In this method, if you select to load the program at run time, you can also
configure to delete the program after running by selecting Delete the program from SAP
after it finishes.
From Pack version 8.2.0.3, you can use this function even for the RFC Data Transfer Method. The
advantage of using this option in RFC method is that ABAP Extract Stage does not load the generated
ABAP Extract SAP Program in the SAP server and is loaded into the SAP Server only at the run time.
Hence, while migrating jobs from the Development or QA SAP Server to Production Server, you need not
move your ABAP Extract programs through the SAP Transport Mechanism.
Note:
- You cannot use Background job option if you choose this load method with RFC Data Transfer.
- As ABAP Program contains specific statements to support dynamic loading of the ABAP Program at
run time, and hence, when you choose to change the Load Option from Current user loads the
program from this dialog box to DataStage job loads the program, you need
to regenerate the program.
- Select a run method.
Select DataStage
job runs the program to automatically run the program.
To manually execute the program, select the SAP administrator
runs the program manually option. If this option is selected,
the stage waits until the ABAP program is executed.
- Select the Load Program to SAP with CTS to
use a CTS request to load the program.
- Click Generate Program to create the ABAP code.
The
stage editor prompts you to load the result to SAP. You can either click
OK
to load the program immediately or click
Cancel, modify, and load the
program later. The generated ABAP code is persisted as a stage property when the stage editor is
closed.
Note: You must perform this step every time the query, program options, or the data transfer
method options are modified.
- (Optional) Select the Suppress ABAP program validation at run time
checkbox to skip the validation steps performed at run time.
It helps in working with
custom programs.