Skip to Content

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 14, 2017 at 05:04 PM

    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

    Add comment
    10|10000 characters needed characters exceeded