Get Example source ABAP code based on a different SAP table
• INHERIT FOR ABAP_CDS_GRANT_SELECT • INHERITING CONDITIONS FROM ENTITY ABAP_CDS_GRANT_SELECT • INHERITING CONDITIONS FROM SUPER ABAP_CDS_GRANT_SELECT
ABAP_CDS_DCL - DEFINE ROLE>, inherit_condition>
ABAP_SYNTAX ... ${ ${ INHERIT parent_role FOR GRANT SELECT ON cds_entity $} $| ${ INHERITING CONDITIONS FROM ${ ENTITY cds_entity $[DEFAULT TRUE$|FALSE$] $} $| SUPER $} $} $[ replacing> $] ... >
ABAP_VARIANTS: 1 ... INHERIT parent_role FOR GRANT SELECT ON cds_entity> 2 ... INHERITING CONDITIONS FROM ENTITY cds_entity ...> 3 ... INHERITING CONDITIONS FROM SUPER>
What does it do? Inheritance condition as part of an access condition> cds_cond>> in an access rule> of the statement DEFINE ROLE>> in CDS DCL>. There are three variants:
The variant INHERIT FOR GRANT> applies the access conditions from a different CDS role.
The variant INHERITING CONDITIONS FROM ENTITY> applies the access conditions from a CDS entity.
The variant INHERITING CONDITIONS FROM SUPER> applies the access conditions from roles that are redefined by the current role. In all variants, the inherited conditions can be altered by replacing>> before they are applied to the CDS entity of the current access control.
Latest notes:
Multiple inheritance conditions can be specified within a single access condition and these can be combined with literal conditions>, PFCG conditions>, and user conditions>.
The inherited access conditions are parenthesized implicitly. It is not necessary to set parentheses explicitly.
An inheritance condition cannot be negated using NOT>>.
Full access rules can be inherited and are represented in the resulting conditions as the Boolean predicate TRUE>.
Using inheritance can cause cycles which result in syntax errors.
Both inheritance flavors respect access rules that are declared in the same access role as the inheritance statement. The access rule which contains the inheritance statement is excluded. This feature allows the demonstration of inheritance within a single access control document for test purposes. NON_V5_HINTS ABAP_HINT_END
ABAP_VARIANT_1 ... INHERIT parent_role FOR GRANT SELECT ON cds_entity>