<?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 FTP between two different servers in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-between-two-different-servers/m-p/1598630#M268794</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;I have two different servers viz, my Application Server and a Non-SAP server on which i have a file.&lt;/P&gt;&lt;P&gt;I receive a File on this Non-SAP server every hour.&lt;/P&gt;&lt;P&gt;I want to transfer this File From the Non-SAP server to my Application Server, so that i can use the File for further processing.&lt;/P&gt;&lt;P&gt;Any inputs on how do i map both the servers. I have connection with both the servers on my PC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Neo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Oct 2006 06:11:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-18T06:11:27Z</dc:date>
    <item>
      <title>FTP between two different servers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-between-two-different-servers/m-p/1598630#M268794</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;I have two different servers viz, my Application Server and a Non-SAP server on which i have a file.&lt;/P&gt;&lt;P&gt;I receive a File on this Non-SAP server every hour.&lt;/P&gt;&lt;P&gt;I want to transfer this File From the Non-SAP server to my Application Server, so that i can use the File for further processing.&lt;/P&gt;&lt;P&gt;Any inputs on how do i map both the servers. I have connection with both the servers on my PC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Neo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 06:11:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-between-two-different-servers/m-p/1598630#M268794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-18T06:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: FTP between two different servers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-between-two-different-servers/m-p/1598631#M268795</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;Check the following code. It should help u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA l_handle_src TYPE i.&lt;/P&gt;&lt;P&gt;  DATA l_handle_dst TYPE i.&lt;/P&gt;&lt;P&gt;  DATA s_pswd(64) TYPE c VALUE  'traning'.&lt;/P&gt;&lt;P&gt;  DATA d_pswd(64) TYPE c VALUE  'hponly'.&lt;/P&gt;&lt;P&gt;  DATA l_key      TYPE i VALUE 26101957.&lt;/P&gt;&lt;P&gt;  DATA l_dstlen   TYPE i.&lt;/P&gt;&lt;P&gt;  DATA l_command(60) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  describe field s_pswd length l_dstlen in character mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Source FTP&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This system function will Encrypt the password&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL 'AB_RFC_X_SCRAMBLE_STRING'&lt;/P&gt;&lt;P&gt;    ID 'SOURCE'      FIELD s_pswd ID 'KEY'         FIELD l_key&lt;/P&gt;&lt;P&gt;    ID 'SCR'         FIELD 'X'    ID 'DESTINATION' FIELD s_pswd&lt;/P&gt;&lt;P&gt;    ID 'DSTLEN'      FIELD l_dstlen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This Function Module returns a handle, which is the pointer to the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;instance of FTP&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'FTP_CONNECT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            user            = 'traning'&lt;/P&gt;&lt;P&gt;            password        = s_pswd&lt;/P&gt;&lt;P&gt;            host            = '172.16.0.122'&lt;/P&gt;&lt;P&gt;            rfc_destination = 'SAPFTPA'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            handle          = l_handle_src&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;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  describe field d_pswd length l_dstlen in character mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Destination FTP&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;  CALL 'AB_RFC_X_SCRAMBLE_STRING'&lt;/P&gt;&lt;P&gt;    ID 'SOURCE'      FIELD d_pswd ID 'KEY'         FIELD l_key&lt;/P&gt;&lt;P&gt;    ID 'SCR'         FIELD 'X'    ID 'DESTINATION' FIELD d_pswd&lt;/P&gt;&lt;P&gt;    ID 'DSTLEN'      FIELD l_dstlen.&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;            user            = 'root'&lt;/P&gt;&lt;P&gt;            password        = d_pswd&lt;/P&gt;&lt;P&gt;            host            = '172.10.0.13'&lt;/P&gt;&lt;P&gt;            rfc_destination = 'SAPFTPA'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            handle          = l_handle_dst&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;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Set the Source And Destination File Names&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------" /&gt;&lt;P&gt;  DATA: l_source_file  LIKE rlgrap-filename&lt;/P&gt;&lt;P&gt;             VALUE     '/FLS_TEXT/',&lt;/P&gt;&lt;P&gt;        l_dest_file(256) TYPE c&lt;/P&gt;&lt;P&gt;             VALUE     '/tmp/'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF response OCCURS 0,&lt;/P&gt;&lt;P&gt;        line(80) TYPE c,&lt;/P&gt;&lt;P&gt;        END OF response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONCATENATE l_source_file filename '.txt' INTO l_source_file.&lt;/P&gt;&lt;P&gt;  CONCATENATE l_dest_file   'FLS_DATA' '.txt' INTO l_dest_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Copy the File from the Source Machine to the Application Server&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------" /&gt;&lt;P&gt;  CALL FUNCTION 'FTP_COPY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            handle_source      = l_handle_src&lt;/P&gt;&lt;P&gt;            handle_destination = l_handle_dst&lt;/P&gt;&lt;P&gt;            file_source        = l_source_file&lt;/P&gt;&lt;P&gt;            file_destination   = l_dest_file&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            data               = response&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            command_error      = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    LOOP AT response.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ELSE.&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 = l_handle_src.&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 = l_handle_dst.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 07:11:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-between-two-different-servers/m-p/1598631#M268795</guid>
      <dc:creator>rajeshkumar_kaveti</dc:creator>
      <dc:date>2006-10-18T07:11:38Z</dc:date>
    </item>
  </channel>
</rss>

