cancel
Showing results for 
Search instead for 
Did you mean: 

500 Internal Server while DELETING rows from SAPUI5

06-20-2018 3:28 PM
986 views 3 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

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"
					}
			);}
			);

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

gregorw
SAP Mentor
SAP Mentor
0 Likes

I would suggest you record your test in Gateway Client and from the UI5 App using /IWFND/TRACE and check the difference.

former_member383720
Participant
0 Likes

Thanks. It showed me the cause which finally resolved the issue.

gregorw
SAP Mentor
SAP Mentor
0 Likes

Great, I've converted my comment to an answer which you now can accept.

Answers (0)