Showing results for 
Search instead for 
Did you mean: 

How to delete Filter Fields from sap.fe.macros.FilterBar?

0 Kudos


I have a FilterBar (class sap.fe.macros.FilterBar) and I do not want all the fields to be used. So they should also not be availabe or shown in the Adapt Filters List. Normally this is done in the Metadata Extension by removing the annotation @ui.selectionField, but that is static. For my case it has to be dynamic.

Is it possible to do this in the FilterBar?

I found in the documentation the methods setFilterFieldEnabled and setFilterFieldVisible. But it is not what I'm searching for. setFilterFieldEnabled can disable a field, but the field is still visible. setFilterFieldVisible can hide the field from the filter bar, but it is still visible in the Adapt Filters List.

Kind regards, Alwin

It has to be dynamic, because the table is based on a database table with multi data sets. For example.

Set FieldField AField BField CResult Field
1AA 001
1AB 002
2A A101
2A B102

Set 1 uses field A and B. Set 2 uses field A and C. 

There are more than 20 sets and more than 30 fields. Therefor one Free style app is requested in stead of 20 Fiori Elements apps.

Active Contributor
0 Kudos
what is your scenario? why it has to be dynamic?
View Entire Topic
0 Kudos

It looks like I have to use sap.ui.comp.smartfilterbar.SmartFilterBar.