SAP RS_DD_FOREIGNTABLES_GET Function Module for Get Environment of One or More Tables
RS_DD_FOREIGNTABLES_GET is a standard rs dd foreigntables get 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 Environment of One or More Tables 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 rs dd foreigntables get FM, simply by entering the name RS_DD_FOREIGNTABLES_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: SDG1
Program Name: SAPLSDG1
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RS_DD_FOREIGNTABLES_GET 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 'RS_DD_FOREIGNTABLES_GET'"Get Environment of One or More Tables.
EXPORTING
* DIRECTION = "
* ENVELOPE = "
* FIELD_DOCU = 'X' "
* LIST_EXCEED = '15' "
* TYPE = "
TABLES
TABLENAMES = "
CHECKTABLES = "Output Table
* TABLENAMES_ALREADY_GOT = "
EXCEPTIONS
PARAMETERS_FAULT = 1 NO_SELECTION = 2
IMPORTING Parameters details for RS_DD_FOREIGNTABLES_GET
DIRECTION -
Data type: SY-INPUTOptional: Yes
Call by Reference: No ( called with pass by value option)
ENVELOPE -
Data type: SY-INPUTOptional: Yes
Call by Reference: No ( called with pass by value option)
FIELD_DOCU -
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LIST_EXCEED -
Data type: SY-INDEXDefault: '15'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TYPE -
Data type: EUOBJ-IDOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RS_DD_FOREIGNTABLES_GET
TABLENAMES -
Data type: SDG1_TABLEOptional: No
Call by Reference: No ( called with pass by value option)
CHECKTABLES - Output Table
Data type: SDG1_CHECKTABOptional: No
Call by Reference: No ( called with pass by value option)
TABLENAMES_ALREADY_GOT -
Data type: SDG1_TABLEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PARAMETERS_FAULT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SELECTION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RS_DD_FOREIGNTABLES_GET 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_direction | TYPE SY-INPUT, " | |||
| lt_tablenames | TYPE STANDARD TABLE OF SDG1_TABLE, " | |||
| lv_parameters_fault | TYPE SDG1_TABLE, " | |||
| lv_envelope | TYPE SY-INPUT, " | |||
| lt_checktables | TYPE STANDARD TABLE OF SDG1_CHECKTAB, " | |||
| lv_no_selection | TYPE SDG1_CHECKTAB, " | |||
| lv_field_docu | TYPE SY-INPUT, " 'X' | |||
| lt_tablenames_already_got | TYPE STANDARD TABLE OF SDG1_TABLE, " | |||
| lv_list_exceed | TYPE SY-INDEX, " '15' | |||
| lv_type | TYPE EUOBJ-ID. " |
|   CALL FUNCTION 'RS_DD_FOREIGNTABLES_GET' "Get Environment of One or More Tables |
| EXPORTING | ||
| DIRECTION | = lv_direction | |
| ENVELOPE | = lv_envelope | |
| FIELD_DOCU | = lv_field_docu | |
| LIST_EXCEED | = lv_list_exceed | |
| TYPE | = lv_type | |
| TABLES | ||
| TABLENAMES | = lt_tablenames | |
| CHECKTABLES | = lt_checktables | |
| TABLENAMES_ALREADY_GOT | = lt_tablenames_already_got | |
| EXCEPTIONS | ||
| PARAMETERS_FAULT = 1 | ||
| NO_SELECTION = 2 | ||
| . " RS_DD_FOREIGNTABLES_GET | ||
ABAP code using 7.40 inline data declarations to call FM RS_DD_FOREIGNTABLES_GET
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 INPUT FROM SY INTO @DATA(ld_direction). | ||||
| "SELECT single INPUT FROM SY INTO @DATA(ld_envelope). | ||||
| "SELECT single INPUT FROM SY INTO @DATA(ld_field_docu). | ||||
| DATA(ld_field_docu) | = 'X'. | |||
| "SELECT single INDEX FROM SY INTO @DATA(ld_list_exceed). | ||||
| DATA(ld_list_exceed) | = '15'. | |||
| "SELECT single ID FROM EUOBJ INTO @DATA(ld_type). | ||||
Search for further information about these or an SAP related objects