<?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 open file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282769#M1388570</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;{&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;}
Code Here
{&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Oct 2009 15:39:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-26T15:39:49Z</dc:date>
    <item>
      <title>FTP open file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282763#M1388564</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 have to open a file from a server and use the FM CALL FUNCTION 'FTP_COMMAND' to reach to directory, anyone know the command ftp to open the file in directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Eduardo Paiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 12:04:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282763#M1388564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-26T12:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: FTP open file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282764#M1388565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;you can reach to FTP server..i dont think there is any command avaliable to open the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to edit that file then jst copy it, edit it and dump it back to the ftp server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnkx&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 13:18:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282764#M1388565</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2009-10-26T13:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: FTP open file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282765#M1388566</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;you can use this code to do the FTP, feild UNIXCOMMAND will hold the name of the UNIX command from sm69.  This command is linked to the shell script you create.   You can use this link to show you know to create the FTP shell script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://datadictionary.blogspot.com/2006/08/unix-shell-script-to-transfer-files.html" target="test_blank"&gt;http://datadictionary.blogspot.com/2006/08/unix-shell-script-to-transfer-files.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The shell script has to be located in the appropriate run folder on UNIX by your basis team so that the script runs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;** These commands must be set up in transaction SM69 first **
  DATA: STATUS LIKE BTCXP3-EXITSTAT.

  DATA: BEGIN OF EXEC_PROTOCOL OCCURS 0.
          INCLUDE STRUCTURE BTCXPM.
  DATA: END OF EXEC_PROTOCOL.

  CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
       EXPORTING
            COMMANDNAME                   = UNIXCOMMAND
            TERMINATIONWAIT               = 'X'
            ADDITIONAL_PARAMETERS         = UNIXPARAMS
       IMPORTING
            STATUS                        = STATUS
       TABLES
            EXEC_PROTOCOL                 = EXEC_PROTOCOL
       EXCEPTIONS
            NO_PERMISSION                 = 1
            COMMAND_NOT_FOUND             = 2
            PARAMETERS_TOO_LONG           = 3
            SECURITY_RISK                 = 4
            WRONG_CHECK_CALL_INTERFACE    = 5
            PROGRAM_START_ERROR           = 6
            PROGRAM_TERMINATION_ERROR     = 7
            X_ERROR                       = 8
            PARAMETER_EXPECTED            = 9
            TOO_MANY_PARAMETERS           = 10
            ILLEGAL_COMMAND               = 11
            WRONG_ASYNCHRONOUS_PARAMETERS = 12
            CANT_ENQ_TBTCO_ENTRY          = 13
            JOBCOUNT_GENERATION_ERROR     = 14
            OTHERS                        = 15.


  IF SY-SUBRC NE 0 OR STATUS = 'E'.
    RAISE NOTEXECUTED.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 13:21:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282765#M1388566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-26T13:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: FTP open file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282766#M1388567</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 server that i have to reach isn't a server SAP, i can use FM CALL FUNCTION 'SXPG_COMMAND_EXECUTE' ?&lt;/P&gt;&lt;P&gt;I have a user FTP to logon into the server and with this function a can't logon put the user and password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Eduardo Paiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 13:59:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282766#M1388567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-26T13:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: FTP open file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282767#M1388568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi,
&amp;lt;li&amp;gt;Command should be &lt;STRONG&gt;GET&lt;/STRONG&gt; .
&amp;lt;li&amp;gt;Try this way.
&lt;PRE&gt;&lt;CODE&gt;
 "Call FTP_CONNECT function module to open 
 DATA:cmd(120) type C.
 cmd = 'get d:\temp\test.txt'. "GET is command to Copy a file from the remote system to the local system
 CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
      handle        = mi_handle
      command       = cmd
    TABLES
      data          = it_data
    EXCEPTIONS
      tcpip_error   = 1
      command_error = 2
      data_error    = 3
      OTHERS        = 4.
 "Call FTP_DISCONNECT to close FTP connection&lt;/CODE&gt;&lt;/PRE&gt;
Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 15:12:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282767#M1388568</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-10-26T15:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: FTP open file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282768#M1388569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this using the functions below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="CODE"&gt;

  CALL FUNCTION 'FTP_CONNECT'
       EXPORTING
            user            = user
            password        = pass
            host            = host
            rfc_destination = p_rfc
       IMPORTING
            handle          = ftphandle
       EXCEPTIONS
            not_connected   = 1
            OTHERS          = 2.

  CALL FUNCTION 'FTP_COMMAND'
       EXPORTING
            handle        = ftphandle
            command       = 'set passive on'
       TABLES
            data          = lines
       EXCEPTIONS
            tcpip_error   = 1
            command_error = 2
            data_error    = 3.

    CALL FUNCTION 'FTP_SERVER_TO_R3'
         EXPORTING
              handle      = ftphandle
              fname       = gt_fname-fname
         IMPORTING
              blob_length = blen
         TABLES
              blob        = blob_orj.



  CALL FUNCTION 'FTP_DISCONNECT'
       EXPORTING
            handle = ftphandle.
  CLEAR ftphandle.

&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 15:37:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282768#M1388569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-26T15:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: FTP open file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282769#M1388570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;{&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;}
Code Here
{&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 15:39:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282769#M1388570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-26T15:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: FTP open file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282770#M1388571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt; try 33 &lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 15:40:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282770#M1388571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-26T15:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: FTP open file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282771#M1388572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt; last
try &lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 15:42:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ftp-open-file/m-p/6282771#M1388572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-26T15:42:19Z</dc:date>
    </item>
  </channel>
</rss>

