on 11-09-2018 3:23 PM
HI Thomas,
I am new in xsodata, i have a question now as per my requirement i don't need to insert header and line item concept , i have to only insert multiple record in a table , can u suggest me how to handle it into the xs odata side , a flow would be great like what i have to do steps do i have to create procedure or xsjs and need to call to xsodata and how we will call the service into the UI post request do i need to use batch in this case.
Also if we are using batch then will it be good if user is selecting or creating thousand reocrds will it be good ?
Please suggest me the standard sap way of doing it.
Thanks,
Jay
There is nothing you need to do on the server side then. Just use a batch operation from the client side request. The XSODATA framework will handle the batch operation. Yes a batch operation is preferred for large scale operations. There is certainly less overhead. However in general OData is particularly well suited to VERY high volume scenarios. For those you should seek other, specialized tooling (SQL IMPORT, SAP Data Services, SLT, etc).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thomas.jung ,
As suggested by you i have created below entry in my xsodata service.
service {
"TableName" as "InsertTable" keys generate local "GenID" ;
}
and below UI code for batch operation.
var oModel = new sap.ui.model.odata.ODataModel(this.sServiceUrl);
for(var i=0;i<aCreateEntry.length;i++){
var sPath = "/InsertTable";
aCreateOperations.push(oModel.createBatchOperation(sPath,"POST",aCreateEntry[i],null));
}
oModel.addBatchChangeOperations(aCreateOperations);
oModel.submitBatch(function(oData, oResponse, aErrorResponses){aCreateOperations
if(aErrorResponses.length>0){
sap.m.MessageBox.alert("Error in Creating. Please try again...");
console.log(aErrorResponses);
}else{
sap.m.MessageBox.alert("Batch Successfull", {});
}
});
after doing that it is giving me below error "Default changeset implementation allows only one operation"
Could you please help in here
Thanks,
Jay
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.