ABAPLEAVE_TO_TRANSACTION - LEAVE TO TRANSACTION

ROGBILLS - Synchronize billing plans   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

LEAVE TO TRANSACTION

Short Reference


Syntax

LEAVE TO { {TRANSACTION ta} | {CURRENT TRANSACTION} }
         [AND SKIP FIRST SCREEN].

Addition:

... AND SKIP FIRST SCREEN

Effect

The statement LEAVE TO TRANSACTION calls thetransactionwhose transaction code is contained in the character-type data object ta or the current transaction. ta must contain the transaction code in upper case.

When CURRENT TRANSACTION is specified, the current transaction is called using the transactioncode that was used to call the transaction using CALL TRANSACTION or LEAVE TO TRANSACTION. This transaction code is contained in the system field sy-tcode except forparameter transactions orvarianttransactions. When using parameter actions or variant transactions, their transaction code is used for the call and sy-tcode contains the name of the implicitly calleddialog transaction.

When using LEAVE TO TRANSACTION, the currentcallsequence is exited completely. Upon completion of the called transaction, the runtime environment returns to the position where the first program in the call sequence was called. The currentSAP LUW is thereby ended.

When calling the transaction, the ABAP program to which the transaction code is linked is loaded into a new internal session. All previous internal sessions are deleted from the stack. At the same time, theABAP memory is deleted, which means that EXPORT FROM MEMORY or IMPORT TO MEMORY do not transfer data when using LEAVE TO TRANSACTION. The steps of the called dialog transaction orOOtransaction are the same as with CALLTRANSACTION. When the called transaction is exited, the runtime environment returns to the position where the first program in the current call sequence was called.

If the transaction specified in ta is not found, or if ta is initial or blank, the stackof the current call sequence is deleted and the runtime environment returns directly to the positionwhere the first program in the current call sequence was called. If ta is not initial, an appropriate message appears in the status bar.

The LEAVE TO TRANSACTION statement always terminates the current call sequence, regardless of whether or not a new transaction can be called.

Notes

  • Contrary to the statement CALLTRANSACTION, the authorization of the current user for executing the called transaction is automatically checked when using the statement LEAVE TO TRANSACTION.
  • You can use CURRENT TRANSACTION in the call to execute a current parameter transaction or varianttransaction with the corresponding parameters or the transaction variant. Alternatively, the methodGET_CURRENT_TRANSACTION of the class CL_DYNPRO can be used to obtain the transaction code of the currenttransaction. This method returns the transaction code during a parameter transaction or variant transaction instead of the transaction code of the implicitly called dialog transaction.
  • If procedures are still registered at LEAVE TO TRANSACTION in the currentSAP LUW, the SAP LUW is ended and the procedures are not called or rolled back. Registeredupdatefunction modules remain in the database but can no longer be executed. In this case, you have toexplicitly perform the statement COMMITWORK or ROLLBACK WORK before calling the program.


Addition

... AND SKIP FIRST SCREEN

Effect

The addition AND SKIP FIRST SCREEN has the same meaning as with CALL TRANSACTION.




rdisp/max_wprun_time - Maximum work process run time   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.


Length: 6111 Date: 20120522 Time: 235606     triton ( 181 ms )