<?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 Problems with FTP_SERVER_TO_R3 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-ftp-server-to-r3/m-p/925295#M59736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am trying to use FTP to bring a text file from an FTP server to an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we had to apply an OSS notethat allowed us to use the "character_mode" switch. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is, when i use charactermode = 'X' and supply a table for the TEXT parameter, i get NOTHING in the text table. I still get data in the BLOB table (i have to pass this becuase it is not optional), but nothing in the TEXT table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BLOB table does not separate the data based on CRLF, which is what i am looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked prior messages, and OSS, without much luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 May 2005 16:49:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-05-17T16:49:42Z</dc:date>
    <item>
      <title>Problems with FTP_SERVER_TO_R3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-ftp-server-to-r3/m-p/925295#M59736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am trying to use FTP to bring a text file from an FTP server to an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we had to apply an OSS notethat allowed us to use the "character_mode" switch. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is, when i use charactermode = 'X' and supply a table for the TEXT parameter, i get NOTHING in the text table. I still get data in the BLOB table (i have to pass this becuase it is not optional), but nothing in the TEXT table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BLOB table does not separate the data based on CRLF, which is what i am looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked prior messages, and OSS, without much luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2005 16:49:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-ftp-server-to-r3/m-p/925295#M59736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-17T16:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with FTP_SERVER_TO_R3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-ftp-server-to-r3/m-p/925296#M59737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David:&lt;/P&gt;&lt;P&gt; I am assuming your SAP System runs on Windows NT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If you are looking to get a text file from FTP Server to an Internal Table, I would suggest first transfer the file to a location in your SAP App Server.You can use FMs FTP_CONNECT,FTP_COMMAND,FTP_CLOSE.Then read the file from your SAP App. Server in to a ITAB using DATASET Commands(Open Dataset, Transfer Dataset).Then on successfull read Delete the dataset in the App Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code to FTP a file from a remote FTP server to SAP App Server.&lt;/P&gt;&lt;P&gt;l_filespec - SAP App server file path&lt;/P&gt;&lt;P&gt;r_filespec - FTP Server file path&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code, use the RFC Destination 'sapftp' and it will be generated automatically when it establishes the first connection.Also make sure FTP Service is running in your FTP Server and you use the right user id / password / domain for logon and you have read/write access to the folder from which the file needs to be fetched.&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;FUNCTION Z_EXEC_SIMPLE_FTP.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(I_REMOTE_HOST) TYPE  C&lt;/P&gt;&lt;P&gt;*"     VALUE(I_USERID) TYPE  C DEFAULT SPACE&lt;/P&gt;&lt;P&gt;*"     VALUE(I_PASSWORD) TYPE  C DEFAULT SPACE&lt;/P&gt;&lt;P&gt;*"     VALUE(I_LOCAL_PATH) TYPE  C DEFAULT SPACE&lt;/P&gt;&lt;P&gt;*"     VALUE(I_LOCAL_FILE) TYPE  C DEFAULT SPACE&lt;/P&gt;&lt;P&gt;*"     VALUE(I_REMOTE_PATH) TYPE  C DEFAULT SPACE&lt;/P&gt;&lt;P&gt;*"     VALUE(I_REMOTE_FILE) TYPE  C DEFAULT SPACE&lt;/P&gt;&lt;P&gt;*"     VALUE(I_PUT_TO_REMOTE_HOST) TYPE  C DEFAULT SPACE&lt;/P&gt;&lt;P&gt;*"     VALUE(I_DESTINATION) LIKE  RFCDES-RFCDEST DEFAULT 'SAPFTP'&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      DATA&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      NOT_CONNECTED&lt;/P&gt;&lt;P&gt;*"      TCPIP_ERROR&lt;/P&gt;&lt;P&gt;*"      COMMAND_ERROR&lt;/P&gt;&lt;P&gt;*"      DATA_ERROR&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&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;&lt;/P&gt;&lt;P&gt;  MC_PASSWORD = I_PASSWORD.&lt;/P&gt;&lt;P&gt;  DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.&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;&lt;/P&gt;&lt;P&gt;*Set FTP File Paths&lt;/P&gt;&lt;P&gt;  CONCATENATE i_local_path  i_local_file  INTO l_filespec.&lt;/P&gt;&lt;P&gt;  CONCATENATE i_remote_path i_remote_file INTO r_filespec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*FTP Connect&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&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            = I_USERID&lt;/P&gt;&lt;P&gt;            PASSWORD        = MC_PASSWORD&lt;/P&gt;&lt;P&gt;            ACCOUNT         = '&amp;lt;Your Domain Name&amp;gt;'&lt;/P&gt;&lt;P&gt;            HOST            = I_REMOTE_HOST&lt;/P&gt;&lt;P&gt;            RFC_DESTINATION = I_DESTINATION&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            HANDLE          = FTP_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;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO WITH&lt;/P&gt;&lt;P&gt;               SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4&lt;/P&gt;&lt;P&gt;               RAISING NOT_CONNECTED.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*FTP Command&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get without semaphore...&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE 'get' r_filespec l_filespec&lt;/P&gt;&lt;P&gt;                    INTO l_command SEPARATED BY space.&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        = ftp_handle&lt;/P&gt;&lt;P&gt;            command       = l_command&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            data          = T_FTP_RESPONSE&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;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*FTP Close&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&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 'FTP_DISCONNECT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            handle = ftp_handle&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            OTHERS = 1.&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt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;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2005 19:35:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-ftp-server-to-r3/m-p/925296#M59737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-17T19:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with FTP_SERVER_TO_R3</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-ftp-server-to-r3/m-p/925297#M59738</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 want to download the file from FTP server to APP server.&lt;/P&gt;&lt;P&gt;I have used FTP FM for doing the same.The problem is when am using get command and want to specify the path in appserver..it is giving me an error path not found error?Can anyone give me more info?Is the file gets downloaded to any default directory in appserver?If yes can u plz help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 15:38:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-ftp-server-to-r3/m-p/925297#M59738</guid>
      <dc:creator>STALANKI</dc:creator>
      <dc:date>2005-08-18T15:38:33Z</dc:date>
    </item>
  </channel>
</rss>

