SAP NetWeaver AS ABAP Release 751, ©Copyright 2017 SAP AG. All rights reserved.
ABAP - Keyword Documentation → ABAP - Reference → Calling and leaving program units → Calling Programs → Calling Transactions →
CALL TRANSACTION
Syntax Forms
Simple transaction call
1. CALL TRANSACTION ta WITH|WITHOUT AUTHORITY-CHECK [AND SKIP FIRST SCREEN].
Transaction call using batch input table
2. CALL TRANSACTION ta WITH|WITHOUT AUTHORITY-CHECK
USING bdc_tab { {[MODE mode] [UPDATE upd]}
|
[OPTIONS FROM opt] }
[MESSAGES INTO itab].
Effect
The statement CALL TRANSACTION calls the transaction whose transaction code is contained in the data object ta. The calling program and its data are preserved. After the transaction call, the program execution of the calling program resumes after the statement CALL TRANSACTION. The data object ta must be character-like, flat and contain the transaction code in uppercase letters. The following can be specified for ta:
When the statement is executed, ta is not evaluated until runtime (in both cases). If the transaction specified in ta cannot be found, a non-handleable exception is raised.
In both variants, an authorization check can be performed on the called transaction.
When the transaction is called, the ABAP program associated with the transaction code is loaded in a new internal session of the current call sequence. The session of the calling program and the current SAP LUW are preserved. The called program runs in its own SAP LUW.
Notes
Security Note
If the name of a program unit is specified dynamically when it is called, and this name is passed to
a program from outside, the result is a serious security risk. Any names passed to a program from outside
must be checked thoroughly before being used in calls. The system class CL_ABAP_DYN_PRG, for example, can be used to do this. See
Dynamic Calls.
Example
Calling transaction DEMO_TRANSACTION in the executable example program DEMO_CALL_TRANSACTION_SPA_GPA.
TRY.
CALL TRANSACTION 'DEMO_TRANSACTION' WITH AUTHORITY-CHECK.
CATCH cx_sy_authorization_error.
...
ENDTRY.
Executable Examples
Handleable Exceptions
CX_SY_AUTHORIZATION_ERROR
Non-Handleable Exceptions