Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to select all files from the application server.

Former Member
0 Kudos
317

Hi all,

I have a requirement to select all files with the same file format I.e i have created no of files with same name but different time stamps addition , now i want to select all the fiels and read the data into an internal table and sort them on the user requirement, I am using FM -


/SAPDMC/LSM_F4_SERVER_FILE to get single file name, i should also give the option on the selection screen for the user to select the file range I.e form which to which the sorting should be done.

could anybody suggest me the function module which selects all the file names .

Regards,

Sre.

Edited by: Alvaro Tejada Galindo on Mar 10, 2008 4:49 PM

3 REPLIES 3

Former Member
0 Kudos
120

Hi,


PARAMETER: p_fdir type pfeflnamel DEFAULT '/usr/sap/tmp'.

data: begin of it_filedir occurs 10.
include structure salfldir.
data: end of it_filedir.


************************************************************************
*START-OF-SELECTION
START-OF-SELECTION.


Get Current Directory Listing for OUT Dir 
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_fdir
tables
file_tbl = it_filedir.


List of files are contained within table it_filedir 
loop at it_filedir.
write: / it_filedir-NAME.
endloop.

Regards,

Omkaram.

0 Kudos
120

Thanks Omkaram, my issue is solved.

Former Member
0 Kudos
120

Hi,

FILE_READ_AND_CONVERT_SAP_DATA: Uploads the file from either presentation or application server into an internal table

SUBST_GET_FILE_LIST: To get the list of files from Application Server.

Regards,

Priya.