Listing the files on the Application Server Directory

by Subhas

The function module 'RZL_READ_DIR_LOCAL' can be used to retrieve the files in the application server directory. See the sample code below.

Code

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.


 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image