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: 

Downloading more than 1 file from Application server

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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

0 Kudos

Hi,

Thanks for the reply.

Points awarded...

Cheers,

Naveen

Former Member
0 Kudos

The problem is solved.

Thanks for all ur help.