Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Read XML file to ABAP internal table

Former Member
0 Kudos

Hi Experts,

I got a requirement to read exchange rates from internet. It contains .XML file.

I need to read exchange rates from this link http://www.rba.gov.au/rss/rss-cb-exchange-rates.xml

I am using HTTP_GET FM to read the file. I am sucessfull in read file from other .XML file from internet.

But this link is tricky when compare to other.

Helpful answer will appreciated.

Warm regards,

NARAHARI HARISH KUMAR

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi All,

Resolved myself.  We can convert this by using FM 'DP_GET_STREAM_FROM_URL'

Thanks & Regards,

N. HARISH KUMAR

11 REPLIES 11

PeterJonker
Active Contributor
0 Kudos

What is exactly the issue you are facing ?

0 Kudos

Hi Peter,

I want to get XML data into ABAP internal table.

Warm Regards,

NARAHARI HARISH KUMAR

0 Kudos

I understood that already, but WHAT is your problem ? Where do you get stuck ?  Why does it not work ?

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

CL_HTTP_CLIENT CL_IXML will be useful in this case.

See here

this program Y_R_EITAN_TEST_40_05 use both class to get and parse the xml from http link.

        

Regards.

0 Kudos

HI Eitan,

I can able to get .XML data from internet to ABAP.

In this case, I need to get .XML data of RSS feeds to ABAP from internet. My doubt is, is it possible to get XML data of RSS into ABAP.

Warm Regards,

NARAHARI HARISH KUMAR

0 Kudos

Hi,

RSS is XML file.

This is your file:

See

XML RDF

  https://en.wikipedia.org/wiki/RSS

You need to parse the xml acording to your needs.

see FORM do_xml_parse_1 .

        

Regards.

0 Kudos

RSS is XML file like any other.

Why you are in doubt and don't try instead?

-- Tomas --

0 Kudos

Hi Tomas,

I tried the way Eitan suggested, but it is not working in my case.

I think some HTTP communication failure is occurred,  because when i executed, it is showing an information message like 'Connection Refused'.

0 Kudos

Hi,

Please ask the basis team to allow the application server to access the Internet.

Also ask them if they use a proxy .  Use the proxy values here:

       

Also check the values in your internet explorer:

You might be able to use those values

This works in my case.

Regards.

A

Former Member
0 Kudos

Hi All,

Resolved myself.  We can convert this by using FM 'DP_GET_STREAM_FROM_URL'

Thanks & Regards,

N. HARISH KUMAR

0 Kudos

DP_GET_STREAM_FROM_URL is using the connection from the currently-connected-user's web browser. It won't work if you run your program in background.