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.
NOTE: Points will be awarded to every useful answer.
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.
Get Current Directory Listing for OUT Dir
call function 'RZL_READ_DIR_LOCAL'
name = p_file
file_tbl = it_filedir.
List of files are contained within table it_filedir
loop at it_filedir.
write: / it_filedir-NAME.