Wrapper class has been written in gateway end as part of OData to expose xsOData service (which consumes from SAP HANA). From SAP Ui5, i am trying to make a POST call with multiple entries on a single Entity as follows:-
var aBatchOperation=[];
for(var i=0;i<length;i++){
var obj={};
var oModel = new sap.ui.model.odata.ODataModel("/sap/opu/odata/SAP/ZGMM_SCT_WRITE_HANA_SRV/");
var selectedIndex = table.getSelectedIndices()[i];
var sPath = table.getRows()[selectedIndex].getBindingContext().sPath;
var exceptionRecord = table.getModel().getProperty(sPath);
obj = {
"MATNR" : exceptionRecord.MATNR,
"MAKTX" : exceptionRecord.MAKTX,
"ZZSTROKE" : exceptionRecord.ZZSTROKE,
"BEGRU" : exceptionRecord.BEGRU,
"TRAGR" : exceptionRecord.TRAGR,
"ZZSUPPLYCHATYPID" : exceptionRecord.ZZSUPPLYCHATYPID,
"DEFAULTSCT" : exceptionRecord.DEFAULTSCT
}
var contactBatchOperation = oModel.createBatchOperation("ack_mara_sct", "POST", obj);
aBatchOperation.push(contactBatchOperation);
}
oModel.addBatchChangeOperations(aBatchOperation);
this.busyDialog.open();
oModel.submitBatch(jQuery.proxy(this.handleBatchRead, this), function(oError)
{
this.busyDialog.close();
alert("Service Call Failed");
},
The above snippet is working fine for a Single data record, but not for multiple entries and throwing an error "HTTP request failed"
Does HANA have any restriction on multiple data POST ?
Please provide suggestion.
Thanks in Advance,
Hemagiri