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: 

How to call REST web service to report with Sap ECC 6.0

3,594

Hello, I have to call a REST web service from an ABAP program and looking on the net, I found several examples but all of them using the CL_REST_HTTP_CLIENT class. My problem is that in the version of Sap I use, the aforementioned class does not exist. How can I call the REST Web Service without using the CL_REEST_HTTP_CLIENT class? Thank you Mario

8 REPLIES 8

former_member593648
Active Participant
741

What version are you on ? Assuming the whole SREST package is missing,check this note

https://apps.support.sap.com/sap/support/knowledge/preview/en/2628631

0 Kudos
741

Hi Philip,
Thanks for the reply.
I have version 702 hot-packages level 9 of the SAP_BASIS component.
So if you don't have the SREST library, are there no other ways to invoke a REST web service?
Thank you
Mario Consales

0 Kudos
741

I am not sure of other ways apart from SREST

UweFetzer_se38
Active Contributor
741

If you don't have (yet) the REST framework on your system you can call every service/website with the class CL_HTTP_CLIENT. You only have to implement the request and response handling on your own.

Search for the class here on SCN and you'll find several examples.

0 Kudos
741

Hi Fetzer,

Thanks for the reply.

Mario

0 Kudos
741

Hi Mario,

I am also having similar issue. please let me know if you find solution.

Found one blog: http://abap-development-consultant.blogspot.com/2011/09/basic-abap-http-request-sample.html

Regards

Jyothir aditya

0 Kudos
741

Now I called the web service and got a reply consisting of a JSON string. What I need now is to figure out how to turn it into manageable ABAP data. Mario

0 Kudos
741

If you used CL_HTTP_CLIENT, please accept Uwe's answer (and eventually adding a little comment on Uwe's answer if you got useful information).

PS: prefer using the COMMENT button; as SAP says to the right of the Answer box: "Before answering You should only submit an answer when you are proposing a solution to the poster's problem"