02-10-2012 8:50 AM
Hi Experts,
I want to rename the file which is in Application Server.
E.g:- Current File in Application Server is '\user\sd\file1'
I want to change the above file name to '\user\sd\file1_old' in Application Server.
Please help me if any one aware of this.
Thanks & Regards,
Chandu
02-10-2012 9:13 AM
Hi ,
You can use class cl_cts_language_file_io and its static method copy_files_local. you can refer this blog [Copying/Renaming a file in Application Server|http://help-abap.zevolving.com/2011/10/copyingrenaming-a-file-in-application-server-2/]. It does not directly renames the file. It creates a copy first with the new file name. Later you have to delete your previous file using delete dataset.
02-10-2012 8:58 AM
Hi,
Please check these links
<Link farm removed>
Regards,
Ben
Edited by: Suhas Saha on Feb 10, 2012 2:32 PM
02-10-2012 9:08 AM
Hello,
What you want to do is execute a command on the host operating system.
This can be done with function module SXPG_COMMAND_EXECUTE.
This module will execute commands that have been predefined in SAP. To see what is available look in SM49.
If you have the autorizations you can create your own or ask for it to be created.
More general information can be found [here|http://wiki.sdn.sap.com/wiki/display/ABAP/CreationofExternalCommandswiththehelpofUNIXCodingin+SAP].
Hope this is helpful.
02-10-2012 9:13 AM
Hi ,
You can use class cl_cts_language_file_io and its static method copy_files_local. you can refer this blog [Copying/Renaming a file in Application Server|http://help-abap.zevolving.com/2011/10/copyingrenaming-a-file-in-application-server-2/]. It does not directly renames the file. It creates a copy first with the new file name. Later you have to delete your previous file using delete dataset.
02-10-2012 9:18 AM
Hi,
Check the bellow link for your requirement.
<link farm removed>
Regards,
Goutam Kolluru.
Moderator Message: Please do not spoon feed.
Edited by: Suhas Saha on Feb 10, 2012 3:01 PM