Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Calling and leaving program units →  Calling Programs →  Calling Transactions →  CALL TRANSACTION 

CALL TRANSACTION - USING

Quick Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


CALL TRANSACTION ta WITH|WITHOUT AUTHORITY-CHECK 
                    USING bdc_tab { {[MODE mode] [UPDATE upd]}
                                  |  [OPTIONS FROM opt] }
                                     [MESSAGES INTO itab].

Extras

1. ... MODE mode

2. ... UPDATE upd
3. ... OPTIONS FROM opt
4. ... MESSAGES INTO itab

Effect

In the variant with the addition USING, the transaction is executed using a batch input table. The transaction is called as described under CALL TRANSACTION. The additions WITH|WITHOUT AUTHORITY-CHECK are used to control the authorization check.

bdc_tab expects an internal table with the row type BDCDATA from ABAP Dictionary. The additions control how it is processed.

When a transaction with the addition USING is called, the system field sy-binpt is set to the value "X" in the called program. No other transaction can be called using this addition while this transaction is running.

In a program, a batch input table bdc_tab is the internal representation of a subset of a batch input session and must be filled accordingly. The structure BDCDATA has the components shown in the table below.

Component Meaning
PROGRAM Name of the program of the called transaction
DYNPRO Number of the dynpro processed
DYNBEGIN Flags the start of a new dynpro (possible values are "X" and " ")
FNAM Name of a dynpro field to be filled or batch input control statement, for example to position the cursor
FVAL Value to be passed to the dynpro field or to the control statement

Using the content of the internal table bdc_tab, any number of screens of the called transaction can be filled with input and user actions.

System Fields

sy-subrc Meaning
0 (means: The called transaction was processed successfully.
< 1000 Error in the called transaction. If a message was sent within the transaction, it can be received using the addition MESSAGES.
1001 Processing error.


Notes

  • Calling a transaction using a batch input table is not the same as executing batch input sessions in batch input. There is no exact dividing line between the two, however, since batch input-based frameworks such as CATT and batch input management sometimes also execute the statement CALL TRANSACTION USING internally. In this way, they can use certain options not available in genuine batch input.
  • The control options for a batch input table cover the control options for batch input sessions in real batch input, plus some extra options.

Example

Calling transaction SE24 in the executable example program DEMO_CALL_TRANSACTION_BDC.

DATA: bdcdata_tab TYPE TABLE OF bdcdata, 
      opt         TYPE ctu_params. 
... 
TRY. 
    CALL TRANSACTION 'SE24' WITH AUTHORITY-CHECK 
                           USING bdcdata_tab OPTIONS FROM opt. 
  CATCH cx_sy_authorization_error. 
    ... 
ENDTRY. 

Addition 1

... MODE mode

Effect

The addition MODE determines the processing mode for processing. mode can be specified as a character-like data object whose content and purpose are shown in the following table. If one of the additions MODE or OPTIONS FROM is not used, the effect is the same as if mode had the content "A".

mode Effect
"A" Processed with displayed screens
"E" Screens displayed only if an error occurs
"N" Processed without displayed screens. If a breakpoint is reached in one of the calledtransactions, processingis terminated with sy-subrc equal to 1001. The field sy-msgtycontains "S", sy-msgid contains "00",sy-msgno contains "344", sy-msgv1 contains "SAPMSSY3", and sy-msgv2 contains "0131".
"P" Processed without displayed screens. If a breakpoint is reached in one of the called transactions, the system branches to the ABAP Debugger.
Others As for "A".

Addition 2

... UPDATE upd

Effect

The addition UPDATE determines the update mode for processing. upd can be specified as a character-like data object whose content and purpose are shown in the following table. If one of the additions UPDATE or OPTIONS FROM is not used, the effect is the same as if upd had the content "A".

upd Effect
"A" Asynchronous update.Updates of called programs areexecuted in the same way as if the addition AND WAIT were not specified in the statement COMMIT WORK.
"S" Synchronous update. Updates of the called programs are executed in thesame way as if the addition AND WAIT were specified in the statement COMMIT WORK.
"L" Local updates. Updates of the called program are executed in the sameway as if the statement SET UPDATE TASK LOCAL were executed in the program.
Others As for "A".


Note

This option is not available for execution of batch input sessions in batch input. Updates are always synchronous.

Addition 3

... OPTIONS FROM opt

Effect

The addition OPTIONS covers the functions of the additions MODE and UPDATE and provides further options for controlling processing of the batch input table. The control parameters are specified in an opt structure of the type CTU_PARAMS from ABAP Dictionary. The CTU_PARAMS structure has the components displayed in the following table:

Component Meaning
DISMODE Processing mode. Values as for the addition MODE.
UPMODE Update mode for processing. Values as for the addition UPDATE.
CATTMODE CATT mode for processing. Whilebatch input is used mostly for data transfer, CATT processes are more complextransactions, since theyare reusable tests. Values: " " (no CATT mode), "N" (CATT without single screen control), "A" (CATT with single screen control).
DEFSIZE Specifies whether the screensof the called transaction are displayed in the standard screen size. Values: "X" (standard size), " " (current size).
RACOMMIT Specifies whether the statement COMMIT WORK terminates processing or not. Values: " "(COMMIT WORK terminates processing), "X" (COMMIT WORK does not terminate processing).
NOBINPT Specifies the system field sy-binpt. Values: " "(sy-binpt contains "X" in the called transaction), "X"(sy-binpt contains " " in the called transaction).
NOBIEND Specifies the system field sy-binpt. Values: " "(sy-binpt contains "X" after the end of the data from the batch input table in the called transaction) "X"(sy-binpt contains " " after the end of the data in the called transaction).

If the addition OPTIONS FROM is not used, the values set by the additions MODE or UPDATE or the default values specified there ("A") apply to DISMODE and UPMODE. The other components are set to the value " ".

Addition 4

... MESSAGES INTO itab

Effect

Using this addition, all the messages sent during batch input processing are saved to an internal table itab of the row type BDCMSGCOLL in ABAP Dictionary.

Executable Example

Transaction Call, BDC Table

Continue

CALL TRANSACTION - Batch Input Table