SAP CDS F1 DCL HIERARCHIES



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS - DCL Restrictions for CDS Hierarchies
CDS hierarchies can be protected with access control. However, it must be ensured that individual rows are not filtered out if they are part of a logical block in the hierarchy construction. Otherwise, the hierarchies constructed by the database could be destroyed and hierarchy operators produce undefined results.
For this reason, the use of access conditions with arbitrary entity elements is not allowed.
However, if the CDS hierarchy declares a directory ( ABAP Addition ... DIRECTORY ... FILTER BY), then elements of this association can be used.
In addition, access conditions that do not result in database selections can be used:
PFCG conditions without fields ( ( ) = ASPECT PFCG_AUTH( ... ) )
Conditions with exclusive use of left side host expressions. This allows protection of a CDS hierarchy using the hierarchy directory specified by a parameter.
The special conditions TRUE, FALSE, and VOID. These should not, however, be used directly in CDS access controls.



Latest notes:

When conditions on the directory association are involved, they are applied to the constructed hierarchy object. Therefore, the time for its creation will be consumed even if the user does not have the authorization to retrieve the result.
The requirement to specify a FILTER BY addition in the CDS hierarchy definition still exists and by design already provides an all-or-nothing behavior regarding the hierarchy directory. Due to the properties from above, access control can act as an additional reason for nothing.
NON_V5_HINTS
ABAP_HINT_END