BW Variables generated by annotation @Consumption.filter
Filter variables of the BW query can be expressed with @Consumption.filter annotations in CDS views. As an alternative to the filter annotation, you can introduce a parameter and use it in the where clause. See example Query using Parameter. Variables and Filters are always so called hard filters (characteristic restrictions, see OLAP Filter Handling)).
In the following we show a simple example:
ABAP Perspective in Hana Studio
Note that this variable is ignored by the Data Preview in the Hana Studio. We need to run the query in order to check this annotation.
Note: In case a @Filter annotation is used for an element that is filtered in the WHERE condition as well, the filter annotation will be ignored!