on 11-13-2016 3:16 PM
onSave: function() {
var oDataModel = new sap.ui.model.odata.ODataModel(serviceurl);
oDataModel.setUseBatch(true);
if (Flag) {
oDataModel.setHeaders({ "If-Match": "*" });
oDataModel.update("/entitySet('" + clnt + "')", updateRecord, null,
function(oData, oResponse)
{
},
function(oError) {
}
else
{
oDataModel.create("/entitySet", createRecord, null,
function(oData, oResponse) {
},
function(oError) {
});
}
}
please note that
1. I am using setUseBatch(true) to enable batch request.
2. PUT and POST works without batch.
3. POST works with batch (No issues) but PUT doesnt work
4. My odata service was generated using a BCO.(so create update methods were auto generated)
The error is
405 method not allowed
The specified HTTP method is not allowed for the resource identified by the Data Service Request URI
URL for batch should be like: http(s)://smpserver:port/appid/$batch
can you look at last comment mentioned in this thread? https://archive.sap.com/discussions/thread/3852595
try with --changeset only
Regards,
JK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.