Skip to Content
0
Mar 02, 2017 at 01:02 PM

FIltering in Odata Model having Gateway service

380 Views

Hi,

I have a NW Gateway Odata Service having a Entity Set - "bankSet" and a column - "Bankkey".

I have created a odata Model for this service. Now, I want to filter contents of service for 1 specific "Bankkey" . How can I achieve this. I tried all solutions answered to similar question but nothing worked out.

I want to bing this data to a table in UI5.

var allFilters = new Filter("Bankkey", FilterOperator.EQ, "021000089");

oDataModel.read("/bankSet",null,null,{filters : allFilters},function(odata){
var datalist = odata.results;
var otable = that.getView().byId("idProductsTable");
var oModel = new sap.ui.model.json.JSONModel(datalist);
otable.setModel(oModel);
}
);