avatar image
Former Member

SAPUI5 Odata Batch: Uncaught TypeError: Cannot read property '__batchResponses' of undefined


We are doing a batch call from a SAPUI5 application to an ABAP ODataModel.

What we want is to send several PO Numbers to read some text information.

The problem is when we do the call, the error happens: "Uncaught TypeError: Cannot read property '__batchResponses' of undefined"

This problem only happens if we call from the SAPUI5 application. If we use the Gateway Client for test, is works fine.

Code used in SAPUI5 for batch call:

var oBapiModel = this.getView().getModel("potrackingBapiModel"); 


oBapiModel.setHeaders({ "content-type": "multipart/mixed; boundary=batch; application/http" }); 


oBapiModel.read("/PoTextDataSet" , { groupId: "ID" }); 

oBapiModel.attachBatchRequestCompleted(this, function(oEvent){ console.log("BatchRequestCompleted!"); }); 

oBapiModel.submitChanges({ groupId: "ID", 
success: function(oData) {console.log("SUCCESS ODATA"); }, 
error: function(oData) { console.log("ERROR ODATA");
} });

Appreciate any help.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers

Skip to Content