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

Function RFC_GET_TABLE_ENTRIES 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 'RFC_GET_TABLE_ENTRIES'"Read table entries.
EXPORTING
* BYPASS_BUFFER = ' ' "
* FROM_KEY = ' ' "
* GEN_KEY = ' ' "Generic key
* MAX_ENTRIES = 0 "
TABLE_NAME = "Table Name
* TO_KEY = ' ' "
IMPORTING
NUMBER_OF_ENTRIES = "
TABLES
ENTRIES = "Table Contents
EXCEPTIONS
INTERNAL_ERROR = 1 TABLE_EMPTY = 2 TABLE_NOT_FOUND = 3
IMPORTING Parameters details for RFC_GET_TABLE_ENTRIES
BYPASS_BUFFER -
Data type: SY-FTYPEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FROM_KEY -
Data type: SY-ENTRYDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
GEN_KEY - Generic key
Data type: SY-ENTRYDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MAX_ENTRIES -
Data type: SY-TABIXOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLE_NAME - Table Name
Data type: X030L-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
TO_KEY -
Data type: SY-ENTRYDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RFC_GET_TABLE_ENTRIES
NUMBER_OF_ENTRIES -
Data type: SY-INDEXOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RFC_GET_TABLE_ENTRIES
ENTRIES - Table Contents
Data type: TAB512Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INTERNAL_ERROR - Error in Database Interface
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLE_EMPTY -
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)
Copy and paste ABAP code example for RFC_GET_TABLE_ENTRIES 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: | ||||
| lt_entries | TYPE STANDARD TABLE OF TAB512, " | |||
| lv_bypass_buffer | TYPE SY-FTYPE, " SPACE | |||
| lv_internal_error | TYPE SY, " | |||
| lv_number_of_entries | TYPE SY-INDEX, " | |||
| lv_from_key | TYPE SY-ENTRY, " SPACE | |||
| lv_table_empty | TYPE SY, " | |||
| lv_gen_key | TYPE SY-ENTRY, " SPACE | |||
| lv_table_not_found | TYPE SY, " | |||
| lv_max_entries | TYPE SY-TABIX, " 0 | |||
| lv_table_name | TYPE X030L-TABNAME, " | |||
| lv_to_key | TYPE SY-ENTRY. " SPACE |
|   CALL FUNCTION 'RFC_GET_TABLE_ENTRIES' "Read table entries |
| EXPORTING | ||
| BYPASS_BUFFER | = lv_bypass_buffer | |
| FROM_KEY | = lv_from_key | |
| GEN_KEY | = lv_gen_key | |
| MAX_ENTRIES | = lv_max_entries | |
| TABLE_NAME | = lv_table_name | |
| TO_KEY | = lv_to_key | |
| IMPORTING | ||
| NUMBER_OF_ENTRIES | = lv_number_of_entries | |
| TABLES | ||
| ENTRIES | = lt_entries | |
| EXCEPTIONS | ||
| INTERNAL_ERROR = 1 | ||
| TABLE_EMPTY = 2 | ||
| TABLE_NOT_FOUND = 3 | ||
| . " RFC_GET_TABLE_ENTRIES | ||
ABAP code using 7.40 inline data declarations to call FM RFC_GET_TABLE_ENTRIES
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 FTYPE FROM SY INTO @DATA(ld_bypass_buffer). | ||||
| DATA(ld_bypass_buffer) | = ' '. | |||
| "SELECT single INDEX FROM SY INTO @DATA(ld_number_of_entries). | ||||
| "SELECT single ENTRY FROM SY INTO @DATA(ld_from_key). | ||||
| DATA(ld_from_key) | = ' '. | |||
| "SELECT single ENTRY FROM SY INTO @DATA(ld_gen_key). | ||||
| DATA(ld_gen_key) | = ' '. | |||
| "SELECT single TABIX FROM SY INTO @DATA(ld_max_entries). | ||||
| "SELECT single TABNAME FROM X030L INTO @DATA(ld_table_name). | ||||
| "SELECT single ENTRY FROM SY INTO @DATA(ld_to_key). | ||||
| DATA(ld_to_key) | = ' '. | |||
Search for further information about these or an SAP related objects