Skip to Content
Aug 24, 2016 at 11:33 AM

OData response to update call in $batch problematic in version 1.38?



So, I have an app which was originally implemented with SAPUI5 v1.28. The app uses OData model (v2), i.e. say oODataModel, and the OData model is configured to use batch.

Here is the scenario:

1. User modifies a simple data for an entity. By this, oODataModel adds a change set containing a MERGE request to the to-be-called $batch request. Additionally, further GET requests are added to the same $batch request.

2. User hits Save which calls oODataModel.submitChanges() and the $batch request is sent to the backend.

3. Application reads the oData parameter of the event batchRequestCompleted and based on the elements of the requests array, checks the response field of each array element to decide whether the relevant operation was successful or not.

Here is how it is different in two versions:

In v1.28: The update operation response is marked as "success=true", the HTTP response code is "204 - No content"

In v1.38: The update operation response is marked as "success=false", the HTTP response code says "0 - abort"

- In both cases, data is updated successfully at the backend system

- For update operations, Gateway seems to always send "204 - No content"

- Making the update operation use PUT instead of MERGE does not change the result

Here are screenshots of the oData content in the abovementioned two cases:

Do you think this is a bug introduced with version 1.38? Any feedback is welcome.