Application Development 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: 

How to read AL11 parameters in ABAP program

Former Member
0 Kudos

Hello SAP Masters,

I came across a requirement to read AL11 file parameters such as lastchanged day and lastchanged time of a particular file in directory. Can you guide me by providing either the function module name or any table where this information is stored, so that I can utilize something in ABAP program and get this information.

Your help is greatly appreciated!

Regards.

1 ACCEPTED SOLUTION

kesavadas_thekkillath
Active Contributor
0 Kudos

Hi John,

use the fm EPS_GET_FILE_ATTRIBUTES and use the output of file_mtime and then call the subroutine p6_to_date_time_tz of the program RSTR0400 with the value from file_mtime and retrun date, time.

7 REPLIES 7

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

try this : call 'RstrDateConv'

ID 'OPCODE' FIELD opcode

ID 'TIMESTAMP' FIELD timestamp

ID 'ABAPSTAMP' FIELD abapstamp.

brad_bohn
Active Contributor
0 Kudos

Actually, what you need is to call the system file functions much like AL11 does: C_DIR_READ_START, C_DIR_READ_NEXT, C_DIR_READ_FINISH or C_DIR_READ_FINISH and then C_FILE_ATTRIBUTES. There are function modules that will wrap this for you such as EPS_GET_FILE_ATTRIBUTES.

Former Member
0 Kudos

Thanks for your response. The FM you indicated seems to be the one, but it has time information in seconds I guess. I am not clear on how do I interpret that into date and time.

Can you please provide some guidance.

Thanks.

0 Kudos

Hi,

Check this FM ADS2KIPUPL_GET_FILE_ATTRIBUTES.

KR

Veeranji Reddy P.

0 Kudos

Check the FM 'EPS_GET_FILE_ATTRIBUTES'.

0 Kudos

Keshav provided the correct response, but since you asked me - this is what AL11 does:


    PERFORM p6_to_date_time_tz(rstr0400) USING file-mtime
                                               file-mod_time
                                               file-mod_date.

BTW, that time/second value is the number of seconds since 1970.

kesavadas_thekkillath
Active Contributor
0 Kudos

Hi John,

use the fm EPS_GET_FILE_ATTRIBUTES and use the output of file_mtime and then call the subroutine p6_to_date_time_tz of the program RSTR0400 with the value from file_mtime and retrun date, time.