Application Development and Automation 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 only

Read XML data from Internet Site

Former Member
0 Likes
826

Hello,

The requirement is to read Bank Exchange Rates from the website,

http://www.nbp.pl/Kursy/xml/a141z080721.xml

I have tried to read it using the Function Module 'HTTP_GET'

with the parameters:

ABSOLUTE_URI http://www.nbp.pl/Kursy/xml/a141z080721.xml

REQUEST_ENTITY_BODY_LENGTH 1000000000

RFC_DESTINATION SAPHTTP

BLANKSTOCRLF X

TIMEOUT 5

But I get the error as

Exception CONNECT_FAILED

Message ID: 04 Message number: 100

Message:

Connect Error: NiHostToAddr proxy error: NIEHOST_UNKNOWN

Please let me know what am I doing wrong, or if there are some configurations that need to be done. Thanks in advance.

P.S: Deserving Answers will be given points.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
736

Hi,

i make it in this way:

CALL FUNCTION 'HTTP_GET'

EXPORTING

ABSOLUTE_URI = URI

RFC_DESTINATION = 'SAPHTTP' "s. THTTP PräsenServer

  • RFC_DESTINATION = 'SAPHTTPA' "s. THTTP AppliServer

BLANKSTOCRLF = 'Y'

in URI is the webaddress.

It works OK.

Is there the correct entry in table THTTP?

Regards, Dieter

Hello,

The requirement is to read Bank Exchange Rates from the website,

http://www.nbp.pl/Kursy/xml/a141z080721.xml

I have tried to read it using the Function Module 'HTTP_GET'

with the parameters:

ABSOLUTE_URI http://www.nbp.pl/Kursy/xml/a141z080721.xml

REQUEST_ENTITY_BODY_LENGTH 1000000000

RFC_DESTINATION SAPHTTP

BLANKSTOCRLF X

TIMEOUT 5

But I get the error as

Exception CONNECT_FAILED

Message ID: 04 Message number: 100

Message:

Connect Error: NiHostToAddr proxy error: NIEHOST_UNKNOWN

Please let me know what am I doing wrong, or if there are some configurations that need to be done. Thanks in advance.

P.S: Deserving Answers will be given points.

4 REPLIES 4
Read only

Former Member
0 Likes
737

Hi,

i make it in this way:

CALL FUNCTION 'HTTP_GET'

EXPORTING

ABSOLUTE_URI = URI

RFC_DESTINATION = 'SAPHTTP' "s. THTTP PräsenServer

  • RFC_DESTINATION = 'SAPHTTPA' "s. THTTP AppliServer

BLANKSTOCRLF = 'Y'

in URI is the webaddress.

It works OK.

Is there the correct entry in table THTTP?

Regards, Dieter

Read only

0 Likes
736

Hello Dieter,

I have the following information in the table THTTP,

MANDT 800

PROXY proxy:8080

PUSER

PPASSWORD

EXITFUNC ZHTTP_PROXY_CONFIG

Is this alright or are there any changes that need to done. Thanks for your help.

Read only

0 Likes
736

Hi,

it looks like using SAPHTTPA not SAPHTTP.

Try the FM with "SAPHTTPA" not "SAPHTTP".

Regards, Dieter.

Read only

Former Member
0 Likes
736

Hi Nonconformist,

any positive result or do you any problems again?

Regards, Dieter