Application Development and Automation 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: 
Read only

Read Directory

Former Member
0 Likes
935

Hi Experts,

I am using the FM 'EPS2_GET_DIRECTORY_LISTING' to read a directory from the Application Server.

If I do not pass any value to the parameter IV_DIR_NAME I get some files.

However if I pass the directory I want to read I get an exception READ_DIRECTORY_FAILED.

Inside the standard FM some system calls are made.

Why am I getting this error?

Thanks and Regards,

Ravi

Hi Experts,

I am using the FM 'EPS2_GET_DIRECTORY_LISTING' to read a directory from the Application Server.

If I do not pass any value to the parameter IV_DIR_NAME I get some files.

However if I pass the directory I want to read I get an exception READ_DIRECTORY_FAILED.

Inside the standard FM some system calls are made.

Why am I getting this error?

Thanks and Regards,

Ravi

4 REPLIES 4
Read only

Former Member
0 Likes
848

HI,

I think you are passing the Directory name ..You need to pass the Directory Path

DIR_ATRA	              --- What You are passing
E:\usr\sap\E6S\DVEBMGS00\data -- You need to pass this to FM

Read only

0 Likes
848

Hey Avinash,

Thanks for the reply.

However, I am passing the entire directory path and not the name itself.

This path I pick from the transaction AL11.

Ours is a UNIX server.

Thanks and Regards,

Ravi Bhatnagar

Read only

0 Likes
848

hi,

Check using CG3Y/CG3Z to download the data from the application server for the same path you provided to the FM. If your are getting same error then it is with authorization. If not check the file name is properly built.

Read only

Former Member
0 Likes
848

Hi

Try using this function module 'SXPG_CALL_SYSTEM' to read a directory from app.server.

Venkat.