cancel
Showing results for 
Search instead for 
Did you mean: 

Data binding not supported for sap.ui.model.Filter value1/value2 properties using Odata Service

0 Kudos

Hi Experts,

I have searched various links to find the solution/workaround but I'm unable to find any.

I have also gone through this link but couldn't understand what needs to be done to solve the issue.

https://github.com/SAP/openui5/issues/130

I basically want to pass something like this to my gateway to get the filtered set of values.

/sap/opu/odata/SAP/ZORDER_STATUS_SRV/ZORDER_ITEMSet?$filter=Vbeln eq '1506'

where Sales Order number will be dynamic , entered on screen and have to bind filter value with the input value.

I have tried something like below but in vain.

oTable1.setModel(oController.setModel());

oTable1.bindRows("/ZORDER_ITEMSet",undefined, [{path:'Vbeln' , operator: 'EQ' , value1: '{myModel>/Vbeln}'}]);

Any inputs will be appreciated, TIA

Sudha.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sudha,

Please try this:

var Vbeln = this.getView().getModel("myModel").getProperty("/Vbeln");
oTable.bindRows({
   path: "/ZORDER_ITEMSet",
   filters: [{new sap.ui.model.Filter({
        path: "Vbeln",
        operator: "EQ",
        value1: Vbeln
   })}]
});

Also please ensure:

1. The model myModel is set on the view

2. In your backend OData service, filtering functionality has been implemented.

Regards,

Rahul

Answers (0)