‎2007 Jul 27 12:35 PM
Hello everybody
I am trying this piece of code....but its giving me a return code = '-1'. Do you have any clue why....
DATA: COMMAND(200).
DATA: BEGIN OF TABL OCCURS 0,
LINE(255),
END OF TABL.
command = 'move S:/usr/sap/tmp/chinu1 S:/usr/sap/tmp/chinu1'.
CALL 'SYSTEM' ID 'COMMAND' FIELD COMMAND ID 'TAB' FIELD TABL-SYS.
if sy-subrc = 0.
write: 'Success'.
endif.
Thanks
Chinmoy
‎2007 Jul 27 12:51 PM
Is that a unix command, in place of <b>"move" try "mv"</b> OR may be "mov"
mv file1 file2
Move a file or, if file1 and file2 are in the same directory, rename a file.
mv files directory
Move files into a directory.
mv dir1 dir2
If directory dir2 exists, move dir1 into dir2; otherwise, rename dir1 as dir2.
Regards,
Vishal
‎2007 Jul 27 12:58 PM
Hi,
first: you use same names.
second: does the dir start with S: ??
i think it will be only /usr/trans.....
Regards, Dieter