SAP CDS PATH EXPRESSION FILTER V2



Get Example source ABAP code based on a different SAP table
  


• WHERE ABAP_CDS_PATH_EXPR

ABAP_CDS_DDL - CDS View Entity, path_expr, Filter

ABAP_SYNTAX
... $[WHERE$] cds_cond ...

What does it do?
Filter condition for the current CDS association. If the join type is explicitly defined with INNER$|${LEFT OUTER$}, the addition WHERE must be specified explicitly. If this is not the case, WHERE must not be specified.
A filter condition is a condition cds_cond implemented as an expanded condition for the join when transforming the CDS association into a join.
For the operands of the filter condition of a path expression of a CDS view entity, the following rules apply:
All relational operators are allowed.
The Boolean operators NOT, AND, and OR are allowed.
lhs expects a field of the association target of the current CDS association.
rhs expects a field of the association target of the current CDS association, a literal, a parameter, a session variable, an SQL-based scalar function, or a built-in function. ABAP_EXCEPTION if the operator LIKE is used, then rhs must be a character literal.
Path expressions are not supported.
Other expressions are not supported.
If no filter condition is specified in the path expression, any default filter condition specified for the CDS association is used.



Latest notes:

In CDS view entities, the filter conditions of multiple CDS associations are by default compared semantically. If the filter conditions match, the associated join expression is created only once. This generally improves performance.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
The following CDS view entity contains path expressions with filter conditions in its SELECT list that are implemented as join expressions upon activation.
DDLS DEMO_CDS_ASSOC_FILTER_VE
The following image shows the joins created on the database:
IMAGE ABDOC_PATH_EXPR.png 492 213
ABAP_EXAMPLE_END