<?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: Send file from application server to ftp server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495084#M229902</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricardo &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Were you able to find a solution. I am having the same issue. I am trying to put a file onto an external FTP server using SAPFTPA and am unable to connect but I can connect and use drop the file using SAPFTP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your put syntax problem. I had the same issue. The file that you want to put onto the external ftp server needs to be in the local directory. To find out the local directory do lcd. Then move your file to that directory. Then you can do put filename and it will drop the file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2007 16:12:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-20T16:12:58Z</dc:date>
    <item>
      <title>Send file from application server to ftp server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495079#M229897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Sirs, we have to send a text file from our sap application server (45B on unix) to a ftp server on windows.&lt;/P&gt;&lt;P&gt;1)First we try to use the FTP_R3_TO_SERVER like this:&lt;/P&gt;&lt;P&gt; call function 'FTP_R3_TO_SERVER'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;           handle        = g_handle&lt;/P&gt;&lt;P&gt;           fname         = p_file&lt;/P&gt;&lt;P&gt;           blob_length   = l_blob_lenght&lt;/P&gt;&lt;P&gt;      tables&lt;/P&gt;&lt;P&gt;           blob          = pt_file&lt;/P&gt;&lt;P&gt;      exceptions&lt;/P&gt;&lt;P&gt;           tcpip_error   = 1&lt;/P&gt;&lt;P&gt;           command_error = 2&lt;/P&gt;&lt;P&gt;           data_error    = 3&lt;/P&gt;&lt;P&gt;           others        = 4&lt;/P&gt;&lt;P&gt;Where pt_file is a internal table filled with content of&lt;/P&gt;&lt;P&gt;the file declared like this:&lt;/P&gt;&lt;P&gt;data: begin of it_file occurs 0,&lt;/P&gt;&lt;P&gt;       rec(80),&lt;/P&gt;&lt;P&gt;  end of it_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The files arrives on the destination, but is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)After we try to use the FTP_COMMAND like the RSFTP002 program, but our source file is on application server so my command is like this&lt;/P&gt;&lt;P&gt;put /usr/sap/D41/SYS/global/abc.txt&lt;/P&gt;&lt;P&gt;The command runs but the log displays &lt;/P&gt;&lt;P&gt;"The system cannot find the path specified".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that FTP_CONNECT&lt;/P&gt;&lt;P&gt;and other ftp commands like cd &amp;lt;dir&amp;gt; works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you some to suggest ?&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;P&gt;Riccardo Galli&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 16:38:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495079#M229897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-03T16:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Send file from application server to ftp server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495080#M229898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; try using open dataset file for output in text mode encoding default..it works easily..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 17:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495080#M229898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-03T17:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Send file from application server to ftp server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495081#M229899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use FTP_CONNECT, FTP_COMMAND, FTP_DISCONNECT functions....&lt;/P&gt;&lt;P&gt;put RSFTP* in se38 and u will see some example programs...the only thing u need to know is how to specify the path....application server path looks like \sapmnt\  etc .. go to AL11 and see how paths are specified... in addition if u r transferring from local machine...then u can specify c:\tmp\ftpfile.txt   etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;The below is a Sample program,&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; &lt;/P&gt;&lt;P&gt;code]  &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SAP FTP functions&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This sample program will logged into your Unix Server.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Issue a Unix dir command&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Store the dir information in the Internal table and &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;display it.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Make sure you can telnet in to your SAP-UNIX FTP server * first.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Written by : SAP Basis, ABAP Programming and Other IMG * Stuff&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;REPORT ZFTPSAP LINE-SIZE 132.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DATA: BEGIN OF MTAB_DATA OCCURS 0,&lt;/P&gt;&lt;P&gt;LINE(132) TYPE C,&lt;/P&gt;&lt;P&gt;END OF MTAB_DATA.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: MC_PASSWORD(20) TYPE C,&lt;/P&gt;&lt;P&gt;MI_KEY TYPE I VALUE 26101957,&lt;/P&gt;&lt;P&gt;MI_PWD_LEN TYPE I,&lt;/P&gt;&lt;P&gt;MI_HANDLE TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Your SAP-UNIX FTP password (case sensitive)&lt;/P&gt;&lt;P&gt;MC_PASSWORD = 'password'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- FTP_CONNECT requires an encrypted password to work&lt;/P&gt;&lt;P&gt;CALL 'AB_RFC_X_SCRAMBLE_STRING'&lt;/P&gt;&lt;P&gt;     ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY&lt;/P&gt;&lt;P&gt;     ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD&lt;/P&gt;&lt;P&gt;     ID 'DSTLEN' FIELD MI_PWD_LEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FTP_CONNECT'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;*-- Your SAP-UNIX FTP user name (case sensitive)&lt;/P&gt;&lt;P&gt;       USER            = 'userid'&lt;/P&gt;&lt;P&gt;       PASSWORD        = MC_PASSWORD&lt;/P&gt;&lt;P&gt;*-- Your SAP-UNIX server host name (case sensitive)&lt;/P&gt;&lt;P&gt;       HOST            = 'unix-host'&lt;/P&gt;&lt;P&gt;       RFC_DESTINATION = 'SAPFTP'&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;       HANDLE          = MI_HANDLE&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       NOT_CONNECTED   = 1&lt;/P&gt;&lt;P&gt;       OTHERS          = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FTP_COMMAND'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       HANDLE = MI_HANDLE&lt;/P&gt;&lt;P&gt;       COMMAND = 'dir'&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;       DATA = MTAB_DATA&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       TCPIP_ERROR = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       COMMAND_ERROR = 2&lt;/P&gt;&lt;P&gt;       DATA_ERROR = 3&lt;/P&gt;&lt;P&gt;       OTHERS = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  LOOP AT MTAB_DATA.&lt;/P&gt;&lt;P&gt;    WRITE: / MTAB_DATA.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;do some error checking.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  WRITE: / 'Error in FTP Command'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FTP_DISCONNECT'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       HANDLE = MI_HANDLE&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       OTHERS = 1.     [/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here internal table is &amp;lt;b&amp;gt;MTAB_DATA&amp;lt;/b&amp;gt; will have the Data, so Use the Datasets(OPEN DATASET,READ and CLOSE DATASETS) to get the Data ftom the Application Server to the Internal Table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 17:09:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495081#M229899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-03T17:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Send file from application server to ftp server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495082#M229900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer&lt;/P&gt;&lt;P&gt;The connection fpt works well, and also other&lt;/P&gt;&lt;P&gt;ftp commands like 'cd' or 'dir'.&lt;/P&gt;&lt;P&gt;I use a SAPFTPA rfc destination beacause&lt;/P&gt;&lt;P&gt;the program haves to run also in bkgr.&lt;/P&gt;&lt;P&gt;But problem is when i try to run the command 'put'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to put a file resident on my sap application server&lt;/P&gt;&lt;P&gt;to a taget ftp directory (IIS windows server).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In AL11 my file is dispayed like (unix)&lt;/P&gt;&lt;P&gt;/usr/sap/d41/home/abc.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so my command is (i suppose)&lt;/P&gt;&lt;P&gt;zcommand = 'put /usr/sap/d41/home/abc.txt'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i try to run this command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FTP_COMMAND'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;HANDLE = MI_HANDLE&lt;/P&gt;&lt;P&gt;COMMAND = zcommand&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA = MTAB_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the mtab_data returns the string&lt;/P&gt;&lt;P&gt;"The system cannot find the path specified"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is wrong ?&lt;/P&gt;&lt;P&gt;Thanks Riccardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 20:23:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495082#M229900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-03T20:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Send file from application server to ftp server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495083#M229901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when you login, you will be logged into your home directory which may or may not be "/usr/sap/d41/home/". So you need to do a "cd /usr/sap/d41/home/" first and then do your 'put' command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 20:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495083#M229901</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-03T20:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Send file from application server to ftp server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495084#M229902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ricardo &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Were you able to find a solution. I am having the same issue. I am trying to put a file onto an external FTP server using SAPFTPA and am unable to connect but I can connect and use drop the file using SAPFTP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your put syntax problem. I had the same issue. The file that you want to put onto the external ftp server needs to be in the local directory. To find out the local directory do lcd. Then move your file to that directory. Then you can do put filename and it will drop the file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 16:12:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-file-from-application-server-to-ftp-server/m-p/1495084#M229902</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T16:12:58Z</dc:date>
    </item>
  </channel>
</rss>

