Skip to Content
author's profile photo Former Member
Former Member

How to get creation date of a file created in application server?

Dear experts ,

I have some txt files in a particular path in application server .Suppose path is - \\PMICHSAPLA30\INTERFACE\\BCD\CO\OTC\SALES_RPT\test.txt.

I want to fetch the creation date of this txt file - test.txt . I tried with fm - ADS2KIPUPL_GET_FILE_ATTRIBUTES , but this will give proper out put.

I need to get file creation date. If today I am creating file - abc.txt, so according to this file I should get today's date as creation date.

Please suggest me.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 08, 2014 at 11:24 AM

    Hi Sandipan,

    Please confirm either you are looking for creation date or last modified date.

    Please check this FM


    EPS_GET_FILE_ATTRIBUTES


    also try 'SUBST_GET_FILE_LIST

    call this routine also inside

    PERFORM P6_TO_DATE_TIME_TZ(RSTR0400) USING FILE_LIST-MTIME

    FILE_LIST-MOD_TIME

    FILE_LIST-MOD_DATE.

    Hope it will be helpful.

    Regards,

    Kannan


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 08, 2014 at 05:05 PM

    Hi,

    Thinking aloud....

    Why not use DOS DIR command as external command redirecting the output to a file and then read this file ?

    Or use the output of the command (I am at home cannot test this....) .

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 08, 2014 at 05:57 PM

    Use UNIX command.

    example:


    CALL 'SYSTEM' ID 'COMMAND' FIELD l_v_unixcom
    ID 'TAB' FIELD i_file[].

    Where l_v_unixcom would be - ls -l <path>.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2014 at 12:10 PM

    Dear All,

    Issue has been solved by using this fm - EPS2_GET_DIRECTORY_LISTING .

    Thanks to all of you for your quick reply.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.