Entering content frameCalling Transactions Locate the document in its SAP Library structure

If a program has a transaction code, there are two ways of starting it from another program.

If you do not want to return to the calling program at the end of the new transaction, use the statement:

LEAVE TO TRANSACTION <tcod> [AND SKIP FIRST SCREEN].

This statement ends the calling program and starts transaction <tcod>. This deletes the call stack (internal sessions) of all previous programs. At the end of the transaction, the system returns to the area menu from which the original program in the call stack was started.

If, on the other hand, you do not want to return to the calling program at the end of the new transaction, use the statement:

CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN] [USING <itab>].

This statement saves the data of the calling program, and starts transaction <tcod>. At the end of the transaction, the system returns to the statement following the call in the calling report. If the LEAVE statement occurs within the called transaction, the transaction ends and control returns to the program in which the call occurred.

You can use a variable to specify the transaction <tcod>. This allows you to call transactions statically as well as dynamically.

The addition AND SKIP FIRST SCREEN allows you to prevent the initial screen of the new transaction from being displayed. The first screen to be displayed is then the specified Next screen in the screen attributes of the initial screen. If the first screen calls itself as the next screen, you cannot skip it.

Furthermore, the AND SKIP FIRST SCREEN option works only if all mandatory fields on the initial screen of the new transaction are filled completely and correctly with input values from SPA/GPA parameters.

The USING ITAB addition in the CALL TRANSACTION statement allows you to pass an internal table <itab> to the new transaction. <itab> has the form of a batch input table. For further information about batch input tables, refer to Structure link Importing Data With Batch Input.

 

 

 

Leaving content frame