<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ftp_copy in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-copy/m-p/3612167#M870241</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparentle, the copy-statement doesn 't exist aas a ftp-command. So I download the file using ftp_SERVER_TO_R3 and upload it to the new location using FTP_R_3_TO_SERVER&lt;/P&gt;&lt;P&gt;That's solved &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Mar 2008 13:37:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-25T13:37:06Z</dc:date>
    <item>
      <title>ftp_copy</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-copy/m-p/3612165#M870239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to transfer a file from one folder to another folder on a FTP server.&lt;/P&gt;&lt;P&gt;I tried using fm ftp_copy, with as FILE_SOURCE the source file (e.g. /template/a.xls) and as file destination te destination file (e.g /upload/folder/a.xls).&lt;/P&gt;&lt;P&gt;I receive as sy-subrc 2, (wrong ftp command).&lt;/P&gt;&lt;P&gt;Is there someone who knows how to do this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Björn&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 11:19:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-copy/m-p/3612165#M870239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T11:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: ftp_copy</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-copy/m-p/3612166#M870240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These are standared FTP programs which allows you to FTP from within SAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SAPFTP.EXE should be pre-installed in the users local harddisk before you can used this functions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do a check first by executing program RSFTP005.  It will tell you whether it can detect the SAPFTP.EXE program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSFTP001 -  SAPFTP version &lt;/P&gt;&lt;P&gt;RSFTP002 -  Execute FTP Command &lt;/P&gt;&lt;P&gt;RSFTP003 -  Test &lt;/P&gt;&lt;P&gt;RSFTP004 -  FTP copy &lt;/P&gt;&lt;P&gt;RSFTP005 -  SAPFTP check &lt;/P&gt;&lt;P&gt;RSFTP006 -  FTP command list &lt;/P&gt;&lt;P&gt;RSFTP007 -  Test FB:FTP_SERVER_TO_R3 / FTP_R3_TO_SERVER &lt;/P&gt;&lt;P&gt;RSFTP008 -  Test FB:FTP_CLIENT_TO_R3 / FTP_R3_TO_CLIENT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP provide sample code to connect to FTP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It provided in SAP function module, FTP_CONNECT (connect to FTP), FTP_COMMAND (send command by FTP), FTP_DISCONNECT (disconnect),FTP_R3_TO_SERVER (put file to FTP),FTP_SERVER_TO_R3 (get file from FTP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of writing a new code, I will try to give you explanation on SAP sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will explore program RSFTP002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program RSFTP002 demonstrate how to send command to FTP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can send any FTP command by this program.&lt;/P&gt;&lt;P&gt;For RFC destination use SAPFTP or SAPFTPA. Those are standard RFC destination to connect to FTP. SAPFTP run on client, and SAPFTPA run on application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First step of this program is using FTP_CONNECT, don't forget to use scrambled password.&lt;/P&gt;&lt;P&gt;Then we send a command to FTP by using FTP_COMMAND.&lt;/P&gt;&lt;P&gt;To disconnect, use FTP_DISCONNECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To copy, or get a file from SAP to/from FTP, you can explore RSFTP002. It demonstrate how to use FTP_R3_TO_SERVER (put file to FTP) &amp;amp; FTP_SERVER_TO_R3 (get file from FTP).&lt;/P&gt;&lt;P&gt;Other way is send put command using FTP_COMMAND. To put a file, do this steps, change FTP directory using "cd dir", change local directory using "lcd localdir", then send put command "put file".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 11:29:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-copy/m-p/3612166#M870240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T11:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: ftp_copy</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-copy/m-p/3612167#M870241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparentle, the copy-statement doesn 't exist aas a ftp-command. So I download the file using ftp_SERVER_TO_R3 and upload it to the new location using FTP_R_3_TO_SERVER&lt;/P&gt;&lt;P&gt;That's solved &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 13:37:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-copy/m-p/3612167#M870241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T13:37:06Z</dc:date>
    </item>
  </channel>
</rss>

