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: 

How to rename a file on the application server in ECC 6?

Former Member
0 Kudos

hi guys,

i would like to rename a file in the application server. Can anyboday tell me how to do that?

cheers

5 REPLIES 5

0 Kudos

hi,

i have seen that post.

Function module PFL_COPY_OS_FILE is obsolete in ECC 6.0. I cant use the system command directly as mentioned there.

is there any function modules to do the same?

cheers

0 Kudos

If ur application server is in UNIX....then create a command "mv" using SM69...

then use the fm SXPG_COMMAND_EXECUTE.

Former Member
0 Kudos

hiii

you can rename the file on appl.server.

just create another file & transfer data in that file & delete old file.

FORM WRITE_DATA. 
OPEN DATASET File_2 FOR OUTPUT IN TEXT MODE. 

LOOP AT ITAB2. 
TRANSFER ITAB2 TO File_2. 
ENDLOOP. 

CLOSE DATASET File_2. 
CLEAR: ITAB2, ITAB[]. 
ENDFORM. " WRITE_DATA.

reward if useful

thx

twinkal

Former Member
0 Kudos

Hi,

You may use SM69 ( SM49 to test ) to define the external command, may be to run the batch file. Create a batch file on the application file .You may execute the batch file by using FM SXPG_COMMAND_EXECUTE.

I hope this helps,

Regards

Raju Chitale