How to hide draft admin fields from Adapt Filters in Fiori Elements

Draft enabled OData services exposed from SAP systems include some administrative fields that allow for draft handling in Fiori Elements. Fiori Elements templates interpret these fields and automatically enable functionality like “Editing Status” filter in the Smart Filter Bar in the List Report.

It is a common business requirement, smart or not, to disable that “Editing Status” filter. This was already covered multiple times and is also described in the official documentation here https://ui5.sap.com/#/topic/8eb695ac473b4ab0a726e4021ce35cf4

It basically comes down to following annotation:

In this post I will explain how to to also hide filters such as:

  • Draft Created By (CreatedByUser)
  • Draft Created On (CreationDateTime)
  • Draft Last Changed By (LastChangedByUser)
  • Draft Last Changed On (LastChangeDateTime)

It is basically setting a UI.HiddenFilter annotation on the entity type: