cancel
Showing results for 
Search instead for 
Did you mean: 

Gateway based Odata versus CDS based OData

jitendra_it
Active Contributor
0 Kudos

Hello Experts,

Could you please tell me what is difference between CDS based oData versus Netweaver Gateway based OData? Which of these should be used when( any specific scenario) ?

Also, in Gateway based oData what is latest recommendation? OData channel OR Odata V4 OR Odata using MPC/DPC ?

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

If one of the answers you have received has solved your problem please press Accept and upvote those that were helpful.

Accepted Solutions (0)

Answers (3)

Answers (3)

maheshpalavalli
Active Contributor

Hi Jitendra Soni,

It is scenario and requirement based as per my knowledge.

1. CDS based ODATA

Odata service generated via the CDS view directly is the easiest possible way to create a Odata service. But it has limitaitons like you cannot have custom entities, steam operations, or you want to provide annotaitons from the mpc_ext class.. As it will not create MPC & DPC extension classes. For transactional processing we need to completely depend on the BOPF and the end-to-end best feature are available only with the ABAP Programming model for Fiori using the Draft.

2. Referenced Source

This is probably the best approach as we can provide the reference for the CDS view in the SEGW project and we can make use of MPC and DPC ext classes if we want to manipulate some data or model. Even in most of the S4 hana standard apps I've observed this approach being done

3. Normal OData serivice

As you already are talking about CDS based odata service, I am assuming that your system supports CDS. So I would not prefer this old approach instead we can use the 2 approach. If the second approach is not supported, then atleast go for the mapping of the CDS view to the entity for the better read performance.

I think OData v4 still doesn't support all the features that V2 supports from the ABAP side. Maybe andre.fischer can help us in this area.

BR,

Mahesh

former_member195676
Participant
0 Kudos

Thank you. Does SAP recommend one approach or other?

Are there any more differences with CDS Views or Normal OData based (SEGW) services?

bpawanchand
Active Contributor
0 Kudos

Hi ,

To answer in simple

1. Gateway based Odata : Is created in the back end using transaction SEGW. However, you also end up in creating a gateway data model with associtions and keys and service imlpementations. Oncwe you start implementing services then you starting generating MPC and DPC classes. I am not sure here what and how it makes a difference in the OData V4 specifications from the BACKend.

2. CDS Odata :

My experience there is no such term like CDS ODATA. If in case we are using content document specifications then we end up creating entity model in a schema. This schema will be the base reference to generate XSODATA sevrice.

Regards

Pavan

AbhijeetK
Active Participant
0 Kudos

Just addon information which Mahesh shered for V2 and V4 can be found on below link

https://blogs.sap.com/2017/12/12/odata-service-development-options/

by Andre Fischer

Regards,

Abhijeet Kankani