venerdì 22 febbraio 2008

Read file in a local directory

Hi abappers,
How to read file in a local directory from sap?
Here a short example using the method DIRECTORY_LIST_FILES of class 'CL_GUI_FRONTEND_SERVICES'.
This method returns the number of file, name end properties.


DATA: wa_file_table TYPE file_info,
tab TYPE STANDARD TABLE OF file_info,
count TYPE i.

CALL METHOD cl_gui_frontend_services=>directory_list_files
EXPORTING
directory = 'C:\DownloadDirector'
CHANGING
file_table = tab
count = count.

Nessun commento: