Ansicht
Dokumentation

ABENCDS_DCL_ROLE_INHERITED_RULE - CDS DCL ROLE INHERITED RULE

ABENCDS_DCL_ROLE_INHERITED_RULE - CDS DCL ROLE INHERITED RULE

CPI1466 during Backup   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

- DEFINE ROLE, inherited_rule (Obsolete)

Obsolete Syntax

GRANT SELECT ON cds_entity INHERIT parent_role $[AND$|OR cds_cond$] ...;

Effect

Obsolete inherited access rule in the statement DEFINE ROLE in the CDS DCL. An inherited access rule GRANT SELECT ON with the addition INHERIT inherits the access rules of an existing CDS role parent_role for a CDS entity cds_entity. The same applies to cds_entity as to a conditional access rule.

As an option, access conditions cds_cond can be added to the inherited access rule using AND or OR. A CDS role can only contain one inherited access rule, but can contain additional conditional or full access rules. The existing CDS role parent_role can only contain a single access rule for exactly one CDS entity, which itself can be an inherited access rule.

The inherited access conditions inherited from parent_role must match the CDS entity cds_entity. Full access rules cannot be inherited.

Notes

  • There is currently no check to determine whether the CDS entity cds_entity contains as a data source the CDS entity for which the role parent_role is defined.
  • Changes to the CDS entity for which the role parent_role is defined can lead to errors in the inheriting roles.

Example

This example demonstrates how an obsolete inherited access rules is used. The example for inheritance conditions shows how access conditions should be applied instead.

The following CDS view uses the CDS view DEMO_CDS_AUTH_LIT_PFCG from the example for conditional access rules as the data source:

The view DEMO_CDS_AUTH_LIT_PFCG is assigned to the CDS role DEMO_CDS_ROLE_LIT_PFCG. This role is inherited in the following CDS role and hence passes its access rules to the view DEMO_CDS_AUTH_INH_OBS. An additional literal condition allows access to another currency.

The language element INHERIT inherits the access conditions of the existing role and combines them with the additional condition. Expressed explicitly, the resulting access condition looks like this:

... where (carrid) =
       aspect pfcg_auth (s_carrid, carrid, actvt='03') and
              currcode = 'EUR' or
              currcode = 'USD' ...






General Data in Customer Master   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 5025 Date: 20240425 Time: 121135     sap01-206 ( 88 ms )