<?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 prob in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-prob/m-p/4639067#M1092089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi. Thank u for your reply. I tried your suggestion but still the file does not contain anything. It still has 0 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to move the contents of my internal table to new internal table with properties:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of i_blob occurs 0,&lt;/P&gt;&lt;P&gt;          contents(255),&lt;/P&gt;&lt;P&gt;         end of i_blob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_transit.&lt;/P&gt;&lt;P&gt;concatenate it_transit-CHARG it_transit-MATNR it_transit-MATKL&lt;/P&gt;&lt;P&gt;            it_transit-MTART it_transit-WERKS it_transit-RESWK&lt;/P&gt;&lt;P&gt;            it_transit-LGORT it_transit-MENGE it_transit-TEXT1&lt;/P&gt;&lt;P&gt;            it_transit-DCOD1 it_transit-DCOD2 it_transit-LTYPE&lt;/P&gt;&lt;P&gt;            it_transit-FWERK it_transit-AWERK it_transit-TWERK&lt;/P&gt;&lt;P&gt;    into i_blob-content separated by ','.&lt;/P&gt;&lt;P&gt;    append i_blob.&lt;/P&gt;&lt;P&gt;endloop.&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        = lt_hdl&lt;/P&gt;&lt;P&gt;          FNAME         = p_files&lt;/P&gt;&lt;P&gt;          BLOB_LENGTH   = lines&lt;/P&gt;&lt;P&gt;          character_mode = 'X'&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          BLOB          = i_blob  "p_transit&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;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Oct 2008 07:27:31 GMT</pubDate>
    <dc:creator>former_member593015</dc:creator>
    <dc:date>2008-10-20T07:27:31Z</dc:date>
    <item>
      <title>FTP prob</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-prob/m-p/4639065#M1092087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I am having a probem with my reqm'ts. I need to ftp file to another server. I am using FM ftp_r3_to_server. I am able to see the file in the server however the file does not contain anything but when I check the internal table that i'm passing, the internal table has data. Please see the my codes below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: LT_COMMAND(100) TYPE C,&lt;/P&gt;&lt;P&gt;      LT_HDL          TYPE I,&lt;/P&gt;&lt;P&gt;      LT_KEY          TYPE I VALUE 26101957,&lt;/P&gt;&lt;P&gt;      LT_SLEN         TYPE I,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      connection parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      LT_USER(30)     TYPE C VALUE 'dev_ftp',&lt;/P&gt;&lt;P&gt;      LT_PWD(30)      TYPE C VALUE 'qwerty123',&lt;/P&gt;&lt;P&gt;      LT_HOST(30)     TYPE C VALUE '10.100.15.76',&lt;/P&gt;&lt;P&gt;      LT_DEST         LIKE RFCDES-RFCDEST VALUE 'SAPFTP',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      BEGIN OF LITABT_RESULT OCCURS 0,&lt;/P&gt;&lt;P&gt;        LINE(100) TYPE C,&lt;/P&gt;&lt;P&gt;      END OF LITABT_RESULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH LITABT_RESULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR: LT_COMMAND(100),&lt;/P&gt;&lt;P&gt;         LT_HDL,&lt;/P&gt;&lt;P&gt;         LT_SLEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***scramble password&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SCRAMBLE_STRING'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            SOURCE = LT_PWD&lt;/P&gt;&lt;P&gt;            KEY    = LT_KEY&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            TARGET = LT_PWD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***connect to server&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'FTP_CONNECT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            USER            = LT_USER&lt;/P&gt;&lt;P&gt;            PASSWORD        = LT_PWD&lt;/P&gt;&lt;P&gt;            HOST            = LT_HOST&lt;/P&gt;&lt;P&gt;            RFC_DESTINATION = LT_DEST&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            HANDLE          = LT_HDL&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;  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;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*FTP_R3_TO_SERVERThis is used to transfer the internal table data as a&lt;/P&gt;&lt;P&gt;*file to other system in the character mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate 'cd' '/export/home/irabdev/dev/ftp/inbound/sap'&lt;/P&gt;&lt;P&gt;             into lt_command separated by space.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FTP_COMMAND'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          HANDLE        = lt_hdl&lt;/P&gt;&lt;P&gt;          COMMAND       = lt_command&lt;/P&gt;&lt;P&gt;          COMPRESS      = 'N'&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          DATA          = LITABT_RESULT&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;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear litabt_result.&lt;/P&gt;&lt;P&gt;refresh litabt_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: blob_length type i, lines type i.&lt;/P&gt;&lt;P&gt;describe table p_transit lines lines.&lt;/P&gt;&lt;P&gt;blob_length = lines.&lt;/P&gt;&lt;P&gt;clear lines.&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        = lt_hdl&lt;/P&gt;&lt;P&gt;          FNAME         = p_files   &amp;lt;filename: data.txt&amp;gt;&lt;/P&gt;&lt;P&gt;          BLOB_LENGTH   = lines&lt;/P&gt;&lt;P&gt;          character_mode = 'X'&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          BLOB          = p_transit   &amp;lt;internal table&amp;gt;&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;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;disconnect&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'FTP_DISCONNECT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      HANDLE = LT_HDL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;close connection&lt;/P&gt;&lt;/LI&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 = LT_DEST&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS      = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please let me know what to do to successfully put the data to the server.&lt;/P&gt;&lt;P&gt;Helpful suggestions will be rewarded with points. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 06:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-prob/m-p/4639065#M1092087</guid>
      <dc:creator>former_member593015</dc:creator>
      <dc:date>2008-10-20T06:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: FTP prob</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-prob/m-p/4639066#M1092088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try in this way because SAP will use this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: bindata type table of blob with header line,&lt;/P&gt;&lt;P&gt;      blob_length type i,&lt;/P&gt;&lt;P&gt;docid like sysuuid-c,&lt;/P&gt;&lt;P&gt;      hdl type i,&lt;/P&gt;&lt;P&gt;&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      = hdl&lt;/P&gt;&lt;P&gt;      fname       = docid&lt;/P&gt;&lt;P&gt;      blob_length = blob_length&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      blob        = bindata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try in this way u may get any idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 06:29:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-prob/m-p/4639066#M1092088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-20T06:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: FTP prob</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-prob/m-p/4639067#M1092089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi. Thank u for your reply. I tried your suggestion but still the file does not contain anything. It still has 0 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to move the contents of my internal table to new internal table with properties:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of i_blob occurs 0,&lt;/P&gt;&lt;P&gt;          contents(255),&lt;/P&gt;&lt;P&gt;         end of i_blob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_transit.&lt;/P&gt;&lt;P&gt;concatenate it_transit-CHARG it_transit-MATNR it_transit-MATKL&lt;/P&gt;&lt;P&gt;            it_transit-MTART it_transit-WERKS it_transit-RESWK&lt;/P&gt;&lt;P&gt;            it_transit-LGORT it_transit-MENGE it_transit-TEXT1&lt;/P&gt;&lt;P&gt;            it_transit-DCOD1 it_transit-DCOD2 it_transit-LTYPE&lt;/P&gt;&lt;P&gt;            it_transit-FWERK it_transit-AWERK it_transit-TWERK&lt;/P&gt;&lt;P&gt;    into i_blob-content separated by ','.&lt;/P&gt;&lt;P&gt;    append i_blob.&lt;/P&gt;&lt;P&gt;endloop.&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        = lt_hdl&lt;/P&gt;&lt;P&gt;          FNAME         = p_files&lt;/P&gt;&lt;P&gt;          BLOB_LENGTH   = lines&lt;/P&gt;&lt;P&gt;          character_mode = 'X'&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          BLOB          = i_blob  "p_transit&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;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 07:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-prob/m-p/4639067#M1092089</guid>
      <dc:creator>former_member593015</dc:creator>
      <dc:date>2008-10-20T07:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: FTP prob</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-prob/m-p/4639068#M1092090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to compute for the blob_length?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2008 09:24:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-prob/m-p/4639068#M1092090</guid>
      <dc:creator>former_member593015</dc:creator>
      <dc:date>2008-10-20T09:24:36Z</dc:date>
    </item>
  </channel>
</rss>

