10-03-2008 12:40 PM
Hi,
My requirement is to get the list of files present in the application server.
Which function module can i use for this purpose.
Regards.
10-03-2008 12:43 PM
10-03-2008 12:43 PM
10-03-2008 12:43 PM
10-03-2008 12:45 PM
Hi,
Use this FM RZL_READ_DIR
data: p_file type rlgrap-filename,
lt_file type table of salfldir.
call function 'RZL_READ_DIR'
EXPORTING
name = p_file
srvname = ' '
TABLES
file_tbl = lt_file
EXCEPTIONS
ARGUMENT_ERROR = 1
NOT_FOUND = 2
SEND_ERROR = 3
SYSTEM_FAILURE = 4
OTHERS = 5.
OR
CALL FUNCTION 'RZL_READ_DIR_LOCAL'
EXPORTING
NAME = p_file
TABLES
FILE_TBL = lt_file
EXCEPTIONS
ARGUMENT_ERROR = 1
NOT_FOUND = 2
OTHERS = 3.
Hope it will helps
10-03-2008 12:48 PM
10-03-2008 12:53 PM
if your application server is unix then you can try this also..
REPORT ZUNIX line-size 400
no standard page heading.
data : unixcom like rlgrap-filename.
data: begin of tabl occurs 500,
line(400),
end of tabl.
data: lines type i.
start-of-selection.
refresh tabl.
unixcom = 'ls -al'.
"this is very impoertant
call 'SYSTEM' id 'COMMAND' field unixcom
id 'TAB' field tabl[].
"Loop the tabl and write the results.