Show TOC

Calling TransactionsLocate this document in the navigation structure

If a program is associated with 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 dynpro to be displayed is then the specified Next Dynpro in the dynpro attributes of the initial dynpro. If the first dynpro calls itself as the next dynpro, 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 format of a batch input table. For more information about batch input tables, see Importing Data with Batch Input .