2019 May 23 2:53 PM
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
2019 May 24 10:26 PM
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
2019 May 28 8:55 AM
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
2019 Jun 05 7:18 PM
2019 Jun 06 1:33 PM
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.
2019 Jun 07 8:08 AM
2019 Jun 07 12:55 PM
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
2019 Jun 07 2:51 PM
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
2019 Jun 07 4:13 PM
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"