cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Consuming external API from Ui5 application in S4 on premise

bsratheesh
Product and Topic Expert
Product and Topic Expert
0 Likes
1,207

Hi All,

I am trying to consume an API developed in spring boot and deployed in Azure K8 cluster from an UI5 application in S4 HANA on premise 2020 release. For this as suggested in the thread - https://community.sap.com/t5/technology-q-a/a-better-way-to-create-odata-proxy-client/qaq-p/12510767, I have to create a remote OData proxy in on premise system. To do this I need to have the meta data from the API and I am struggling to understand how to extract the meta data in the desired format for SAP. I tried with options like /swagger-ui.html or /v2/api-docs but not able to get the meta data as like the wizard expects. 

Any of you have worked on such a requirement before and so could you guide me in how to achieve this? In case I have to do this manually ( without wizard) how to do this?

Regards,

Ratheesh BS

 

Accepted Solutions (0)

Answers (2)

Answers (2)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert

If the service supports the OData protocol you will retrieve the $metadata file by adding /$metadata to the root URL of the OData service. 
So for example http://myhost/service_root_url/$metadata 

When using http://myhost/service_root_url the service should respond with the so called service document that simply lists all entities of an OData service.

bsratheesh
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi @Andre_Fischer ,

Thanks. I checked with the team responsible for the API and it didn't support OData protocol.

In this case I could use Http client to consume the external API. isn't it? do you see any issues in this approach? 

Regards,

Ratheesh BS 

 

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Likes

Check out my following blog post

https://community.sap.com/t5/technology-blogs-by-sap/how-to-use-the-odata-client-proxy-in-sap-s-4-ha...

The problem in 2020 is that you cannot generate a service consumption model there.

In my blog post I describe how such a service consumption model can be generated in an SAP BTP ABAP Environment system and how you can migrate the generated class so that it can be registered as an OData Client Proxy in an SAP S/4HANA on prem system.

Kind regards,

Andre 

bsratheesh
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi @Andre_Fischer 

Yes. I saw the blog post you have mentioned. Here it mentioned about getting the meta data file (EDMX file) of the API so that wizard will create the SCM.

"You will now create the Service Consumption Model in ADT, using the EDMX file - i.e. the $metadata.xml file that you stored locally" .

My question is how to extract the meta data file for the API developed in Spring boot and deployed in Azure K8 cluster.

bsratheesh_0-1717407095567.png

Regards,

Ratheesh BS