07-08-2008 10:38 AM
Hi Gurus,
I have a requirement in which I have to execute my program once in every 15 minutes which will check if there are any files present in application server. Is so I have to retreive the files to SAP from Application server.
Now I have couple of issues in doing so.
1. How to find the number of files present in that directory?
2. How to retreive more than 1 file at a time from the directory.
Its bit urgent.
Cheers,
Naveen
NOTE: Points will be awarded to every useful answer.
07-08-2008 10:55 AM
hi,
hope this FM can help.
PARAMETER: p_file type pfeflnamel DEFAULT '/usr/sap/tmp'.
data: begin of it_filedir occurs 10.
include structure salfldir.
data: end of it_filedir.
START-OF-SELECTION.
Get Current Directory Listing for OUT Dir
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_file
tables
file_tbl = it_filedir.
List of files are contained within table it_filedir
loop at it_filedir.
write: / it_filedir-NAME.
endloop.
rgds
Umakanth
07-15-2008 2:10 PM
07-15-2008 2:14 PM