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

CALL 'SYSTEM' ID 'COMMAND' FIELD

Former Member
0 Likes
4,044

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

2 REPLIES 2
Read only

Former Member
0 Likes
1,304

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

Read only

Former Member
0 Likes
1,304

Hi,

first: you use same names.

second: does the dir start with S: ??

i think it will be only /usr/trans.....

Regards, Dieter