Skip to content

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 


Other versions: 7.31 | 7.40 | 7.54


... condition 
  | [NOT] cond_expr [AND|OR cond_expr] ...


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 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.