Ansicht
Dokumentation

ABENCDS_DCL_ROLE_CONDITIONS - CDS DCL ROLE CONDITIONS

ABENCDS_DCL_ROLE_CONDITIONS - CDS DCL ROLE CONDITIONS

CPI1466 during Backup   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

- DEFINE ROLE, condition

... literal_condition
  $| pfcg_condition
  $| aspect_condition
  $| user_condition
  $| inherit_condition
  $| dcl_function
  $| TRUE
  $| FALSE
  $| VOID ...


Effect

Part of an access condition cds_cond in an access rule of the statement DEFINE ROLE in CDS DCL. The following categories of conditions can be specified, which can be combined using AND or OR:

  • Literal conditions literal_condition that compare an element of a CDS entity with fixed values.
  • Self-defined aspects aspect_condition that join elements in a CDS entity with value sets of any other entity that can itself be addressed using the current user name as a selection condition.
  • User conditions user_condition as a special case of a literal condition on whose right side the user name of the current user is used as an operand.
  • DCL functions dcl_function are evaluated in the application server before the statement is sent to the database. The currently existing DCL functions return a Boolean predicate and in combination with AND and OR conditions allow enabling or disabling parts of the access conditions based on the function result.
  • Boolean predicates TRUE and FALSE. These conditions are either always met or not met. They are usually not needed in a role definition, but can be created implicitly in the inheritance of conditions.
  • The predicate VOID. A condition with the value VOID is handled as nonexistent.
VOID conditions are not required in the definition of a role and can be created implicitly in inheritances. The following rules apply in combination with other conditions:
  • X AND VOID = VOID AND X = X

  • X OR VOID = VOID OR X = X

  • NOT VOID = VOID

  • An access rule cannot consist solely of VOID conditions.

On the left side of a condition of this type, it is possible to specify elements of the CDS entity for which the access condition is defined directly or using path expressions. The following restrictions apply:

Notes

  • It is advisable to specify an element in a CDS entity directly in the CDS DCL and to only use path expressions in exceptional cases. More specifically, path expressions with multiple values can have a negative effect on the runtime of a query.
  • The way an access condition defined in a CDS role for a CDS entity is represented when the CDS entity is accessed using can be viewed in the SQL Trace tool (transaction ST05), for example as additional common table expressions. This implementation is not fixed, however, and can change between releases. More specifically, if further conditions exist, the part condition that results from a CDS role may be reduced (or even omitted).





ROGBILLS - Synchronize billing plans   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 7829 Date: 20240426 Time: 054141     sap01-206 ( 83 ms )