Hello,
I have designed and OData service and SAPUI5 Application to perform CRUD operations.
During DELETE operation, everything works fine when tested in Gateway Client. But when tested from SAPUI5 it is Gateway throwing 500 error, though row is deleted successfully. Below are my codes. Please guide me here.
Note : I have a date field in table which is marked 'nullable' in EntityType
var oTable = this.getView().byId("idProductsTable");
var oModel = oTable.getModel();
var aBatchtoDelete = [];
var oSelectedItems = oTable.getSelectedItems();
var sPath = oSelectedItems[0].getBindingContext().sPath;
oModel.remove(sPath,null,function(){
MessageToast.show("Deleted Successfully");
oModel.refresh();
},
function(errData) {
MessageBox.show(
"Error occured during deleting records" ,{
icon: sap.m.MessageBox.Icon.ERROR,
title: "Dear User",
styleClass: "sapUiSizeCompact"
}
);}
);

Request clarification before answering.
I would suggest you record your test in Gateway Client and from the UI5 App using /IWFND/TRACE and check the difference.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.