<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792341#M912169</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;one Possiblilty is  create a staging directory in the XI server then FTP the files to  that server using the 2methods,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- using this program to  FTp files outside of SAP&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: hdl                  TYPE i,
        compress             TYPE c VALUE 'N',
        ftp_command(200)     TYPE c,
        dest                 LIKE rfcdes-rfcdest VALUE 'SAPFTPA'.

  data : key type i value 26101957,
         dstlen type i .

  TRANSLATE command TO LOWER CASE.
  TRANSLATE transfer_type TO LOWER CASE.
  TRANSLATE verify TO UPPER CASE.

  CASE command.
    WHEN 'put'.
    WHEN 'get'.
    WHEN 'append'.
    WHEN OTHERS.
      RAISE command_error.
  ENDCASE.

  CASE transfer_type.
    WHEN 'ascii'.
    WHEN 'binary'.
    WHEN 'ebcdic'.
    WHEN 'image'.
    WHEN 'local m'.
    WHEN 'tenex'.
    WHEN ' '.
      transfer_type = 'ascii'.
    WHEN OTHERS.
      RAISE type_error.
  ENDCASE.

  CASE verify.
    WHEN 'Y' OR 'YES' OR ' '.
      verify = 'X'.
    WHEN OTHERS.
      verify = ' '.
  ENDCASE.

  IF sourcefile = ' ' AND command = 'put'.
    RAISE file_error.
  ENDIF.

  IF sourcefile = ' ' AND command = 'append'.
    RAISE file_error.
  ENDIF.

  IF targetfile = ' ' AND command = 'get'.
    RAISE file_error.
  ENDIF.

  CONCATENATE command sourcefile targetfile
    INTO ftp_command
    SEPARATED BY space.

**********

**********

  CALL FUNCTION 'FTP_CONNECT'
       EXPORTING
            user            = user
            password        = pwd
            host            = host
            rfc_destination = dest
       IMPORTING
            handle          = hdl
       EXCEPTIONS
            not_connected   = 8.

  CASE sy-subrc.
    WHEN 0.
    WHEN OTHERS.
      RAISE connection_error.
  ENDCASE.

  CALL FUNCTION 'FTP_COMMAND'
       EXPORTING
            handle        = hdl
            command       = transfer_type
       TABLES
            data          = data
       EXCEPTIONS
            command_error = 1
            tcpip_error   = 2
            data_error    = 3.

  CASE sy-subrc.
    WHEN 0.
    WHEN 1.
      RAISE command_error.
    WHEN 2.
      RAISE tcpip_error.
    WHEN 3.
      RAISE data_error.
    WHEN OTHERS.
      RAISE other_error.
  ENDCASE.

  CALL FUNCTION 'FTP_COMMAND'
       EXPORTING
            handle        = hdl
            command       = ftp_command
            compress      = compress
            verify        = verify
       TABLES
            data          = data
       EXCEPTIONS
            command_error = 1
            tcpip_error   = 2
            data_error    = 3.

  CASE sy-subrc.
    WHEN 0.
    WHEN 1.
      RAISE command_error.
    WHEN 2.
      RAISE tcpip_error.
    WHEN 3.
      RAISE data_error.
    WHEN OTHERS.
      RAISE other_error.
  ENDCASE.

  CALL FUNCTION 'FTP_DISCONNECT'
       EXPORTING
            handle = hdl.

ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2- Oresle use a UNIX script for transfering the file to  that XI server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 May 2008 08:38:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-15T08:38:31Z</dc:date>
    <item>
      <title>FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792338#M912166</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;We do have couple of interfaces where SAP needs to put their files into FTP server so that XI can pick it up and vice versa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of now the files are been put into Application server of SAP and sent manually via email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know the possible ways for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is most appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 08:21:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792338#M912166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-15T08:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792339#M912167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are trying to write files from SAP using ABAP to an FTP server for XI to process, you are missing the point to XI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be sending the data to XI via an ABAP proxy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 08:32:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792339#M912167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-15T08:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792340#M912168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So what exactly is your question? An alternative to email, or how to do FTP in SAP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. For FTP have a look at all the sample programs etc. in package SFTP.&lt;/P&gt;&lt;P&gt;2. Alternative would be to connect to XI via RFC for sending files. Create a generic FM which can handle all transfers (table of type STRING for example).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 08:35:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792340#M912168</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-05-15T08:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792341#M912169</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;one Possiblilty is  create a staging directory in the XI server then FTP the files to  that server using the 2methods,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- using this program to  FTp files outside of SAP&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: hdl                  TYPE i,
        compress             TYPE c VALUE 'N',
        ftp_command(200)     TYPE c,
        dest                 LIKE rfcdes-rfcdest VALUE 'SAPFTPA'.

  data : key type i value 26101957,
         dstlen type i .

  TRANSLATE command TO LOWER CASE.
  TRANSLATE transfer_type TO LOWER CASE.
  TRANSLATE verify TO UPPER CASE.

  CASE command.
    WHEN 'put'.
    WHEN 'get'.
    WHEN 'append'.
    WHEN OTHERS.
      RAISE command_error.
  ENDCASE.

  CASE transfer_type.
    WHEN 'ascii'.
    WHEN 'binary'.
    WHEN 'ebcdic'.
    WHEN 'image'.
    WHEN 'local m'.
    WHEN 'tenex'.
    WHEN ' '.
      transfer_type = 'ascii'.
    WHEN OTHERS.
      RAISE type_error.
  ENDCASE.

  CASE verify.
    WHEN 'Y' OR 'YES' OR ' '.
      verify = 'X'.
    WHEN OTHERS.
      verify = ' '.
  ENDCASE.

  IF sourcefile = ' ' AND command = 'put'.
    RAISE file_error.
  ENDIF.

  IF sourcefile = ' ' AND command = 'append'.
    RAISE file_error.
  ENDIF.

  IF targetfile = ' ' AND command = 'get'.
    RAISE file_error.
  ENDIF.

  CONCATENATE command sourcefile targetfile
    INTO ftp_command
    SEPARATED BY space.

**********

**********

  CALL FUNCTION 'FTP_CONNECT'
       EXPORTING
            user            = user
            password        = pwd
            host            = host
            rfc_destination = dest
       IMPORTING
            handle          = hdl
       EXCEPTIONS
            not_connected   = 8.

  CASE sy-subrc.
    WHEN 0.
    WHEN OTHERS.
      RAISE connection_error.
  ENDCASE.

  CALL FUNCTION 'FTP_COMMAND'
       EXPORTING
            handle        = hdl
            command       = transfer_type
       TABLES
            data          = data
       EXCEPTIONS
            command_error = 1
            tcpip_error   = 2
            data_error    = 3.

  CASE sy-subrc.
    WHEN 0.
    WHEN 1.
      RAISE command_error.
    WHEN 2.
      RAISE tcpip_error.
    WHEN 3.
      RAISE data_error.
    WHEN OTHERS.
      RAISE other_error.
  ENDCASE.

  CALL FUNCTION 'FTP_COMMAND'
       EXPORTING
            handle        = hdl
            command       = ftp_command
            compress      = compress
            verify        = verify
       TABLES
            data          = data
       EXCEPTIONS
            command_error = 1
            tcpip_error   = 2
            data_error    = 3.

  CASE sy-subrc.
    WHEN 0.
    WHEN 1.
      RAISE command_error.
    WHEN 2.
      RAISE tcpip_error.
    WHEN 3.
      RAISE data_error.
    WHEN OTHERS.
      RAISE other_error.
  ENDCASE.

  CALL FUNCTION 'FTP_DISCONNECT'
       EXPORTING
            handle = hdl.

ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2- Oresle use a UNIX script for transfering the file to  that XI server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 08:38:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792341#M912169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-15T08:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792342#M912170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;XI can do the file transfer for you. The main idea of having XI is to act as a mediator for transfering informations across different landscape or systems. Send your data to XI and then it can put it across to the desired destination. Ask your XI consultant for more information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 08:41:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792342#M912170</guid>
      <dc:creator>former_member226999</dc:creator>
      <dc:date>2008-05-15T08:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792343#M912171</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;Sorry, it is already too late.  As SAP is not sending via RFC, IDOC or Proxy, do let me know for any other alternative.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 08:45:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792343#M912171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-15T08:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792344#M912172</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;What do u mean by staging directory in XI? Can you be more specific on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 09:18:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792344#M912172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-15T09:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792345#M912173</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;The below program is to create file on FTP server by taking the data from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To see whether the file is created on the FTP server&lt;/P&gt;&lt;P&gt;use the function module FTP_SERVER_TO_R3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You write a same program with the function module FTP_SERVER_TO_R3 instead of &lt;/P&gt;&lt;P&gt;FTP_R3_TO_SERVER to check the existence of the file which is already created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: t777a.                        "Building Addresses&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table for  Building table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of it_t777a occurs 0,&lt;/P&gt;&lt;P&gt;        build like t777a-build,       "Building&lt;/P&gt;&lt;P&gt;        stext like t777a-stext,       "Object Name&lt;/P&gt;&lt;P&gt;        cname like t777a-cname,       "Address Supplement (c/o)&lt;/P&gt;&lt;P&gt;        ort01 like t777a-ort01,       "City&lt;/P&gt;&lt;P&gt;        pstlz like t777a-pstlz,       "Postal Code&lt;/P&gt;&lt;P&gt;        regio like t777a-regio,       "Region (State, Province, County)&lt;/P&gt;&lt;P&gt;      end of it_t777a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table for taking all fields of the above table in one line&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;separated by &amp;#145;|&amp;#146;(pipe).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_text occurs 0,&lt;/P&gt;&lt;P&gt;      text(131),&lt;/P&gt;&lt;P&gt;      end of it_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Constants: c_key  type i value 26101957,&lt;/P&gt;&lt;P&gt;           c_dest   type rfcdes-rfcdest value 'SAPFTPA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: g_dhdl type i,      "Handle&lt;/P&gt;&lt;P&gt;      g_dlen type i,      "pass word length&lt;/P&gt;&lt;P&gt;      g_dpwd(30).         "For storing password&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Selection Screen Starts&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE TEXT-001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_user(30) default 't777a'          obligatory,&lt;/P&gt;&lt;P&gt;            p_pwd(30)  default 't777a'          obligatory,&lt;/P&gt;&lt;P&gt;            p_host(64) default 'XXX.XXX.XX.XXX' obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK blk1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE TEXT-002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_file like rlgrap-filename default 't777a_feed.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK blk2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Password not visible.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;at Selection-screen output.&lt;/P&gt;&lt;P&gt;  loop at screen.&lt;/P&gt;&lt;P&gt;    if screen-name = 'P_PWD'.&lt;/P&gt;&lt;P&gt;      screen-invisible = '1'.&lt;/P&gt;&lt;P&gt;      modify screen.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_dpwd  = p_pwd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Start of selection&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To fetch the data records from the table T777A.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select build stext cname ort01 pstlz regio&lt;/P&gt;&lt;P&gt;         from t777a&lt;/P&gt;&lt;P&gt;         into table it_t777a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sort the internal table by build.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  if not it_t777a[] is initial.&lt;/P&gt;&lt;P&gt;    sort it_t777a by build.&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;Concatenate all the fields of above internal table records in one line&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;separated by &amp;#145;|&amp;#146;(pipe).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at it_t777a.&lt;/P&gt;&lt;P&gt;    concatenate it_t777a-build it_t777a-stext it_t777a-cname&lt;/P&gt;&lt;P&gt;                it_t777a-ort01 it_t777a-pstlz it_t777a-regio&lt;/P&gt;&lt;P&gt;                into it_text-text separated by '|'.&lt;/P&gt;&lt;P&gt;    append it_text.&lt;/P&gt;&lt;P&gt;    clear it_text.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; To get the length of the password.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  g_dlen = strlen( g_dpwd ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Below Function module is used to Encrypt the Password.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'HTTP_SCRAMBLE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      SOURCE      = g_dpwd          "Actual password&lt;/P&gt;&lt;P&gt;      SOURCELEN   = g_dlen&lt;/P&gt;&lt;P&gt;      KEY         = c_key&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      DESTINATION = g_dpwd.         "Encyrpted Password&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Connects to the FTP Server as specified by user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Call function 'SAPGUI_PROGRESS_INDICATOR'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      text = 'Connecting to FTP Server'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Below function module is used to connect the FTP Server.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;It Accepts only Encrypted Passwords.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;This Function module will provide a handle to perform different&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;operations on the FTP Server via FTP Commands.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&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            = p_user&lt;/P&gt;&lt;P&gt;      password        = g_dpwd&lt;/P&gt;&lt;P&gt;      host            = p_host&lt;/P&gt;&lt;P&gt;      rfc_destination = c_dest&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      handle          = g_dhdl&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;        NOT_CONNECTED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    format color col_negative.&lt;/P&gt;&lt;P&gt;    write:/ 'Error in Connection'.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    write:/ 'FTP Connection is opened '.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Transferring the data from internal table to FTP Server.&lt;/P&gt;&lt;P&gt;&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_dhdl&lt;/P&gt;&lt;P&gt;      FNAME          = p_file&lt;/P&gt;&lt;P&gt;      CHARACTER_MODE = 'X'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      TEXT           = it_text&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;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    write:/ 'File has created on FTP Server'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call function 'SAPGUI_PROGRESS_INDICATOR'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      text = 'File has created on FTP Server'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;To Disconnect the FTP Server.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&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 = g_dhdl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;To Disconnect the Destination.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'RFC_CONNECTION_CLOSE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      destination = c_dest&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      others      = 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 09:31:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792345#M912173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-15T09:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792346#M912174</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; I am sure i could help you ,i ve the scripts to do the FTP and i could give you by tommorrow as i dont ve all those scripts in my system now , for tha u need to know the receiving system ip address.&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, 15 May 2008 09:36:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792346#M912174</guid>
      <dc:creator>former_member842213</dc:creator>
      <dc:date>2008-05-15T09:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: FTP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792347#M912175</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; I think the best way is passing your data to XI using ABAP PROXY and than let the XI do the rest. However the optimized method which you're trying to find out is also up to your file format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2008 11:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp/m-p/3792347#M912175</guid>
      <dc:creator>huseyindereli</dc:creator>
      <dc:date>2008-05-15T11:15:36Z</dc:date>
    </item>
  </channel>
</rss>

