Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

What this Syntax or Statement means

Former Member
0 Likes
965

What does this statement means.

call 'C_DIR_READ_START' id 'DIR' field file-dir

id 'FILE' field file-name

id 'ERRNO' field file-err

id 'ERRMSG' field file-msg.

Can anyone explain what does it mean ? may be in brief...

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
727

Well, this is actually a call to the kernal which is C, this call can not be debugged and the source can not be viewed, so it is a little hard to figure out exactly what it does, but sometimes you can guess by the name and the parameters.

It appears that it may read the files from the application server.

Regards,

RIch Heilman

What does this statement means.

call 'C_DIR_READ_START' id 'DIR' field file-dir

id 'FILE' field file-name

id 'ERRNO' field file-err

id 'ERRMSG' field file-msg.

Can anyone explain what does it mean ? may be in brief...

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
728

Well, this is actually a call to the kernal which is C, this call can not be debugged and the source can not be viewed, so it is a little hard to figure out exactly what it does, but sometimes you can guess by the name and the parameters.

It appears that it may read the files from the application server.

Regards,

RIch Heilman

Read only

Former Member
0 Likes
727

Hi,

this is OS function used to read the file from a server directory.

like this

  • Start reading

l_fname = '.'. "Mask

CALL 'C_DIR_READ_START' ID 'DIR' FIELD p_folder

ID 'FILE' FIELD l_fname

ID 'ERRNO' FIELD l_ferrn

ID 'ERRMSG' FIELD l_ferrm.

CHECK sy-subrc = 0.

  • read Directory

WHILE sy-subrc = 0.

CLEAR l_flist.

CALL 'C_DIR_READ_NEXT' ID 'TYPE' FIELD l_flist-ftype

ID 'NAME' FIELD l_flist-fname

ID 'LEN' FIELD l_flist-fleng

ID 'OWNER' FIELD l_flist-fownr

ID 'MTIME' FIELD l_flist-fmtme

ID 'MODE' FIELD l_flist-fmode

ID 'ERRNO' FIELD l_ferrn

ID 'ERRMSG' FIELD l_ferrm.

CHECK sy-subrc = 0 AND NOT l_flist-fleng IS INITIAL.

l_flist-direc = p_folder.

INSERT l_flist INTO TABLE lt_flist.

ENDWHILE.

  • finish reading

CALL 'C_DIR_READ_FINISH' ID 'ERRNO' FIELD l_ferrn

ID 'ERRMSG' FIELD l_ferrm.

<b><REMOVED BY MODERATOR></b>

Message was edited by:

Alvaro Tejada Galindo