* Data definition
DATA:
BEGIN OF LS_FILE,
DIRECTORY(75) TYPE C, " name of directory.
" (possibly truncated.)
NAME(75) TYPE C, " name of entry.
" (possibly truncated.)
TYPE(10) TYPE C, " type of entry: directory, file
LEN(8) TYPE P, " length in bytes
OWNER(8) TYPE C, " owner of the entry
MTIME(6) TYPE P, " last modification date,
" seconds since 1970
MODE(9) TYPE C, " like "rwx-r-x--x":
" protection mode
ERRNO(3) TYPE C,
ERRMSG(40) TYPE C,
MOD_DATE TYPE D,
MOD_TIME(8) TYPE C, " hh:mm:ss
SUBRC LIKE SY-SUBRC,
END OF LS_FILE.
DATA:
LT_FILE LIKE LS_FILE OCCURS 0,
L_COUNTER TYPE I,
L_COUNTER_PACKAGE TYPE I,
L_CHAR10(10),
L_TEXT(100),
L_SUBRC LIKE SY-SUBRC.
* Get files
CALL 'C_DIR_READ_FINISH'
ID 'ERRNO' FIELD LS_FILE-ERRNO
ID 'ERRMSG' FIELD LS_FILE-ERRMSG.
CALL 'C_DIR_READ_START' ID 'DIR' FIELD DIRECTORY
ID 'FILE' FIELD '*'
ID 'ERRNO' FIELD LS_FILE-ERRNO
ID 'ERRMSG' FIELD LS_FILE-ERRMSG.
IF SY-SUBRC <> 0.
IF NOT LS_FILE-ERRMSG IS INITIAL.
MESSAGE I034(/SAPDMC/LSMW_OBJ_060) WITH LS_FILE-ERRMSG.
ENDIF.
RAISE NOT_FOUND.
ENDIF.
DO.
CLEAR LS_FILE.
CALL 'C_DIR_READ_NEXT'
ID 'TYPE' FIELD LS_FILE-TYPE
ID 'NAME' FIELD LS_FILE-NAME
ID 'LEN' FIELD LS_FILE-LEN
ID 'OWNER' FIELD LS_FILE-OWNER
ID 'MTIME' FIELD LS_FILE-MTIME
ID 'MODE' FIELD LS_FILE-MODE
ID 'ERRNO' FIELD LS_FILE-ERRNO
ID 'ERRMSG' FIELD LS_FILE-ERRMSG.
По-поводу поиска на локале - даже не знаю, использование C-функций дело темное и наукой не объяснимое, работает и ладно.
Я немного про другое спросил. У меня выбает список файлов на сервере приложений, а Вы написали, что проверили на "Этот ФМ и на локальной машине списки в директориях считывает."
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.