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: 

Correct usage of FM ARCHIVFILE_CLIENT_TO_SERVER

Former Member
0 Kudos

Hi All,

Can anyone please let me know the correct usage of FM ARCHIVFILE_CLIENT_TO_SERVER.

Whenever I try to upload files using this FM, file is always uploaded to the directory "./" on the application server.

I need to upload files to a different directory, say "/tmp" on the application server.

Can anyone help me out on this?

Thanks,

Regards,

Riyaz

1 REPLY 1

Former Member
0 Kudos

Hi Riyaz,

In case you havent solved this already ...

DATA:

l_pcfile LIKE sapb-sappfad, "Desktop file & path

l_serfil LIKE sapb-sappfad. "Server File & path

l_pcfile = 'D:\Data\temp\input.txt'.

l_serfil = '/tmp/output.txt' .

CALL FUNCTION 'ARCHIVFILE_CLIENT_TO_SERVER'

EXPORTING

path = l_pcfile

targetpath = l_serfil

EXCEPTIONS

error_file = 1

OTHERS = 2.