CALL TRANSACTION - Call a transaction
Basic form
CALL TRANSACTION tcod.
Additions
1. ... AND SKIP FIRST SCREEN
2. ... USING itab
2a. ... MODE mode
2b. ... UPDATE upd
2c. ... MESSAGES INTO messtab
Effect
Calls the SAP Transaction tcod ; tcod can
be a literal or a variable. To return from the called transaction, you
use the key word LEAVE PROGRAM .
Example
-
CALL TRANSACTION 'SP01'.
Addition 1
... AND SKIP FIRST SCREEN
Effect
Skips the first screen in the transaction (provided all
the required fields have been assigned values by the SPA/GPA
process).
Addition 2
... USING itab
Effect
Calls the Transaction tcod and passes the
internal table itab , which contains one or several screens in
batch input format.
If necessary, one of the messages output by the Transaction is returned
to the fields SY-MSGID , SY-MSGTY SY-MSGNO ,
SY-MSGV1 , ..., SY-MSGV4 .
The return code value is set as follows:
SY-SUBRC = 0
Processing was successful.
SY-SUBRC <> 0
Transaction ended with an error.
Note
A called Transaction ends successfully for the following
reasons:
COMMIT WORK
Next screen = 0
LEAVE TO TRANSACTION ' '
Addition 2a
... MODE mode
Effect
The specified processing mode can accept the
following values:
'A' Display screen
'E' Display screen only if an error occurs
'N' No display
If the addition MODE is not specified, the processing mode is
set to 'A' .
Addition 2b
... UPDATE upd
Effect
The specified update mode upd defines the update
type. This can have one of the following values:
'A' Asynchronous update
'S' Synchronous update
If the addition UPDATE is not specified, the processing mode is
set to 'A' .
Addition 2c
... MESSAGES INTO messtab
Effect
The specified internal table contains all system
messages that occur during CALL TRANSACTION USING ... . The
internal table messtab must have the structure
BDCMSGCOLL .
Example
-
DATA BEGIN OF BDCDATA OCCURS 100.
INCLUDE STRUCTURE BDCDATA.
DATA END OF BDCDATA.
DATA BEGIN OF MESSTAB OCCURS 10.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA END OF MESSTAB.
DATA REPORT(8).
BDCDATA-PROGRAM = 'SAPMS38M'.
BDCDATA-DYNPRO = '0100'.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
CLEAR BDCDATA.
BDCDATA-FNAM = 'RS38M-PROGRAMM'.
BDCDATA-FVAL = REPORT.
APPEND BDCDATA.
...
CALL TRANSACTION 'SE38' USING BDCDATA MODE 'N'
MESSAGES INTO MESSTAB.
Notes
Runtime errors
-
CALL_TRANSACTION_NOT_FOUND : Transaction is unknown.
-
CALL_TRANSACTION_IS_MENU : Transaction is a menu.
-
CALL_TRANSACTION_USING_NESTED : Recursive CALL TRANSACTION
USING
Related
SUBMIT
CALL DIALOG
Index
© SAP AG 1996