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: 

Timestamp of File in Unix directory

Former Member
0 Kudos
354

Hi,

I would like to kbnow how to get the Unix level timestamp of Files in a particular directory in al11 transaction. This needs to be accessed from a ABAP program. Any inputs will be appreciated.

regards

Aveek

1 ACCEPTED SOLUTION

Former Member
0 Kudos
82

Hi

Try to use the fm SUBST_GET_FILE_LIST, it should return all data you can see by AL11.

Here you can see the abap code to do that.

After you should use the routine p6_to_date_time_tzof program rstr0400 to convert format date and time:

DATA T_FILE LIKE STANDARD TABLE OF RSFILLST WITH HEADER LINE.

call function 'subst_get_file_list':

EXPORTING

DIRNAME = DIRNAME

FILENM = FILENM

TABLES

FILE_LIST = T_FILE.

LOOP AT T_FILE.

perform p6_to_date_time_tz(rstr0400)

using T_FILE-mtime

T_FILE-MOD_TIME

T_FILE-mod_date.

MODIFY T_FILE.

ENDLOOP.

Max

2 REPLIES 2

Former Member
0 Kudos
83

Hi

Try to use the fm SUBST_GET_FILE_LIST, it should return all data you can see by AL11.

Here you can see the abap code to do that.

After you should use the routine p6_to_date_time_tzof program rstr0400 to convert format date and time:

DATA T_FILE LIKE STANDARD TABLE OF RSFILLST WITH HEADER LINE.

call function 'subst_get_file_list':

EXPORTING

DIRNAME = DIRNAME

FILENM = FILENM

TABLES

FILE_LIST = T_FILE.

LOOP AT T_FILE.

perform p6_to_date_time_tz(rstr0400)

using T_FILE-mtime

T_FILE-MOD_TIME

T_FILE-mod_date.

MODIFY T_FILE.

ENDLOOP.

Max

andreas_mann3
Active Contributor
0 Kudos
82

Hi,

look here:

Andreas