Friday, November 23, 2007

sap abap program for Use SAP code to list how many documents in the folder on your PC

PC Folder List with ABAP

Use function module TMP_GUI_DIRECTORY_LIST_FILES to get a list of files on any given path on the presentation server.

Sample Code:

data : file_table like table of SDOKPATH.
data : dir_table like table of SDOKPATH.

CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
EXPORTING
DIRECTORY = 'C:\export\'
FILTER = '*.TXT'
* IMPORTING
* FILE_COUNT =
* DIR_COUNT =
TABLES
FILE_TABLE = file_table
DIR_TABLE = dir_table
* EXCEPTIONS
* CNTL_ERROR = 1
* OTHERS = 2.

No comments:

Blog Archive