on 08-14-2017 6:28 PM
Hi friends.
I have a problem when I want to update data from SAPUI5 App.
The OData Model is v2.
I get the items from my table and update them through the odata model.
This is the controller code: SAP SCN thread
When I run the function this is the browser response:
This is the response of the ABAP system:
And this is the Request Payload:
According to the above I have some doubts:
1. Is the javascript code correct?
2. Are the Request Payload correct?
3. I have been investigating some discussions for this error, but still it is not clear to me which part should be corrected, if the ABAP part or the SAPUI5 part. (Discussion).
I do not have much experience for the management of batchs request, if someone knows or has dealt with something similar, I would appreciate your help.
Regards.
Hi,
For your reference. Code to make batch call.
batchUrls.push( oModel.createBatchOperation( "/EntitySet1", "GET"));
batchUrls.push( oModel.createBatchOperation("/EntitySet2", "GET"));
batchUrls.push( oModel.createBatchOperation("/EntitySet3", "GET"));
oModel.addBatchReadOperations(batchUrls);
oModel.submitBatch(function(oData, oResponse) {
var batchError="";
for (var i = 0 ; i<oData.__batchResponses.length ; i++){
if(oData.__batchResponses[i].message !=null && oData.__batchResponses[i].statusCode!="200"){
batchError='X';
break;
}
}
if(batchError !='X'){
//if all calls goes success
}
}, function(oData, oResponse){
debugger;
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check if your metadata entityset structure and itemObject structure are same...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Srikanth KV
Thanks for your help.Yes, the entityset structure and itemObject structure are same.When debugging in the Abap System, it only processes the first item in the table. At the time it is supposed to process the following items, it throws the error.Have you implemented /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN and /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_END ??
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.