cancel
Showing results for 
Search instead for 
Did you mean: 

Odata protocol version

Former Member
0 Kudos

Hi experts,

I have the following questions :

1. Can i see which odata version my gateway system is using ?

2. If i run the update entity method i get always 204 als return code. so the response is always empty(no content) . can i force the update operation to return the values assignes inside the abap code.

3. Can i force a gateway z-model to use odata version 3?

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Virinchy
Active Contributor
0 Kudos

Moo Yac,

I can partially answer your question.

1)The Metadata document contains element edmx:DataServices with attribute DataServiceVersion which helps to identify the OData Version.

Regards

Virinchy

Answers (4)

Answers (4)

Former Member
0 Kudos

SAP have implemented GW OData as of ODATA V2. The plan is to move past V3 and go tto V4. Since V4 has only just been finalised it will take some time for SAP to implement the new parser engine, etc, to allow V4 usage.

Currently, using ODATA 3.0 input format will work in some cases but since not all features are implemented, it will fail in some use cases.

naveenraj_a
Active Participant
0 Kudos

Hi Moo Yac,

By adding message parameter to your entityset, from UI on update success, you have to make a explicit call to the back end.

So if you have implemented the method get_entity of your entity, make an explicit call and fill your response message in the additional parameter.

Also if interested, you can make a Batch call for both Update and Get.

Thanks

Naveenraj

AshwinDutt
Active Contributor
0 Kudos

Hello Moo Yac,

1. See the metadata to get information regarding the Odata version.

Data Service Version would be 2.0.

2. Update Operation will always send 204 No Content with out any response body as part of successful update.

Standard way is to fire a READ operation once Update Operation is Successful.

This can be done via BATCH ( Batch Retrieval & Change Set ).

Refer the below for info ->

3. I do not have answer regarding forcing our services to use Odata Version 3.

i don't think we can do this.

Regards,

Ashwin

naveenraj_a
Active Participant
0 Kudos

Hi Moo Yac, to answer your 2nd question,

The Update_Entity method, has a parameter er_entity of type your entity, so it has same parameters of your Entity.

If you need to return some more response to the UI from back end, the approaches are

1. Add message and response parameters to the entity, and send your response on update.

2. Try to add custom headers as respone to the UI on update. pls follow this link for more info.

Thanks

Naveenraj

Former Member
0 Kudos

Thanks Naveenraj,

2nd option is working fine.

could y explain the 1st option : Add message and response parameters to the entity, and send your response on update?