*&---------------------------------------------------------------------*
*& Types and Data
*&---------------------------------------------------------------------*
DATA: http_client TYPE REF TO if_http_client ,
http_url TYPE string ,
p_content TYPE string .
*&---------------------------------------------------------------------*
*& Start of Selection
*&---------------------------------------------------------------------*
START-OF-SELECTION .
* Build the url string based on input
CONCATENATE 'http://www.webservicex.net/globalweather.asmx'
'/GetCitiesByCountry?CountryName='
p_cnt
INTO http_url .
http_client->request->set_header_field( name = '~request_method'
value = 'GET' ).
* Send the request
http_client->send( ).
* Reterive the result
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4.
p_content = http_client->response->get_cdata( ).
REPLACE ALL OCCURRENCES OF '<' IN p_content WITH '<' .
REPLACE ALL OCCURRENCES OF '>' IN p_content WITH '>' .
Social Plugin