SAP EPS_GET_DIRECTORY_LISTING Function Module for
EPS_GET_DIRECTORY_LISTING is a standard eps get directory listing SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 eps get directory listing FM, simply by entering the name EPS_GET_DIRECTORY_LISTING into the relevant SAP transaction such as SE37 or SE38.
Function Group: EPSF
Program Name: SAPLEPSF
Main Program: SAPLEPSF
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function EPS_GET_DIRECTORY_LISTING 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 'EPS_GET_DIRECTORY_LISTING'".
EXPORTING
DIR_NAME = "
* FILE_MASK = ' ' "
IMPORTING
DIR_NAME = "
FILE_COUNTER = "
ERROR_COUNTER = "
TABLES
DIR_LIST = "
EXCEPTIONS
INVALID_EPS_SUBDIR = 1 SAPGPARAM_FAILED = 2 BUILD_DIRECTORY_FAILED = 3 NO_AUTHORIZATION = 4 READ_DIRECTORY_FAILED = 5 TOO_MANY_READ_ERRORS = 6 EMPTY_DIRECTORY_LIST = 7
IMPORTING Parameters details for EPS_GET_DIRECTORY_LISTING
DIR_NAME -
Data type: EPSF-EPSDIRNAMOptional: No
Call by Reference: No ( called with pass by value option)
FILE_MASK -
Data type: EPSF-EPSFILNAMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EPS_GET_DIRECTORY_LISTING
DIR_NAME -
Data type: EPSF-EPSDIRNAMOptional: No
Call by Reference: No ( called with pass by value option)
FILE_COUNTER -
Data type: EPSF-EPSFILSIZOptional: No
Call by Reference: No ( called with pass by value option)
ERROR_COUNTER -
Data type: EPSF-EPSFILSIZOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for EPS_GET_DIRECTORY_LISTING
DIR_LIST -
Data type: EPSFILIOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_EPS_SUBDIR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SAPGPARAM_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BUILD_DIRECTORY_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORIZATION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
READ_DIRECTORY_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TOO_MANY_READ_ERRORS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EMPTY_DIRECTORY_LIST -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EPS_GET_DIRECTORY_LISTING 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_dir_list | TYPE STANDARD TABLE OF EPSFILI, " | |||
lv_dir_name | TYPE EPSF-EPSDIRNAM, " | |||
lv_dir_name | TYPE EPSF-EPSDIRNAM, " | |||
lv_invalid_eps_subdir | TYPE EPSF, " | |||
lv_file_mask | TYPE EPSF-EPSFILNAM, " SPACE | |||
lv_file_counter | TYPE EPSF-EPSFILSIZ, " | |||
lv_sapgparam_failed | TYPE EPSF, " | |||
lv_error_counter | TYPE EPSF-EPSFILSIZ, " | |||
lv_build_directory_failed | TYPE EPSF, " | |||
lv_no_authorization | TYPE EPSF, " | |||
lv_read_directory_failed | TYPE EPSF, " | |||
lv_too_many_read_errors | TYPE EPSF, " | |||
lv_empty_directory_list | TYPE EPSF. " |
  CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING' " |
EXPORTING | ||
DIR_NAME | = lv_dir_name | |
FILE_MASK | = lv_file_mask | |
IMPORTING | ||
DIR_NAME | = lv_dir_name | |
FILE_COUNTER | = lv_file_counter | |
ERROR_COUNTER | = lv_error_counter | |
TABLES | ||
DIR_LIST | = lt_dir_list | |
EXCEPTIONS | ||
INVALID_EPS_SUBDIR = 1 | ||
SAPGPARAM_FAILED = 2 | ||
BUILD_DIRECTORY_FAILED = 3 | ||
NO_AUTHORIZATION = 4 | ||
READ_DIRECTORY_FAILED = 5 | ||
TOO_MANY_READ_ERRORS = 6 | ||
EMPTY_DIRECTORY_LIST = 7 | ||
. " EPS_GET_DIRECTORY_LISTING |
ABAP code using 7.40 inline data declarations to call FM EPS_GET_DIRECTORY_LISTING
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 EPSDIRNAM FROM EPSF INTO @DATA(ld_dir_name). | ||||
"SELECT single EPSDIRNAM FROM EPSF INTO @DATA(ld_dir_name). | ||||
"SELECT single EPSFILNAM FROM EPSF INTO @DATA(ld_file_mask). | ||||
DATA(ld_file_mask) | = ' '. | |||
"SELECT single EPSFILSIZ FROM EPSF INTO @DATA(ld_file_counter). | ||||
"SELECT single EPSFILSIZ FROM EPSF INTO @DATA(ld_error_counter). | ||||
Search for further information about these or an SAP related objects