SAP /AIF/TRFC_READ_FUNCTION Function Module for tRFC Read Function









/AIF/TRFC_READ_FUNCTION is a standard /aif/trfc read function SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for tRFC Read Function processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for /aif/trfc read function FM, simply by entering the name /AIF/TRFC_READ_FUNCTION into the relevant SAP transaction such as SE37 or SE38.

Function Group: /AIF/QRFC_READ
Program Name: /AIF/SAPLQRFC_READ
Main Program: /AIF/SAPLQRFC_READ
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function /AIF/TRFC_READ_FUNCTION pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION '/AIF/TRFC_READ_FUNCTION'"tRFC Read Function
EXPORTING
* IV_FUNC_NAME = "Original Function Module Name
* IT_C_FUNC = "Table type for /AIF/T_QRFC_FUNC
* IV_MAX_NUMBER = "Max. Number
* IT_ARFCSSTATE_EXISTING = "Table of ARFCSSTATE Data Records
* IV_ARFCTID = "Unique Transaction ID (LUW -> COMMIT WORK)

IMPORTING
ET_TRFC_STATE_QOUT = "Table of ARFCSSTATE Data Records
ET_TRFC_DATA_QOUT = "Table for RFC Function Data in Old aRFC Format
ET_BALHDR = "Table type for BALHDR
ET_LOGMESSAGES = "Table type for /AIF/QRFC_MESSAGES_ST
ET_ARFCSSTATE_DELETE = "Table of ARFCSSTATE Data Records
EV_NUMBER_OF_LUWS = "Max. Number
EV_MAX_NUMBER_REACHED = "Boolean Variable (X=True, -=False, Space=Unknown)
.



IMPORTING Parameters details for /AIF/TRFC_READ_FUNCTION

IV_FUNC_NAME - Original Function Module Name

Data type: /AIF/ORG_FUNCNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_C_FUNC - Table type for /AIF/T_QRFC_FUNC

Data type: /AIF/QRFC_FUNC_TT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_MAX_NUMBER - Max. Number

Data type: /AIF/MAX_NUMBER
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_ARFCSSTATE_EXISTING - Table of ARFCSSTATE Data Records

Data type: ARFCSSTATE_TAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_ARFCTID - Unique Transaction ID (LUW -> COMMIT WORK)

Data type: ARFCTID
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for /AIF/TRFC_READ_FUNCTION

ET_TRFC_STATE_QOUT - Table of ARFCSSTATE Data Records

Data type: ARFCSSTATE_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

ET_TRFC_DATA_QOUT - Table for RFC Function Data in Old aRFC Format

Data type: ARFCSDATA_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

ET_BALHDR - Table type for BALHDR

Data type: /AIF/BALHDR_TT
Optional: No
Call by Reference: No ( called with pass by value option)

ET_LOGMESSAGES - Table type for /AIF/QRFC_MESSAGES_ST

Data type: /AIF/QRFC_MESSAGES_TT
Optional: No
Call by Reference: No ( called with pass by value option)

ET_ARFCSSTATE_DELETE - Table of ARFCSSTATE Data Records

Data type: ARFCSSTATE_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

EV_NUMBER_OF_LUWS - Max. Number

Data type: /AIF/MAX_NUMBER
Optional: No
Call by Reference: No ( called with pass by value option)

EV_MAX_NUMBER_REACHED - Boolean Variable (X=True, -=False, Space=Unknown)

Data type: BOOLEAN
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for /AIF/TRFC_READ_FUNCTION Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_iv_func_name  TYPE /AIF/ORG_FUNCNAME, "   
lv_et_trfc_state_qout  TYPE ARFCSSTATE_TAB, "   
lv_it_c_func  TYPE /AIF/QRFC_FUNC_TT, "   
lv_et_trfc_data_qout  TYPE ARFCSDATA_TAB, "   
lv_et_balhdr  TYPE /AIF/BALHDR_TT, "   
lv_iv_max_number  TYPE /AIF/MAX_NUMBER, "   
lv_et_logmessages  TYPE /AIF/QRFC_MESSAGES_TT, "   
lv_it_arfcsstate_existing  TYPE ARFCSSTATE_TAB, "   
lv_iv_arfctid  TYPE ARFCTID, "   
lv_et_arfcsstate_delete  TYPE ARFCSSTATE_TAB, "   
lv_ev_number_of_luws  TYPE /AIF/MAX_NUMBER, "   
lv_ev_max_number_reached  TYPE BOOLEAN. "   

  CALL FUNCTION '/AIF/TRFC_READ_FUNCTION'  "tRFC Read Function
    EXPORTING
         IV_FUNC_NAME = lv_iv_func_name
         IT_C_FUNC = lv_it_c_func
         IV_MAX_NUMBER = lv_iv_max_number
         IT_ARFCSSTATE_EXISTING = lv_it_arfcsstate_existing
         IV_ARFCTID = lv_iv_arfctid
    IMPORTING
         ET_TRFC_STATE_QOUT = lv_et_trfc_state_qout
         ET_TRFC_DATA_QOUT = lv_et_trfc_data_qout
         ET_BALHDR = lv_et_balhdr
         ET_LOGMESSAGES = lv_et_logmessages
         ET_ARFCSSTATE_DELETE = lv_et_arfcsstate_delete
         EV_NUMBER_OF_LUWS = lv_ev_number_of_luws
         EV_MAX_NUMBER_REACHED = lv_ev_max_number_reached
. " /AIF/TRFC_READ_FUNCTION




ABAP code using 7.40 inline data declarations to call FM /AIF/TRFC_READ_FUNCTION

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!