Skip to Content
0
Former Member
Aug 01, 2012 at 11:57 AM

Transfer file from SAP server to local file server

1729 Views

Hi,

I have a requirement wherein we are required to send a file from the SAP server to a file server. I am able to use the "OPEN DATASET" command to move the contents of the table to the file to a specific location in the SAP server. Could anyone let me know as to how I can transfer the file to the file server?

I have tried the following

  • OPEN DATASET '\\<server>\folder\filename.txt' in TEXT MODE.....
    • This wrote the file to the DIR_SAPUSERS directory in the SAP server

  • Used the FTP_CONNECT. I have a username and password to a folder created in the file server. Opened the port 22. All permissions given at the OS level
    • This just returns sy-subrc as 1

  • Tried the FM C13Z_FRONT_END_TO_APPL
    • This does write correctly to the folder on SAP server. Changing the target like the one mentioned in the first method yeilds the same result as the first method.

I am keen on using the OPEN DATASET method rather than FTP. Could anyone let me know how I can do this and what are the prerequisites?I have tried searching for this requirement however not able to find any solutions.

Thanks and best regards,

Prem.