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: 

FM to get path of Directory in AL11

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

try below FMs

F4_DXFILENAME_TOPRECURSION

/SAPDMC/LSM_F4_SERVER_FILE

thanks

Vinod

8 REPLIES 8

Former Member
0 Kudos

Hi,

try below FMs

F4_DXFILENAME_TOPRECURSION

/SAPDMC/LSM_F4_SERVER_FILE

thanks

Vinod

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.

amit_khare
Active Contributor
0 Kudos

Check this FM -RZL_READ_DIR

Former Member
0 Kudos

Hi,

Use this FM.

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

Regards,

NNR.

Sm1tje
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi ,

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

Regards,

Deepthi

Former Member
0 Kudos

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.

Former Member
0 Kudos

Where used list shows: WSAF_READ_SAF_PATH