Call Function RZL_READ_DIR_LOCAL:
FUNCTION RZL_READ_DIR_LOCAL. *"---------------------------------------------------------------------- *"Lokale Schnittstelle: *" IMPORTING *" NAME LIKE SALFILE-LONGNAME *" TABLES *" FILE_TBL STRUCTURE SALFLDIR *" EXCEPTIONS *" ARGUMENT_ERROR *" NOT_FOUND *"----------------------------------------------------------------------
Put the path in the import option NAME, and then read the directory listing from FILE_TBL after it returns.
RZL_READ_DIR_LOCAL can handle regular local paths as well as UNC paths.
The only drawback is that it only has access to the first 32 characters of each file name. However, you can easily create a new function based on the RZL_READ_DIR_LOCAL code and change the output method of the C program, since the first 187 characters of each file name are actually available.
Chris carruthers
source share