Skip to Content
avatar image
Former Member

FM to get path of Directory in AL11

Hi all,

My requirement goes like this,

I want to store all my table data on application server(AL11) . But I do not want to hard code the filepath as it can change.So it was decided to get it from the directory name.

So now I want to fetch the path of the folder and place my file there.

Is there any function module for getting the directory path or a table which stores the same?

I tried FM ' EPS_GET_DIRECTORY_PATH ' but it didnt give me the right result. 😔

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 17, 2009 at 08:00 AM

    Hi,

    try below FMs

    F4_DXFILENAME_TOPRECURSION

    /SAPDMC/LSM_F4_SERVER_FILE

    thanks

    Vinod

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for your useful replies.

      The function modules suggested didnt work properly for me .. maybe the inputs were wrong.

      But after debugging I got the table in which these values are stored.

      For user defined directories in AL11 the table is USER_DIR.

  • Mar 17, 2009 at 08:00 AM

    Check this FM -RZL_READ_DIR

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 17, 2009 at 08:03 AM

    Hi,

    Use this FM.

    EPS_GET_FILE_ATTRIBUTES Pass in a filename and a path, and will return attributes for the file.

    Regards,

    NNR.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 17, 2009 at 08:03 AM

    These are all good replies, however, wouldn't it be better to create logical file paths / names using transaction FILE?

    this depends on your requirement, but it might be worth to have a look at this.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 17, 2009 at 08:04 AM

    Hi ,

    Check the class CL_GUI_FRONTEND_SERVICES and its methods. "DIRECTORY_LIST_FILES" might server your purpose.

    Regards,

    Deepthi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 13, 2009 at 12:56 PM

    I see that this has been answered, but I'm not sure I see the answer. We also have a similar problem of running on windows, but needing to review a directory to determine if files are present.

    An ABAP t-code AL11 would do what we want, but I'm having problems determining which calls are the correct calls. The table user_dir is a great start, but if you could provide more of the answer, that would be appreciated.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 13, 2016 at 02:40 PM

    Where used list shows: WSAF_READ_SAF_PATH

    Add comment
    10|10000 characters needed characters exceeded