Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2222

Re: How to get data from XML data of URL into SAP ABAP in background

$
0
0

Hi Raymond,

 

I am using

 

CALL METHOD cl_http_client=>create_by_url

     EXPORTING

       url    = lc_url

       PROXY_HOST = 'XXXXXXXXXXXXXX'

       PROXY_SERVICE = 'XXXX'

     IMPORTING

       client = lo_client

     EXCEPTIONS

       OTHERS = 1.

 

 

   lo_client->request->set_header_field( name  = '~request_method'

                                          value = 'GET' ).

   lo_client->request->set_header_field( name = '~Content-Length'

                                      value = '60000' ).

   lo_client->send( ).

 

   CALL METHOD lo_client->receive

     EXCEPTIONS

       http_communication_failure = 1

       http_invalid_state         = 2

       http_processing_failed     = 3

       OTHERS                     = 4.


  lc_content = lo_client->response->get_cdata( ).

   REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf IN lc_content WITH cl_abap_char_utilities=>newline.

   SPLIT lc_content AT cl_abap_char_utilities=>newline INTO TABLE lt_html.

 

This logic is working fine for http://www.rba.gov.au/rss/rss-cb-exchange-rates.xml


I have problem while using http://www.hmrc.gov.uk/softwaredevelopers/rates/exrates-monthly-0616.xml


Thanks & Regards,

N. HARISH KUMAR


Viewing all articles
Browse latest Browse all 2222


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>