Skip to Content

How to get the updated entity response in Update operation in Odata v2 at SAP endpoint ?

When we perform the Insert operation at SAP endpoint , we get the created entity as a response body and get 201 Created as a response code.

But when we perform the Update or Delete operation at SAP endpoint , we didn't get any response body and get 204 No Content as a response code.

is there a way to get the response body for Update / Delete call at SAP endpoint as well?

screenshot-33.png (97.2 kB)
screenshot-47.png (98.2 kB)
screenshot-33.png (97.2 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Sep 01 at 07:39 AM

    this is implemented that way according to the specification and the return status code indicates that it has been successful operation with no response content
    It assumes that you have the data, because you're aware of the entity that you're changing.
    If you need the whole content (again), the only thing you can do is to perform (another) call to the entity to READ the content (same URL)
    In case of DELETE, the entity is deleted - so you would have to READ it first (in common UI scenarions that would be the usual case)

    If you can change to OData version 4, there you have an option (prefer-header) which you can send along with your UPDATE operation to get the data back

    Add a comment
    10|10000 characters needed characters exceeded

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.