var aFilter = [];
var aOrFilter = [];
var aAndFilter = [];
//Create filter array for OR condition
aOrFilter[
new sap.ui.model.Filter("Property1", sap.ui.model.FilterOperator.EQ, sValue),
new sap.ui.model.Filter("Property2", sap.ui.model.FilterOperator.EQ, sValue)
];
//Create filter array for AND condition
aAndFilter[
new sap.ui.model.Filter("Property3", sap.ui.model.FilterOperator.EQ, sValue),
new sap.ui.model.Filter("Property4", sap.ui.model.FilterOperator.EQ, sValue)
];
//Concatinating both filter arrays with AND condition
aFilter = new sap.ui.model.Filter([
new sap.ui.model.Filter(aOrFilter, false), //Filters get OR codition
new sap.ui.model.Filter(aAndFilter, true) //Filters get AND condition
], true); //Concatinating both with AND condition
Результат:
(Property1 EQ "XXX" OR Property2 EQ "XXX") AND (Property3 EQ "XXX" AND Property4 EQ "XXX")