cancel
Showing results for 
Search instead for 
Did you mean: 

How move file with space in the name to another foler on Linux from ABAP?

Former Member
0 Kudos

Hi experts,

My requirement is to move the file on Linux to another folder via ABAP program.

IN SM49 is defined ZMOVE command for "mv" operating system command. In ABAP, fm:

SXPG_COMMAND_EXECUTE calls ZMOVE external command to move the file to another folder.

But in case that file has space in the file name, then the fm gives error and the file can not be moved.

I have tried as given in the Note 1152084 - Parameter for external commands but it doesn't work.

Don't know if the reason is that the note is for Windows or Unix and we have Linux.

So, I have tried with ''%file name%' and '''file name'''.

PLease advice hoe to move file on Linux to another folder from ABAP program if the file has spec in the name.

Thanks in advance.

Kind regards,

Danijela Zivanovic

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Remember that from in side ABAP the file permissions need to allow SIDADM to write to the file to move it.

So SIDADM needs to createe the first file before move it.

Or the scripts used to create file needs to change owner ship so that SIDADM can have write permission.

I use SM49 to do many things in ABAP.

Former Member
0 Kudos

Hi all,

IN ECC 6.0 it is not possible in ABAP program to move the file with space in name to another folder on Unix. SAP deactivated this activity.

Former Member
0 Kudos

Not sure if or how this can be done in ABAP.

But you asked in Linux forum, and the Linux answer will be:

mv "file name" new_dir

So try that in ABAP too;

if it doesn't work, you should ask in ABAP forum.

regards

Former Member
0 Kudos

Hi,

Yes I know that on Linux, it works. But within ABAP program not.

Kind regards,

Danijela

Former Member
0 Kudos

Hi,

You can also try :

mv "file\ name" /<path_to_new_dir>

(Put "\" before each space)

Regards.

Rajesh Narkhede