<?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: Get file from a URL using ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523651#M1656053</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;Try the code bellow.&lt;/P&gt;&lt;P&gt;If your server connects to URL through a proxy server then you need to specify the proxy settings&lt;/P&gt;&lt;P&gt;If your URL is protect by user name and password you need to fill USER and PASSWORD parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: lv_docid(80).

lv_docid = 'C:\my_file.pdf'.

CALL FUNCTION 'HTTP_GET_FILE'
  EXPORTING
    absolute_uri                = 'http://logosworld.com/www7/books/IDocBook/IDocBook.pdf'
*   RFC_DESTINATION             = 'SAPHTTP'
  " proxy                       = 'proxyserver:proxyport'
  " proxy_user                  = 'proxy_username'
  " proxy_password              = 'proxy_password'
*   USER                        =
*   PASSWORD                    =
    document_path               = lv_docid
*   TIMEOUT                     =
 IMPORTING
   status_code                 = lv_code
   status_text                 = lv_code_text
* TABLES
*   REQUEST_HEADERS             =
*   RESPONSE_HEADERS            =
 EXCEPTIONS
   connect_failed              = 1
   timeout                     = 2
   internal_error              = 3
   document_error              = 4
   tcpip_error                 = 5
   system_failure              = 6
   communication_failure       = 7
   OTHERS                      = 8
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jan 2012 16:48:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-01-30T16:48:19Z</dc:date>
    <item>
      <title>Get file from a URL using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523645#M1656047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Is it possible to donwload a file from a URL (ex: &lt;A href="http://logosworld.com/www7/books/IDocBook/IDocBook.pdf)" target="test_blank"&gt;http://logosworld.com/www7/books/IDocBook/IDocBook.pdf)&lt;/A&gt; into an ABAP program?&lt;/P&gt;&lt;P&gt;If yes, please suggest as to how it can be done.&lt;/P&gt;&lt;P&gt;I tried by FM HTTP_GET_FILE.... but unsuccess.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naoufel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 17:00:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523645#M1656047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T17:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get file from a URL using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523646#M1656048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i dont know of a way to do it through abap, so wait for other reponses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but one alternative is to use unix commands, and calling the unix command in your abap code to invoke the unix command.&lt;/P&gt;&lt;P&gt;unfortunatly even unix doent give you this functionality by default,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you need &lt;STRONG&gt;wget&lt;/STRONG&gt; an utility designed to download files from internet for unix, so your unix adminitrators of you sap ssystem need to install this utility and thn you can invoke this from your program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 17:39:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523646#M1656048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T17:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get file from a URL using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523647#M1656049</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;Check the below link.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;removed by moderator&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Raja.D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please do not post just links, explain why it is relevant when posting one.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Jan 27, 2012&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2012 18:08:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523647#M1656049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-26T18:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get file from a URL using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523648#M1656050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 09:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523648#M1656050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-27T09:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get file from a URL using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523649#M1656051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;Do you know the filenames that you are trying to retrieve and the logical path?  If so, you can try using function module FILE_GET_NAME_USING_PATH.  Singly, pass the filename and the logical path into the corresponding fields of the function module.  The export parameter(file_name_with_path) will generate your URL path.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF you don't know the file names and just have the URL already, you can call CALL_BROWSER with the new_window checked and that will generate a browser session.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 15:14:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523649#M1656051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-27T15:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get file from a URL using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523650#M1656052</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;I don't know the the path, i only have the url &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have to download the document by this url....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;Naoufel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 09:07:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523650#M1656052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-30T09:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get file from a URL using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523651#M1656053</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;Try the code bellow.&lt;/P&gt;&lt;P&gt;If your server connects to URL through a proxy server then you need to specify the proxy settings&lt;/P&gt;&lt;P&gt;If your URL is protect by user name and password you need to fill USER and PASSWORD parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: lv_docid(80).

lv_docid = 'C:\my_file.pdf'.

CALL FUNCTION 'HTTP_GET_FILE'
  EXPORTING
    absolute_uri                = 'http://logosworld.com/www7/books/IDocBook/IDocBook.pdf'
*   RFC_DESTINATION             = 'SAPHTTP'
  " proxy                       = 'proxyserver:proxyport'
  " proxy_user                  = 'proxy_username'
  " proxy_password              = 'proxy_password'
*   USER                        =
*   PASSWORD                    =
    document_path               = lv_docid
*   TIMEOUT                     =
 IMPORTING
   status_code                 = lv_code
   status_text                 = lv_code_text
* TABLES
*   REQUEST_HEADERS             =
*   RESPONSE_HEADERS            =
 EXCEPTIONS
   connect_failed              = 1
   timeout                     = 2
   internal_error              = 3
   document_error              = 4
   tcpip_error                 = 5
   system_failure              = 6
   communication_failure       = 7
   OTHERS                      = 8
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 16:48:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523651#M1656053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-30T16:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get file from a URL using ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523652#M1656054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi eacezar !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's Perfect !&lt;/P&gt;&lt;P&gt;Thank you very much !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naoufel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 17:20:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-file-from-a-url-using-abap/m-p/8523652#M1656054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-30T17:20:29Z</dc:date>
    </item>
  </channel>
</rss>

