Com um único campo no UI5, é enviada a informação e o filtro ocorre em vários campos do ABAP
<SearchField id="searchField" showRefreshButton="true" search=".onSearch" width="auto">
this._oListFilterState = {
aFilter: [],
aSearch: []
};
onSearch: function (oEvent) {
if (oEvent.getParameters().refreshButtonPressed) {
// Search field's 'refresh' button has been pressed.
// This is visible if you select any master list item.
// In this case no new search is triggered, we only
// refresh the list binding.
this.onRefresh();
return;
}
var sQuery = oEvent.getParameter("query");
if (sQuery) {
this._oListFilterState.aSearch = [new Filter({
filters: [
new Filter("Pernr", FilterOperator.Contains, sQuery),
new Filter("Cname", FilterOperator.Contains, sQuery),
new Filter("IdItem", FilterOperator.Contains, sQuery)
],
and: true
})];
} else {
this._oListFilterState.aSearch = [];
}
this._applyFilterSearch();
},
_applyFilterSearch: function () {
var aFilters = this._oListFilterState.aSearch.concat(this._oListFilterState.aFilter),
oViewModel = this.getModel("masterView");
this._oList.getBinding("items").filter(aFilters, sap.ui.model.FilterType.Application);
}
data(lt_list) = get_any_table_of_entityset_type( ).
loop at it_filter_select_options into data(ls_filter).
data(lv_tabix) = sy-tabix.
loop at ls_filter-select_options into data(ls_filter_item).
lv_where = cond #( when lv_where is initial
then |{ from_mixed( val = ls_filter-property sep = '_' ) } { ls_filter_item-option } '{ ls_filter_item-low }'|
else |{ lv_where } or { from_mixed( val = ls_filter-property sep = '_' ) } { ls_filter_item-option } '{ ls_filter_item-low }'| ).
endloop.
endloop.
loop at lt_list into data(ls_list) where (lv_where).
append ls_list to et_entityset.
endloop.