SAP Tables

RFC_CALL_TRANSACTION_USING SAP Function module - Verification Program for Execution of RFCs via CALL TRANSACTION USING




RFC_CALL_TRANSACTION_USINGis a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name RFC_CALL_TRANSACTION_USING into the relevant SAP transaction such as SE37 or SE80.

Contribute (Add Comments)
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RFC_CALL_TRANSACTION_USING or its description.


Pattern for FM RFC_CALL_TRANSACTION_USING - RFC CALL TRANSACTION USING
Associated Function Group: MRFC
Released Date: Not Released
CALL FUNCTION 'RFC_CALL_TRANSACTION_USING' "Verification Program for Execution of RFCs via CALL TRANSACTION USING
* EXPORTING
*   tcode = 'SE38'              " sy-tcode      Transaction
*   mode = 'N'                  " sy-batch      'N' - no display, 'E' - display if error, 'A' - Al
  IMPORTING
    subrc =                     " sy-subrc      SY-SUBRC of CALL TRANSACTION USING
  TABLES
    bt_data =                   " bdcdata       BDC table for batch input
    l_errors =                  " bdcmsgcoll    Error list
    .  "  RFC_CALL_TRANSACTION_USING

ABAP code example for Function Module RFC_CALL_TRANSACTION_USING

The ABAP code below is a full code listing to execute function module RFC_CALL_TRANSACTION_USING including all data declarations. The code uses the latest in-line data declaration syntax but I have included an abap code snipet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
DATA:
ld_subrc   TYPE SY-SUBRC,
it_bt_data   TYPE STANDARD TABLE OF BDCDATA,"tables param
wa_bt_data LIKE LINE OF it_bt_data  ,
it_l_errors   TYPE STANDARD TABLE OF BDCMSGCOLL,"tables param
wa_l_errors LIKE LINE OF it_l_errors  .

DATA(ld_tcode) = 'some text here'.
DATA(ld_mode) = 'some text here'.

"populate fields of struture and append to itab
append wa_bt_data to it_bt_data.

"populate fields of struture and append to itab
append wa_l_errors to it_l_errors.. CALL FUNCTION 'RFC_CALL_TRANSACTION_USING' * EXPORTING * tcode = ld_tcode * mode = ld_mode IMPORTING subrc = ld_subrc TABLES bt_data = it_bt_data l_errors = it_l_errors . " RFC_CALL_TRANSACTION_USING
IF SY-SUBRC EQ 0.   "All OK ENDIF.

ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
ld_subrc TYPE SY-SUBRC ,
ld_tcode TYPE SY-TCODE ,
it_bt_data TYPE STANDARD TABLE OF BDCDATA ,
wa_bt_data LIKE LINE OF it_bt_data,
ld_mode TYPE SY-BATCH ,
it_l_errors TYPE STANDARD TABLE OF BDCMSGCOLL ,
wa_l_errors LIKE LINE OF it_l_errors.

ld_subrc = 'some text here'.
ld_tcode = 'some text here'.

"populate fields of struture and append to itab
append wa_bt_data to it_bt_data.
ld_mode = 'some text here'.

"populate fields of struture and append to itab
append wa_l_errors to it_l_errors..