Listing the files in the specific application server directory
Use this tip to retrieve all files in the application server directory of your SAP system.
The function module 'RZL_READ_DIR_LOCAL' can be used to retrieve the files in the application server directory. See the sample code below.
REPORT ZTEST. PARAMETER: p_fdir type pfeflnamel DEFAULT 'usrsapYRDSYSprofile'. data: t_files like salfldir occurs 0 with header line. *START-OF-SELECTION START-OF-SELECTION. * Retrieving the list of files in the given directory call function 'RZL_READ_DIR_LOCAL' exporting name = p_fdir tables file_tbl = t_files. * List of files are contained within table it_filedir loop at t_files. write: / t_files-NAME. endloop.