SAP CDS WHERE APV



Get Example source ABAP code based on a different SAP table
  


• WHERE ABAP_CDS_ANALYTICAL

ABAP_CDS_DDL - WHERE, Analytical Query

ABAP_SYNTAX
... WHERE cds_cond ...

What does it do?
Defines a WHERE condition for the result set of a CDS analytical projection view. When the CDS projection view is accessed, the result set contains only the data from the projected entity cds_entity that meets the condition cds_cond specified after WHERE.
The condition is either a single relational expression rel_expr or an expression constructed from the Boolean operators AND , OR, and NOT.
In CDS analytical projection views, the following rules apply to the operands and syntax of the WHERE condition:
Comparison operators are allowed.
BETWEEN , LIKE, and INITIAL are allowed as relational operators.
The Boolean operators AND, OR, and NOT are supported. Identical fields must be combined with OR and different fields must be combined with AND. ABAP_NOTE A filter condition does not support nested negations. The following is not supported: AND NOT field_a <> 'B. The reason is that NOT and <> are both negations.
lhs must be a field of the projected entity specified as analytical dimension field.
rhs can be an untyped literal, a session variable (currently, only $session.system_date and $session.user_date are supported), or a parameter. When using the operator LIKE , rhs must be a character literal. ABAP_NOTE typed literals are currently not supported in this position.
Path expressions path_expr are not allowed as operands in a WHERE condition.