LEAVE TO TRANSACTION

Basic form 2

LEAVE TO { {TRANSACTION tcod} | {CURRENT TRANSACTION} }.

Addition:

... AND SKIP FIRST SCREEN

Effect

Ends current processing and starts the (new) transaction tcod. All previous internal sessions are deleted from the stack and one new internal session is opened for the program of the transaction that was called. When this session has finished, the system returns to the next higher area menu.

If you specify CURRENT TRANSACTION (as of Release 6.20), the current transaction is called with exactly the same transaction code it was called with using CALL TRANSACTION or LEAVE TO TRANSACTION. With the exception of parameter or variant transactions, this is the transaction code that is also in the system field sy-tcode.. In the case of parameter or variant transactions, it is their transaction code, while sy-tcode contains the name of the implicitly-called dialog transaction.

Note

If the constant SPACE or an initial character field is defined as transaction name tcod, the calling program is ended and all previous sessions are deleted from the stack. The system goes directly to the next higher area menu.

If you use LEAVE TO TRANSACTION, authorization to start the called transaction is checked. Refer also to the safety note.

You can use the call with CURRENT TRANSACTION to again execute a current parameter or variant transaction with the appropriate parameters or transaction variants. Alternatively, it is possible to get the transaction code of the current transaction using the static method GET_CURRENT_TRANSACTION belonging to the class CL_DYNPRO. This method returns - during a parameter or variant transaction - the latter's transaction code and not the code of the implicitly-called dialog transaction.

Examples

  1. Starting Transaction SM02:


LEAVE TO TRANSACTION 'SM02'.

  1. Restart the running transaction:


LEAVE TO TRANSACTION SY-TCODE.

Addition

... AND SKIP FIRST SCREEN

Effect

The first screen of the transaction is processed in the background. If possible, fields in this screen are filled from SAP memory. The required values should therefore be set with SET PARAMETER. If an error in processing the initial screen was caused by an incorrect or incomplete parameter value, this is reported and the entry must be corrected or enhanced manually in this screen.

Related

CALL TRANSACTION

Additional help

Calling Transactions