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: 

Move Network Files in ABAP

Former Member
0 Kudos

Hi,

I want to move a network file into another location. How do I do this in abap?

Thanks.

Tyken

4 REPLIES 4

Former Member
0 Kudos

Hi,

maybe you can use open dataset, here is an example:

data: file_add1 type string,

file_add2 type string,

itab type table of string,

wtab like line of itab.

file_add1 = '//network_address/file.any'.

file_add2 = '//network_address2/file.any'.

open dataset file_add1 for input encoding default.

do.

transfer file_add1 to wtab.

if sy-subrc = 0.

append wtab to itab.

else.

exit.

endif.

clear wtab.

enddo.

close dataset file_add1.

open dataset file_add2 for output encoding default.

clear wtab.

loop at itab into wtab.

transfer wtab to file_add2.

clear wtab.

endloop.

close dataset file_add2.

Then delete file_add1.

Hope it helps,

Regards,

John.

0 Kudos

hi john,

the file has a timestamp and I want it to be retained. I want a move command like 'mv' in unix. I want the file transferred from destination to source, meaningthe file will get deleted in the destination automatically.

thanks.

tyken

0 Kudos

hmmmm,

try to read this, maybe it will be usefull:

http://help.sap.com/saphelp_47x200/helpdata/en/c4/3a8023505211d189550000e829fbbd/frameset.htm

Regards,

John.

former_member223537
Active Contributor
0 Kudos

Hi,

Please use transaction CG3Y or CG3Z.

Best regards,

Prashant