SAP GET_TABLE_KEYLIST_RFC Function Module for Get table from another system (using RFC)
GET_TABLE_KEYLIST_RFC is a standard get table keylist rfc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get table from another system (using RFC) 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 get table keylist rfc FM, simply by entering the name GET_TABLE_KEYLIST_RFC into the relevant SAP transaction such as SE37 or SE38.
Function Group: SRTT
Program Name: SAPLSRTT
Main Program: SAPLSRTT
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function GET_TABLE_KEYLIST_RFC 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 'GET_TABLE_KEYLIST_RFC'"Get table from another system (using RFC).
EXPORTING
TABNAME = "Name of (Basis) table
GET_SYSTAB = "
RFC_DEST = "
* MTYPE = "
* MTABNAME = "
IMPORTING
NR_OF_ROWS = "No. of inserts
RFC_MSG_TEXT = "Char 80
ET_KEYCONVERT_ERRORS = "Standard Table of INT4
ET_CONVERT_ERRORS = "Standard Table of INT4
TABLES
* NAME_TAB = "Table nametab
INTTAB = "
TABKEY = "Change & Transport System: Key Entries of Requests/Tasks
EXCEPTIONS
CLIENT_NOT_FOUND = 1 RFC_ERROR = 10 LENGTH_ERROR = 11 STRING_ERROR = 12 PROTECTED = 2 READ_ERROR = 3 TABLE_NOT_FOUND = 4 TOO_SMALL = 5 CONVERT_ERROR = 6 WRONG_TYPE = 7 FIELDTAB_ERROR = 8 NO_RIGHTS = 9
IMPORTING Parameters details for GET_TABLE_KEYLIST_RFC
TABNAME - Name of (Basis) table
Data type: DD02L-TABNAMEOptional: No
Call by Reference: Yes
GET_SYSTAB -
Data type: CCPROGPAR-CHK_SYSTABOptional: No
Call by Reference: Yes
RFC_DEST -
Data type: RFCDES-RFCDESTOptional: No
Call by Reference: Yes
MTYPE -
Data type: E071K-MASTERTYPEOptional: Yes
Call by Reference: Yes
MTABNAME -
Data type: E071K-MASTERNAMEOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for GET_TABLE_KEYLIST_RFC
NR_OF_ROWS - No. of inserts
Data type: CCCFLOW-NBRINSOptional: No
Call by Reference: Yes
RFC_MSG_TEXT - Char 80
Data type: CHAR80Optional: No
Call by Reference: Yes
ET_KEYCONVERT_ERRORS - Standard Table of INT4
Data type: INT4_TABLEOptional: No
Call by Reference: Yes
ET_CONVERT_ERRORS - Standard Table of INT4
Data type: INT4_TABLEOptional: No
Call by Reference: Yes
TABLES Parameters details for GET_TABLE_KEYLIST_RFC
NAME_TAB - Table nametab
Data type: NTAB_CMPOptional: Yes
Call by Reference: No ( called with pass by value option)
INTTAB -
Data type:Optional: No
Call by Reference: Yes
TABKEY - Change & Transport System: Key Entries of Requests/Tasks
Data type: E071KOptional: No
Call by Reference: Yes
EXCEPTIONS details
CLIENT_NOT_FOUND - Client does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RFC_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LENGTH_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
STRING_ERROR -
Data type:Optional: No
Call by Reference: Yes
PROTECTED - Table cannot be processed (INTTAB, systemtab)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
READ_ERROR - Table cannot be read
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLE_NOT_FOUND - Table not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TOO_SMALL - Entries too long (larger than maximum box)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CONVERT_ERROR - Error determining character set
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_TYPE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FIELDTAB_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_RIGHTS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for GET_TABLE_KEYLIST_RFC 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_tabname | TYPE DD02L-TABNAME, " | |||
| lt_name_tab | TYPE STANDARD TABLE OF NTAB_CMP, " | |||
| lv_nr_of_rows | TYPE CCCFLOW-NBRINS, " | |||
| lv_client_not_found | TYPE CCCFLOW, " | |||
| lv_rfc_error | TYPE CCCFLOW, " | |||
| lv_length_error | TYPE CCCFLOW, " | |||
| lv_string_error | TYPE CCCFLOW, " | |||
| lt_inttab | TYPE STANDARD TABLE OF CCCFLOW, " | |||
| lv_protected | TYPE CCCFLOW, " | |||
| lv_get_systab | TYPE CCPROGPAR-CHK_SYSTAB, " | |||
| lv_rfc_msg_text | TYPE CHAR80, " | |||
| lt_tabkey | TYPE STANDARD TABLE OF E071K, " | |||
| lv_rfc_dest | TYPE RFCDES-RFCDEST, " | |||
| lv_read_error | TYPE RFCDES, " | |||
| lv_et_keyconvert_errors | TYPE INT4_TABLE, " | |||
| lv_mtype | TYPE E071K-MASTERTYPE, " | |||
| lv_table_not_found | TYPE E071K, " | |||
| lv_et_convert_errors | TYPE INT4_TABLE, " | |||
| lv_mtabname | TYPE E071K-MASTERNAME, " | |||
| lv_too_small | TYPE E071K, " | |||
| lv_convert_error | TYPE E071K, " | |||
| lv_wrong_type | TYPE E071K, " | |||
| lv_fieldtab_error | TYPE E071K, " | |||
| lv_no_rights | TYPE E071K. " |
|   CALL FUNCTION 'GET_TABLE_KEYLIST_RFC' "Get table from another system (using RFC) |
| EXPORTING | ||
| TABNAME | = lv_tabname | |
| GET_SYSTAB | = lv_get_systab | |
| RFC_DEST | = lv_rfc_dest | |
| MTYPE | = lv_mtype | |
| MTABNAME | = lv_mtabname | |
| IMPORTING | ||
| NR_OF_ROWS | = lv_nr_of_rows | |
| RFC_MSG_TEXT | = lv_rfc_msg_text | |
| ET_KEYCONVERT_ERRORS | = lv_et_keyconvert_errors | |
| ET_CONVERT_ERRORS | = lv_et_convert_errors | |
| TABLES | ||
| NAME_TAB | = lt_name_tab | |
| INTTAB | = lt_inttab | |
| TABKEY | = lt_tabkey | |
| EXCEPTIONS | ||
| CLIENT_NOT_FOUND = 1 | ||
| RFC_ERROR = 10 | ||
| LENGTH_ERROR = 11 | ||
| STRING_ERROR = 12 | ||
| PROTECTED = 2 | ||
| READ_ERROR = 3 | ||
| TABLE_NOT_FOUND = 4 | ||
| TOO_SMALL = 5 | ||
| CONVERT_ERROR = 6 | ||
| WRONG_TYPE = 7 | ||
| FIELDTAB_ERROR = 8 | ||
| NO_RIGHTS = 9 | ||
| . " GET_TABLE_KEYLIST_RFC | ||
ABAP code using 7.40 inline data declarations to call FM GET_TABLE_KEYLIST_RFC
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.| "SELECT single TABNAME FROM DD02L INTO @DATA(ld_tabname). | ||||
| "SELECT single NBRINS FROM CCCFLOW INTO @DATA(ld_nr_of_rows). | ||||
| "SELECT single CHK_SYSTAB FROM CCPROGPAR INTO @DATA(ld_get_systab). | ||||
| "SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_rfc_dest). | ||||
| "SELECT single MASTERTYPE FROM E071K INTO @DATA(ld_mtype). | ||||
| "SELECT single MASTERNAME FROM E071K INTO @DATA(ld_mtabname). | ||||
Search for further information about these or an SAP related objects