2019 Jan 03 8:17 AM
HI
I have 15 flat files and I uploaded into application layer inbox folder for processing the file.
I have maintained 15 file names in my Z program.
While reading this FM
CALL 'C_DIR_READ_START'
ID 'DIR' FIELD gv_path1
ID 'FILE' FIELD gv_fmask
ID 'ERRNO' FIELD file-errno
ID 'ERRMSG' FIELD file-errmsg.
*--Select files 1 by 1
CALL 'C_DIR_READ_NEXT'
ID 'TYPE' FIELD file-type
ID 'NAME' FIELD file-name
ID 'LEN' FIELD file-len
ID 'OWNER' FIELD file-owner
ID 'MTIME' FIELD file-mtime
ID 'MODE' FIELD file-mode
ID 'ERRNO' FIELD file-errno
ID 'ERRMSG' FIELD file-errmsg.
Ex: In my scenario
i have maintained 15 file names in select options but i uploaded only 10 files in the app layer(al11).
Here.FM CALL 'C_DIR_READ_NEXT' check the file name in sequence.if any file is not available then it will not be picking other available file in the sequence.
How to skip this error and load the available file in AL11 layer.
Thanks in advance.
Shrini
HI
I have 15 flat files and I uploaded into application layer inbox folder for processing the file.
I have maintained 15 file names in my Z program.
While reading this FM
CALL 'C_DIR_READ_START'
ID 'DIR' FIELD gv_path1
ID 'FILE' FIELD gv_fmask
ID 'ERRNO' FIELD file-errno
ID 'ERRMSG' FIELD file-errmsg.
*--Select files 1 by 1
CALL 'C_DIR_READ_NEXT'
ID 'TYPE' FIELD file-type
ID 'NAME' FIELD file-name
ID 'LEN' FIELD file-len
ID 'OWNER' FIELD file-owner
ID 'MTIME' FIELD file-mtime
ID 'MODE' FIELD file-mode
ID 'ERRNO' FIELD file-errno
ID 'ERRMSG' FIELD file-errmsg.
Ex: In my scenario
i have maintained 15 file names in select options but i uploaded only 10 files in the app layer(al11).
Here.FM CALL 'C_DIR_READ_NEXT' check the file name in sequence.if any file is not available then it will not be picking other available file in the sequence.
How to skip this error and load the available file in AL11 layer.
Thanks in advance.
Shrini
2019 Jan 04 7:35 AM
Shrini one simple question if the files are available on application server AL11 why don't you use OPEN DATASET? Calling C functions is not the right approach. Any reason for using these special functions
Nabheet
2020 Jan 22 12:18 PM
Hi Shrini,
Look into FMs of Function Group EPSF.
I would suggest FM EPS_FTP_LS. With this FM you can read a folder and then build your logic with the return given.
Some hints:


Regards,
Alfonso.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |