December 28, 2012

Upload/Download files to/from a server using a function modules

Much times we have to upload files to a particular SAP server, and it could be a mess to be all the day mapping and unmapping remote shares, or having to log into the servers all the time just to upload one or two small files, for example remote transport orders.
The ARCHIVFILE_CLIENT_TO_SERVER function module turn this daily task as simple as running the function module, writing the local path of the file, and the complete remote path (I mean complete by adding also the filename to the path, it's not enough simply writing just the directory). And to download files from an application server there is another very similar function module called ARCHIVFILE_SERVER_TO_CLIENT.