Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Filter Query

oValueHelpDialog.getTable().bindRows("/CompanyCodeValuehelp?$filter=CompanyCode eq '0001'");

In this query i have passed hard coded value '0001'. Here I need to pass a variable.The variable contains value that is filled by user in form.

var aFilters = [];

    var sQuery = oEvt.getParameter("query");

    console.log(sQuery);

var oColModel = new sap.ui.model.json.JSONModel();

    oColModel.setData({

    cols: [

          {label: "Company Code", template: "CompanyCode"},

     {label: "CompanyCodeName", template: "CompanyCodeName"}

]

    });

    oValueHelpDialog.getTable().setModel(oColModel, "columns");

 

    oValueHelpDialog.getTable().setModel(sap.ui.getCore().getModel("oDataModel1"));

          

          oValueHelpDialog.getTable().bindRows("/CompanyCodeValuehelp?$filter=CompanyCode eq sQuery");

In this way I m trying to implement it. But it is not working.

Please guide me

Former Member
Not what you were looking for? View more on this topic or Ask a question