08-09-2010 4:49 PM
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.
08-10-2010 2:40 PM
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.
08-09-2010 5:13 PM
try this : call 'RstrDateConv'
ID 'OPCODE' FIELD opcode
ID 'TIMESTAMP' FIELD timestamp
ID 'ABAPSTAMP' FIELD abapstamp.
08-09-2010 5:45 PM
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.
08-10-2010 2:29 PM
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.
08-10-2010 2:43 PM
Hi,
Check this FM ADS2KIPUPL_GET_FILE_ATTRIBUTES.
KR
Veeranji Reddy P.
08-10-2010 2:46 PM
08-10-2010 3:01 PM
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.
08-10-2010 2:40 PM
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.