cancel
Showing results for 
Search instead for 
Did you mean: 

SAP-ABAP -Accessing URL in SAP -HTTP Commulication Failure

Surekha
Participant
0 Kudos

Hi,

I am facing issue while accessing URL in SAP.I have created report which is accessing the URL .

I am having one demo server where i can access URL and gets the data from site properly and on my client Server when i am trying to access URL ..It's giving HTTP Communication Failure Error.

Code Below :-

CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL

  EXPORTING

    URL    = 'http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml'

  IMPORTING

    CLIENT = HTTP_CLIENT.

IF SY-SUBRC = 0.

  HTTP_CLIENT->SEND( ).

  CALL METHOD HTTP_CLIENT->RECEIVE

    EXCEPTIONS

      HTTP_COMMUNICATION_FAILURE = 1

      HTTP_INVALID_STATE         = 2

      HTTP_PROCESSING_FAILED     = 3.

  IF SY-SUBRC = 0.

     MESSAGE 'Processing failed !' TYPE 'S' DISPLAY LIKE 'E'.

  ENDIF.

Do we need to do setting and yes then What setting we need to do?

Kindly Suggest the same.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Surekha
Participant
0 Kudos

Sorted Out issue .I Have done analysis of both system and i found that one field is translated_path was missing in other server.

So i have done enhancment in CL_HTTP_Client Class.

jimguo
Advisor
Advisor
0 Kudos

Hi,

Maybe you can use report RSHTML01 to test if the URL can be accessed.

If yes, you can copy the coding in the report.

Thanks.

Jim