<?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: Call url from ABAP program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471531#M221575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the fm: call_browser:&lt;/P&gt;&lt;P&gt;Sample usage:&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'CALL_BROWSER'&lt;/P&gt;&lt;P&gt;             EXPORTING&lt;/P&gt;&lt;P&gt;                URL                    = 'www.yahoo.com'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                BROWSER_TYPE           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                CONTEXTSTRING          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             EXCEPTIONS&lt;/P&gt;&lt;P&gt;                  FRONTEND_NOT_SUPPORTED = 1&lt;/P&gt;&lt;P&gt;                  FRONTEND_ERROR         = 2&lt;/P&gt;&lt;P&gt;                  PROG_NOT_FOUND         = 3&lt;/P&gt;&lt;P&gt;                  NO_BATCH               = 4&lt;/P&gt;&lt;P&gt;                  UNSPECIFIED_ERROR      = 5&lt;/P&gt;&lt;P&gt;                  OTHERS                 = 6.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Aug 2006 10:02:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-30T10:02:15Z</dc:date>
    <item>
      <title>Call url from ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471528#M221572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we call a web URL from a ABAP program?&lt;/P&gt;&lt;P&gt;Is there anyway its possible ? if yes how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;kapil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 09:56:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471528#M221572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T09:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Call url from ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471529#M221573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TRY this..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zp_test_web4 .


call method cl_gui_frontend_services=&amp;gt;execute
  exporting
    document = 'http://www.sap.com'
  exceptions
    others   = 1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 10:00:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471529#M221573</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-08-30T10:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Call url from ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471530#M221574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Inserting Website Links in ABAP &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ABAP with web links&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creates a list that has a couple of active URL links embedded.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;By single-clicking on these links a web browser will popup and display&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;the corresponding web page.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Written by : SAP Basis, ABAP Programming and Other IMG Stuff&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             &lt;A href="http://www.sap-img.com" target="test_blank"&gt;http://www.sap-img.com&lt;/A&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;REPORT ZURL NO STANDARD PAGE HEADING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF URL_TABLE OCCURS 10,&lt;/P&gt;&lt;P&gt;L(25),&lt;/P&gt;&lt;P&gt;END OF URL_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;URL_TABLE-L = 'http://www.lycos.com'.APPEND URL_TABLE.&lt;/P&gt;&lt;P&gt;URL_TABLE-L = 'http://www.hotbot.com'.APPEND URL_TABLE.&lt;/P&gt;&lt;P&gt;URL_TABLE-L = 'http://www.sap.com'.APPEND URL_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT URL_TABLE.&lt;/P&gt;&lt;P&gt;  SKIP. FORMAT INTENSIFIED OFF.&lt;/P&gt;&lt;P&gt;  WRITE: / 'Single click on '.&lt;/P&gt;&lt;P&gt;  FORMAT HOTSPOT ON.FORMAT INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;  WRITE: URL_TABLE. HIDE URL_TABLE.&lt;/P&gt;&lt;P&gt;  FORMAT HOTSPOT OFF.FORMAT INTENSIFIED OFF.&lt;/P&gt;&lt;P&gt;  WRITE: 'to go to', URL_TABLE.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;CLEAR URL_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT URL_TABLE IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WS_EXECUTE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            program = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE'&lt;/P&gt;&lt;P&gt;            commandline     = URL_TABLE&lt;/P&gt;&lt;P&gt;            INFORM         = ''&lt;/P&gt;&lt;P&gt;          EXCEPTIONS&lt;/P&gt;&lt;P&gt;            PROG_NOT_FOUND = 1.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;     WRITE:/ 'Cannot find program to open Internet'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- End of Program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 10:01:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471530#M221574</guid>
      <dc:creator>Bema</dc:creator>
      <dc:date>2006-08-30T10:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Call url from ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471531#M221575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the fm: call_browser:&lt;/P&gt;&lt;P&gt;Sample usage:&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'CALL_BROWSER'&lt;/P&gt;&lt;P&gt;             EXPORTING&lt;/P&gt;&lt;P&gt;                URL                    = 'www.yahoo.com'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                BROWSER_TYPE           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                CONTEXTSTRING          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             EXCEPTIONS&lt;/P&gt;&lt;P&gt;                  FRONTEND_NOT_SUPPORTED = 1&lt;/P&gt;&lt;P&gt;                  FRONTEND_ERROR         = 2&lt;/P&gt;&lt;P&gt;                  PROG_NOT_FOUND         = 3&lt;/P&gt;&lt;P&gt;                  NO_BATCH               = 4&lt;/P&gt;&lt;P&gt;                  UNSPECIFIED_ERROR      = 5&lt;/P&gt;&lt;P&gt;                  OTHERS                 = 6.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 10:02:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471531#M221575</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T10:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Call url from ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471532#M221576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Kapil,&lt;/P&gt;&lt;P&gt; Check out this thread..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1400591"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function 'CALL_BROWSER'
exporting
   url = 'C:Documents and SettingshemantgDesktopnew.html'
   exceptions
     frontend_not_supported = 1
     frontend_error = 2
     prog_not_found = 3
     no_batch = 4
     unspecified_error = 5
      others = 6.
if sy-subrc &amp;lt;&amp;gt; 0.
 message id sy-msgid type sy-msgty number sy-msgno
 with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;santosh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Santosh Kumar P&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 10:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471532#M221576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T10:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Call url from ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471533#M221577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;call this function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HR_URL_CALL_BROWSER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass your URL to the URL field of this function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;srikanth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Srikanth Kidambi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 10:05:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471533#M221577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T10:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Call url from ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471534#M221578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kapil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Look at the below example program:-&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  zget_mayors_for_cities.

DATA: it_citymayors TYPE TABLE OF zcitymayors,
      wa_citymayors LIKE LINE OF it_citymayors,
      mayor TYPE full_name,
      trash TYPE string.
 
PARAMETERS: s_city TYPE s_city LOWER CASE.
 
SELECT * FROM zcitymayors INTO TABLE it_citymayors
  WHERE city LIKE s_city.
 
* HTTP Client according to
* /people/thomas.jung3/blog/2005/07/01/bsp-create-a-weather-magnet-using-xml-feed-from-weathercom
 
DATA: client TYPE REF TO if_http_client,
      &amp;lt;b&amp;gt;url TYPE string,&amp;lt;/b&amp;gt;
      xml TYPE xstring,
      c_xml TYPE string,
      city TYPE string.
 
* Converter
DATA: l_convin   TYPE REF TO cl_abap_conv_in_ce.
 
LOOP AT it_citymayors INTO wa_citymayors.
* Use the Progress Indicator to show the user which City is processed
  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
      percentage = sy-index
      text       = wa_citymayors-city.
 
  city = wa_citymayors-city.
* Spaces have to be replaced by _ in the URL
  REPLACE FIRST OCCURRENCE OF space IN city WITH '_'.
 
&amp;lt;b&amp;gt;  CONCATENATE
    'http://de.wikipedia.org/wiki/Spezial:Export/' city
       INTO url.&amp;lt;/b&amp;gt;
 
****Create the HTTP client
  TRY.
&amp;lt;b&amp;gt;      CALL METHOD cl_http_client=&amp;gt;create_by_url
        EXPORTING
          url    = url
        IMPORTING
          client = client
        EXCEPTIONS
          OTHERS = 1.&amp;lt;/b&amp;gt;
 
      client-&amp;gt;send( ).
      client-&amp;gt;receive( ).
 
      xml = client-&amp;gt;response-&amp;gt;get_data( ).
      client-&amp;gt;close( ).
    CATCH cx_root.
      WRITE: / 'HTTP Connection error: ', city.
  ENDTRY.
* Wikipedia does not provide a encoding with the returned XML
* so we have to do the conversion manually
  TRY.
      CALL METHOD cl_abap_conv_in_ce=&amp;gt;create
        EXPORTING
          encoding = 'UTF-8'
          input    = xml
          endian   = 'L'
        RECEIVING
          conv     = l_convin.
 
      CALL METHOD l_convin-&amp;gt;read
        IMPORTING
          data = c_xml.
    CATCH cx_root.
      WRITE: / 'Problem during Character conversion: ', city.
  ENDTRY.
****Transform XML to ABAP Values
  TRY.
      CALL TRANSFORMATION zwikipedia_mayor_to_abap
      SOURCE XML c_xml
      RESULT mayor = mayor.
    CATCH cx_root.
      WRITE: / 'Data loss during transformation: ', city.
  ENDTRY.
* Some Mayors already have pecial Pages
  REPLACE FIRST OCCURRENCE OF '[[' IN mayor WITH ''.
  REPLACE FIRST OCCURRENCE OF ']]' IN mayor WITH ''.
* Some Mayors are members of a Party
  SPLIT mayor AT '(' INTO mayor trash.
  wa_citymayors-mayor = mayor.
 
  WRITE: / wa_citymayors-city.
* Update Database
  IF NOT wa_citymayors-mayor IS INITIAL.
    UPDATE zcitymayors FROM wa_citymayors.
    WRITE: wa_citymayors-mayor.
  ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the below thread for more info:-&lt;/P&gt;&lt;P&gt;/people/gregor.wolf3/blog/2006/06/29/use-data-from-wikipedia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 10:05:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471534#M221578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T10:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Call url from ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471535#M221579</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 the FM &amp;lt;b&amp;gt;CALL_BROWSER&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 10:05:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-url-from-abap-program/m-p/1471535#M221579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-30T10:05:54Z</dc:date>
    </item>
  </channel>
</rss>

