cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a OData Service in Public Cloud?

iamnaveen
Participant
0 Kudos
109

Hi Experts,

I've questions below.

How to create an OData Service in SAP Public Cloud?

Where do I find the GET Entity method and GET EntitySet Method?

Where do I pass the Input JSON for the POST method?

I want to create an OData with CRUD operations in the SAP Public Cloud.

Can anyone suggest the best practice?

Thanks,

Naveen.

SAP S/4HANA Cloud Public Edition  

OData 

Accepted Solutions (0)

Answers (1)

Answers (1)

Jerry_Lowery
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi iamnaveen

Could you provide some more information about your use case?

For example, you can use the Public APIs already provided: 

https://api.sap.com/products/SAPS4HANACloud/apis/all

If you want to update something, you will need to use x-csrf-token cross site scripting token:

https://community.sap.com/t5/technology-blogs-by-members/s-4hana-cloud-x-csrf-token-and-e-tag-valida...

Or you can create a custom CDS View and expose it as Odata (for Read only)
https://help.sap.com/docs/SAP_S4HANA_CLOUD/0f69f8fb28ac4bf48d2b57b9637e81fa/f4dcfd6e14b54177b98d6099...

If you want to create your own custom APIs and expose them, you can investigate Developer Extensibility:

https://help.sap.com/docs/SAP_S4HANA_CLOUD/6aa39f1ac05441e5a23f484f31e477e7/e1059ff581854a699f157340...

https://help.sap.com/docs/SAP_S4HANA_CLOUD/6aa39f1ac05441e5a23f484f31e477e7/9e6f18e492de47fea08a818f...

https://api.sap.com/products/SAPS4HANACloud/onstackextensibility/bointerface

 

thank you

Jerry

iamnaveen
Participant
0 Kudos

Hi @Jerry_Lowery ,

In SAP GUI, I can create an OData for a Custom table with CRUD Operations, which I can also use in the Fiori Application. But how do I achieve that in the public cloud?

Thanks,

Naveen

Jerry_Lowery
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi iamnaveen,

The equivalent extensibility for such a custom table is probably the Custom Business Object, which you can expose as an OData service and create a UI with the CBO.

https://help.sap.com/docs/SAP_S4HANA_CLOUD/0f69f8fb28ac4bf48d2b57b9637e81fa/b45696ca0d9143cba040797e...

 If you want to adapt an app to use it or use it in your own app, you probably need to look into Developer Extensibility. I don't know a way of adding the table to an existing UI without Developer Extensibility if that is what you are trying to do. 

If you could describe your use case, there might be a better approach.

There are several blogs in the community about CBOs.

I hope this helps