SAP EM_FACILITY_GET_LIST Function Module for NOTRANSL: xEM: Liste der Anlagen
EM_FACILITY_GET_LIST is a standard em facility get list SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: xEM: Liste der Anlagen 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 em facility get list FM, simply by entering the name EM_FACILITY_GET_LIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: EM_INT
Program Name: SAPLEM_INT
Main Program: SAPLEM_INT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EM_FACILITY_GET_LIST 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 'EM_FACILITY_GET_LIST'"NOTRANSL: xEM: Liste der Anlagen.
EXPORTING
* I_VALDATE = SY-DATUM "DE-EN-LANG-SWITCH-NO-TRANSLATION
I_XEM_INT_TAB = "Selection by Integration Data or Facility ID
IMPORTING
E_FLG_ERROR = "Boolean Variable (X=True, -=False, Space=Unknown)
E_FLG_WARNING = "Boolean Variable (X=True, -=False, Space=Unknown)
E_SY_ERR_TXT = "
CHANGING
E_HEADER_TAB = "Facility Header Data - Facility Search
* E_ERROR_TAB = "Error Messages
EXCEPTIONS
INTERNAL_ERROR = 1
IMPORTING Parameters details for EM_FACILITY_GET_LIST
I_VALDATE - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: Yes
I_XEM_INT_TAB - Selection by Integration Data or Facility ID
Data type: EMTY_XEM_INTOptional: No
Call by Reference: Yes
EXPORTING Parameters details for EM_FACILITY_GET_LIST
E_FLG_ERROR - Boolean Variable (X=True, -=False, Space=Unknown)
Data type: BOOLEANOptional: No
Call by Reference: Yes
E_FLG_WARNING - Boolean Variable (X=True, -=False, Space=Unknown)
Data type: BOOLEANOptional: No
Call by Reference: Yes
E_SY_ERR_TXT -
Data type: STRINGOptional: No
Call by Reference: Yes
CHANGING Parameters details for EM_FACILITY_GET_LIST
E_HEADER_TAB - Facility Header Data - Facility Search
Data type: EMTY_FACILITY_HEADER_LSTOptional: No
Call by Reference: Yes
E_ERROR_TAB - Error Messages
Data type: BAPIRET2_TABOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
INTERNAL_ERROR - Internal Error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EM_FACILITY_GET_LIST 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_i_valdate | TYPE DATUM, " SY-DATUM | |||
| lv_e_flg_error | TYPE BOOLEAN, " | |||
| lv_e_header_tab | TYPE EMTY_FACILITY_HEADER_LST, " | |||
| lv_internal_error | TYPE EMTY_FACILITY_HEADER_LST, " | |||
| lv_e_error_tab | TYPE BAPIRET2_TAB, " | |||
| lv_e_flg_warning | TYPE BOOLEAN, " | |||
| lv_i_xem_int_tab | TYPE EMTY_XEM_INT, " | |||
| lv_e_sy_err_txt | TYPE STRING. " |
|   CALL FUNCTION 'EM_FACILITY_GET_LIST' "NOTRANSL: xEM: Liste der Anlagen |
| EXPORTING | ||
| I_VALDATE | = lv_i_valdate | |
| I_XEM_INT_TAB | = lv_i_xem_int_tab | |
| IMPORTING | ||
| E_FLG_ERROR | = lv_e_flg_error | |
| E_FLG_WARNING | = lv_e_flg_warning | |
| E_SY_ERR_TXT | = lv_e_sy_err_txt | |
| CHANGING | ||
| E_HEADER_TAB | = lv_e_header_tab | |
| E_ERROR_TAB | = lv_e_error_tab | |
| EXCEPTIONS | ||
| INTERNAL_ERROR = 1 | ||
| . " EM_FACILITY_GET_LIST | ||
ABAP code using 7.40 inline data declarations to call FM EM_FACILITY_GET_LIST
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.| DATA(ld_i_valdate) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects