05-26-2011 4:54 PM
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.
05-26-2011 5:24 PM
05-26-2011 5:04 PM
05-26-2011 5:34 PM
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?
05-26-2011 5:40 PM
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
05-26-2011 5:24 PM
05-26-2011 5:36 PM
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!
05-26-2011 5:51 PM
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.
05-26-2011 6:35 PM
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
08-04-2015 3:45 PM
08-20-2015 10:36 PM
08-26-2015 7:38 AM