Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

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

Not what you were looking for? View more on this topic or Ask a question