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

Function module issues

Former Member
0 Likes
805

Hello folks,

1.what is the the function module for getting the list of files in a directory.

I tried EPS_GET_DIRECTORY_LISING but it didnt return aything.

2.Is there any sap function module for moving files from one unix directory to another??

Thanks,

Naren

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
751

<i>what is the the function module for getting the list of files in a directory.

I tried EPS_GET_DIRECTORY_LISING but it didnt return aything.</i>

if its unix directory files, this is the right function, probably you are missing authorization for authority object <b>S_CTS_ADMI</b>

run the FM from se37 and see whether you are getting authorization error.

Please note that the DIR_NAME parameter value is case sensitive.

Regards

Raja

5 REPLIES 5
Read only

Former Member
0 Likes
751

Hi Naren,

This one is supposed to work. I never tried it and let me know if it works for you.

FM: RZL_READ_DIR

And also check out the function group SAL3.

Regards,

Sumant.

Read only

Former Member
0 Likes
751

1) Func mod - /SAPDMC/SAPLLSMW_AUX_020

2) DATA: BEGIN OF MOVE_COMMAND1,

FILLER1(3) VALUE 'mv ',

MOVE_ONE_DIR(25)

VALUE '/storedoor/upload/gulan1/',

MOVE_ONE_FILE(12),

FILLER2(1) VALUE SPACE,

MOVE_TWO_DIR(30)

VALUE '/storedoor/upload/gulan1/done/',

MOVE_TWO_FILE(12),

END OF MOVE_COMMAND1.

CALL 'SYSTEM' ID 'COMMAND' FIELD MOVE_COMMAND1.

Read only

Former Member
0 Likes
751

You cal also use SXPG_COMMAND_EXECUTE and define commands under SM49

Read only

Former Member
0 Likes
751

Hi,

If you want to list the files in a directory of the presentation server, you can use this static method.

CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES

Use the class browser(se24) to display the parameters.

Svetlin

P.S. If you find an answer helpful, please assign reward points.

Read only

athavanraja
Active Contributor
0 Likes
752

<i>what is the the function module for getting the list of files in a directory.

I tried EPS_GET_DIRECTORY_LISING but it didnt return aything.</i>

if its unix directory files, this is the right function, probably you are missing authorization for authority object <b>S_CTS_ADMI</b>

run the FM from se37 and see whether you are getting authorization error.

Please note that the DIR_NAME parameter value is case sensitive.

Regards

Raja