Skip to Content

oData consuming external REST service without SAP Gateway

Scenario:

i created on SAP Web IDE through the data-model.cds my oData services following this guide:

https://developers.sap.com/tutorials/odata-05-data-model-service.html

Ok, perfect i got my oData and my metadata:

https://ah1kfffrl6kr69f1-schedaeaevem-srv.cfapps.eu10.hana.ondemand.com/odata/v2/adamServices/$metadata

adamservice.jpg

Now, what i want is to consume data from an external Web Service so that when i call something like

https://ah1kfffrl6kr69f1-schedaeaevem-srv.cfapps.eu10.hana.ondemand.com/odata/v2/adamServices/GetFileUrl?$filter= ref_number eq 'xxxxxxxxx'

instead of reading the db table "MY_SCHEDAEAEVEM_GETFILEURL" it calls my custom method where i use the filter as an input for the REST service.

My question is: is it possibile to do this stuff all in SAP Cloud Platform Web IDE instead of passing through the SEGW, create the oDATA and editing the method GET_ENTITYSET? Where do i define my custom method and how can i trigger it when i call my entity?

My goal is to wrap this external REST service in my custom oData.

Thank you

adamservice.jpg (166.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.