‎2006 Nov 24 4:52 PM
Hi everybody!
I'd like to list all files in a specific directory. Is there any function for that???
Regards,
Elton.
‎2006 Nov 24 5:05 PM
Try to use:
- Fm (Application server) SUBST_GET_FILE_LIST
- Method (Presentation Server) CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
Max
‎2006 Nov 24 5:10 PM
Please check this code
data:
lv_Command(254) type c,
lt_Result(255) type c occurs 100 with header line.
lv_Command = 'ls -al'.
CALL 'SYSTEM' ID 'COMMAND' FIELD lv_Command
ID 'TAB' FIELD lt_Result-SYS.
loop at lt_Result.
write: / lt_Result.
endloop.
Also check Fm
<b>EPS_GET_DIRECTORY_LISTING</b>
Message was edited by:
Dominic Pappaly
‎2006 Nov 24 5:44 PM
Hi Elton,
You said you want to list all the file..but forgot to specify ..you want to list application server file or presentation server file.. andy use following are the function which will help you..
<b>To list application server file..</b>
RZL_READ_DIR_LOCAL
This can be used to read both application server / presentation file ..if
application server file is not specified it reads presentation files else app
server files
<b>To list presentation server file</b>
TMP_GUI_DIRECTORY_LIST_FILES
Only for presentation file..
Hope this helps you...
Enjoy SAP.
Pankaj Singh
‎2006 Nov 24 7:24 PM