<?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: File Transfer Toolusing File Trandsfer Protocol in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-toolusing-file-trandsfer-protocol/m-p/6039537#M1350671</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Himanshu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  See the below code for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    g_dlen = STRLEN( p_pwd ).
 
***Below Function module is used to Encrypt the Password
  CALL FUNCTION 'HTTP_SCRAMBLE'
    EXPORTING
      SOURCE      = p_pwd "Actual password
      sourcelen   = g_dlen
      key         = c_key
    IMPORTING
      destination = g_dpwd. "Encyrpted Password
 
 
  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
      text = 'Connecting to FTP Server'(300).
 
***Connecting to FTP Server
  CALL FUNCTION 'FTP_CONNECT'
    EXPORTING
      user            = p_user
      password        = g_dpwd
      host            = p_path
      rfc_destination = c_dest
    IMPORTING
      handle          = g_dhdl
    EXCEPTIONS
      not_connected   = 1
      OTHERS          = 2.
  IF sy-subrc NE 0.
    MESSAGE s000 WITH 'Error in Connection'(250).
  ELSE.
    MESSAGE s000 WITH 'FTP Connection is Opened'(251).
  ENDIF.
 
 
***Transferring the data from internal table to FTP Server.
  CALL FUNCTION 'FTP_R3_TO_SERVER'
    EXPORTING
      handle         = g_dhdl
      fname          = g_filename
      character_mode = c_x
    TABLES
      text           = lt_table
    EXCEPTIONS
      tcpip_error    = 1
      command_error  = 2
      data_error     = 3
      OTHERS         = 4.
 
  IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
    MESSAGE s000 WITH 'File Has Been Created on FTP Server'(252).
  ENDIF.
 
 
 
**To Disconnect the FTP Server
  CALL FUNCTION 'FTP_DISCONNECT'
    EXPORTING
      handle = g_dhdl.
 

  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vimal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2009 09:17:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-13T09:17:27Z</dc:date>
    <item>
      <title>File Transfer Toolusing File Trandsfer Protocol</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-toolusing-file-trandsfer-protocol/m-p/6039536#M1350670</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 am preparing a file transfer tool for transfering files from SAP to non SAP sysem and also Viceversa.&lt;/P&gt;&lt;P&gt;I need to use FILE TRANSFER PROTOCOL for the tool.&lt;/P&gt;&lt;P&gt;Can some body helps me out how to proceed and what all function modules can be used for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember that i need to use only FILE TRANSFER PROTOCOL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 08:09:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-toolusing-file-trandsfer-protocol/m-p/6039536#M1350670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T08:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: File Transfer Toolusing File Trandsfer Protocol</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-toolusing-file-trandsfer-protocol/m-p/6039537#M1350671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Himanshu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  See the below code for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    g_dlen = STRLEN( p_pwd ).
 
***Below Function module is used to Encrypt the Password
  CALL FUNCTION 'HTTP_SCRAMBLE'
    EXPORTING
      SOURCE      = p_pwd "Actual password
      sourcelen   = g_dlen
      key         = c_key
    IMPORTING
      destination = g_dpwd. "Encyrpted Password
 
 
  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
      text = 'Connecting to FTP Server'(300).
 
***Connecting to FTP Server
  CALL FUNCTION 'FTP_CONNECT'
    EXPORTING
      user            = p_user
      password        = g_dpwd
      host            = p_path
      rfc_destination = c_dest
    IMPORTING
      handle          = g_dhdl
    EXCEPTIONS
      not_connected   = 1
      OTHERS          = 2.
  IF sy-subrc NE 0.
    MESSAGE s000 WITH 'Error in Connection'(250).
  ELSE.
    MESSAGE s000 WITH 'FTP Connection is Opened'(251).
  ENDIF.
 
 
***Transferring the data from internal table to FTP Server.
  CALL FUNCTION 'FTP_R3_TO_SERVER'
    EXPORTING
      handle         = g_dhdl
      fname          = g_filename
      character_mode = c_x
    TABLES
      text           = lt_table
    EXCEPTIONS
      tcpip_error    = 1
      command_error  = 2
      data_error     = 3
      OTHERS         = 4.
 
  IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
    MESSAGE s000 WITH 'File Has Been Created on FTP Server'(252).
  ENDIF.
 
 
 
**To Disconnect the FTP Server
  CALL FUNCTION 'FTP_DISCONNECT'
    EXPORTING
      handle = g_dhdl.
 

  &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vimal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 09:17:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-transfer-toolusing-file-trandsfer-protocol/m-p/6039537#M1350671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T09:17:27Z</dc:date>
    </item>
  </channel>
</rss>

