SAP CDS F1 DCL PFCG MAPPING



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS_DCL - DEFINE ROLE, Converting Field Values
Elements of CDS entities are linked with an authorization object in PFCG conditions in the CDS DCL. The access condition itself is generated from authorizations of the current user for the authorization object. Here, the value of CDS elements is supplied with field values of the authorizations. The following points should be noted.
ITOC

Invalid Values
The field values of authorizations are saved as text fields with length 40. For the assignment, they must be convertible to the data type of the CDS elements:
The rules for lossless assignments must be followed. If this is not possible, the field value is ignored.
If an authorization requests a pattern comparison using a wildcard character (*), the data type of the CDS element must be character-like.
If a field value cannot be converted, the field value is ignored.



Latest notes:

Field values that are ignored are, for example, field values that are longer than the CDS element or field values with a non-numeric content for a numeric CDS element.
If field values are ignored, CDS access control may block access completely.
Ignored field values are not logged, which means that they cannot be known to the system administrator or to the user.
NON_V5_HINTS
ABAP_HINT_END

Wildcard Characters
If a field value contains a wildcard character (*) as its final character, it is used to create a LIKE condition in which the wildcard character * is replaced by the SQL wildcard character %.
If the field value contains the SQL wildcard characters % and _, the escape character # is assigned to them implicitly. This means that CDS access control checks the characters % and _ in field values like regular characters.

ABAP_EXAMPLE_VX5
The field value '10%*' produces the condition LIKE '10#%%' ESCAPE '#'.
ABAP_EXAMPLE_END