<?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: How to read the HTML code from a webpage in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137623#M1513125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmmm interesting,&lt;/P&gt;&lt;P&gt;but isn't there a way to actually read the html? (the one that is sent to the web browser)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Aug 2010 11:33:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-11T11:33:45Z</dc:date>
    <item>
      <title>How to read the HTML code from a webpage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137621#M1513123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I want to be able to read the HTML code of a web page&lt;/P&gt;&lt;P&gt;In order to extract some info from some pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it using cl_http_client ? I played with that class a bit, but wih no sucess to what I need...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 09:14:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137621#M1513123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-11T09:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the HTML code from a webpage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137622#M1513124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure whether the HTML code of a webpage can be read in ABAP. But webservices can be invoked through it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sample-code-abap.blogspot.com/2009/05/simple-code-consume-web-service-using.html" target="test_blank"&gt;http://sample-code-abap.blogspot.com/2009/05/simple-code-consume-web-service-using.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 11:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137622#M1513124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-11T11:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the HTML code from a webpage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137623#M1513125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmmm interesting,&lt;/P&gt;&lt;P&gt;but isn't there a way to actually read the html? (the one that is sent to the web browser)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 11:33:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137623#M1513125</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-11T11:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the HTML code from a webpage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137624#M1513126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi RagnaRock,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the following form, hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ozcan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

form get_data_from_url using iv_url type clike changing iv_data type string.

DATA: HTTP_CLIENT TYPE REF TO IF_HTTP_CLIENT .
  clear  iv_data.

  CALL METHOD CL_HTTP_CLIENT=&amp;gt;CREATE_BY_URL
       EXPORTING
        URL                = IV_URL
*          PROXY_HOST         = '10.1.1.1'
*          PROXY_SERVICE      = '1234'
*       SSL_ID             =
       IMPORTING
         CLIENT             = HTTP_CLIENT
       EXCEPTIONS
         ARGUMENT_NOT_FOUND = 1
         PLUGIN_NOT_ACTIVE  = 2
         INTERNAL_ERROR     = 3
         OTHERS             = 4.

  CHECK SY-SUBRC = 0.

  CALL METHOD HTTP_CLIENT-&amp;gt;SEND
    EXCEPTIONS
      HTTP_COMMUNICATION_FAILURE = 1
      HTTP_INVALID_STATE         = 2.

  CHECK SY-SUBRC = 0.

  CALL METHOD HTTP_CLIENT-&amp;gt;RECEIVE
    EXCEPTIONS
      HTTP_COMMUNICATION_FAILURE = 1
      HTTP_INVALID_STATE         = 2
      HTTP_PROCESSING_FAILED     = 3.
  CHECK SY-SUBRC = 0.

  iv_data = HTTP_CLIENT-&amp;gt;RESPONSE-&amp;gt;GET_CDATA( ).

endform.                    "get_data_from_url
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ozcan Gurdal on Aug 11, 2010 4:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 14:04:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137624#M1513126</guid>
      <dc:creator>former_member848108</dc:creator>
      <dc:date>2010-08-11T14:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the HTML code from a webpage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137625#M1513127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also try with function module HTTP_GET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 14:12:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137625#M1513127</guid>
      <dc:creator>JerryWang</dc:creator>
      <dc:date>2010-08-11T14:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the HTML code from a webpage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137626#M1513128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've tried this, but I'm getting sy-subrc = 1 when I do the receive part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure the site exists and is online, what could be the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;edit&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;actually I only get subrc = 1 if I execute this code outside the form, If I do it just like you did, using:&lt;/P&gt;&lt;P&gt;PERFORM get_data_from_url USING 'http://www.jogosbaratos.net' CHANGING html_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always get subrc = 0 but html_code comes empty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: RagnaRock on Aug 11, 2010 5:05 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;edit2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;the http_get did work &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: RagnaRock on Aug 11, 2010 6:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 15:04:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137626#M1513128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-11T15:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the HTML code from a webpage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137627#M1513129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved this using the FM http_get, but I'm having some problems with the encoding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example if the webpage apears 'é' in my table apears 'Ã©'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any way to change the text enconding?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Aug 2010 09:42:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-the-html-code-from-a-webpage/m-p/7137627#M1513129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-23T09:42:51Z</dc:date>
    </item>
  </channel>
</rss>

