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: 

EPS_GET_DIRECTORY_LISTING truncates file name

0 Kudos

Hello SAPients!

I'm using FM EPS_GET_DIRECTORY_LISTING to get the list of files in a directory in the application server, the problem is that the files have a name bigger than 40 chars. I've been looking for another FM to do the same but with a bigger output parameter for the filename but I haven't had any luck.

Do you guys know of such a FM?

Thanks in advance for your kind help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Check this FM - "SUBST_GET_FILE_LIST".

10 REPLIES 10

Former Member
0 Kudos

Have a look at FM F4_DXFILENAME_TOPRECURSION

Rob

0 Kudos

Hi Rob,

Thank you for your reply.

Actually, that FM also truncates the filename (I'm working in ECC 5.0, maybe that's the problem). But I also need to extract the list of files 'without dialog', that is, put the result into an internal table, the FM you mentioned is interactive (shows a dialog screen with the directories/files).

Any other idea?

0 Kudos

I think the FM mentioned by Suman Jagu is your best bet. Have a look at the logic it implements, extract it and modify to suit your requiremetns.

Rob

Former Member
0 Kudos

Check this FM - "SUBST_GET_FILE_LIST".

0 Kudos

Hi Suman,

Thank you for your reply.

In the FM you mentioned, the output parameter for the filenames is bigger (that is good) but, the input parameter for the path is shorter (that is bad), my path is also bigger than 40 chars.

Any other idea?

Thanks!

0 Kudos

Also...If you and in process of setting up the folder, see if you can have a shorter folder name or the folder can be setup at level closer to root in hierarchy.

0 Kudos

Hello Ricardo,

Based on the OS platform of the AS (viz., Unix, MS) you can create an [external OS command|http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a6047505211d189550000e829fbbd/content.htm] in SM69 for listing the files in the directory.

You can call the OS command in your program using the FM '[SXPG_COMMAND_EXECUTE|http://help.sap.com/saphelp_40b/helpdata/fr/fa/0971fb543b11d1898e0000e8322d00/content.htm]'. You can get the file available in the directory via the TABLES param.

Further reads are available on SDN.

BR,

Suhas

0 Kudos

Use  EPS2_GET_DIRECTORY_LISTING

0 Kudos

EPS2_GET_DIRECTORY_LISTING solved my problem.

Thanks, Lisandro

EPS2_GET_DIRECTORY_LISTING