ABAP Keyword Documentation → ABAP - Dictionary → ABAP CDS in ABAP Dictionary → ABAP CDS - Access Control → ABAP CDS - DCL Statements → ABAP CDS - DEFINE ROLE → ABAP CDS - DEFINE ROLE, access_rules → ABAP CDS - DEFINE ROLE, conditional_rule
ABAP CDS - DEFINE ROLE, cond_expr
Other versions:
7.31 | 7.40 | 7.54
Syntax
... condition
| [NOT] cond_expr [AND|OR cond_expr] ...
Effect
Formulates an access condition in the statement DEFINE ROLE in CDS DCL. The result of an access condition is true or false.
An access condition is either a single condition,
condition, or an expression constructed from the Boolean operators NOT,
AND, and OR in which parenthesized full conditions cond_expr
using parentheses ( ...
) are possible. The Boolean operators work as follows:
- NOT negates the result of the following condition. It cannot be used if cond_expr is one of the following conditions:
- A PFCG condition pfcg_condition whose left side specifies CDS elements that themselves are assigned authorization fields on the right side after ASPECT pfcg_auth using mapped_field1, mapped_field2, ...
- A generic aspect generic_aspect.
- An inheritance condition inherit_condition.
- An AND join is true if both joined conditions are true.
- An OR join is true if at least one of the joined conditions is true.
The operator NOT is a stronger binding than AND, which itself is a strong binding than OR. This produces implicit parentheses, which can be overridden by explicit parentheses.
When an access condition is evaluated using CDS access control, only those lines are selected for which the access condition is true.