04910 - Listing Directory Contents

04910 - Listing Directory Contents

Vendor Master (General Section)   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Listing Directory Contents

Hi Martin,

I hope the next report is what you are searching for ?

report z_read_ifs_dir .

* This report lists all (authorized) files that are in the
* specified directory. Please keep always in mind that
* the public-authority is mostly set to *EXCLUDE. So the
* SIDnn can't access a lot of our files !!!!

data: a_dir_name(75) type c,
a_generic_name(75) type c.

data: begin of file,
dirname(75) type c, " name of directory. (possibly truncated.)
name(75) type c, " name of entry. (possibly truncated.)
type(10) type c, " type of entry.
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.
useable(1) type c,
subrc(4) type c,
errno(3) type c,
errmsg(40) type c,
mod_date type d,
mod_time(8) type c, " hh:mm:ss
seen(1) type c,
changed(1) type c,
end of file.
data: file_list like table of file with header line.

parameters: dir(75) type c.

a_dir_name = dir.
a_generic_name = '*'.

call 'C_DIR_READ_START' id 'DIR' field a_dir_name
id 'FILE' field a_generic_name
id 'ERRNO' field file-errno
id 'ERRMSG' field file-errmsg.
clear file.
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.
file-dirname = a_dir_name.

if sy-subrc = 0.
move-corresponding file to file_list.
append file_list.


id 'ERRNO' field file_list-errno
id 'ERRMSG' field file_list-errmsg.

loop at file_list.
write:/ file_list.



Durban Tours - Südafrika Safari

BAL_S_LOG - Application Log: Log header data   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 2320 Date: 20240620 Time: 004731     sap01-206 ( 3 ms )