Redundancy in ASPECT PFCG_AUTH: &1; see long text

Message type: E = Error

Message class: ACM_SYNTAX - ACM: DCL Syntax Error Messages

Message number: 142

Message text: Redundancy in ASPECT PFCG_AUTH: &1; see long text



What causes this issue?

Conditions of type ASPECT PFCG_AUTH retrieve role data from the
classical authorizations (PFCG) and include them into the SQL statement
which is processed by the database. As this data can be quite large (for
example many single values in authorization roles), superfluous ASPECT
PFCG_AUTH conditions should be avoided.
To have a measure for redundancy, we counted the total number of such
statements in this access control (including those inherited from other
access controls by the INHERIT or INHERITING CONDITIONS FROM ENTITY
statements, as they are as relevant for the database performance as
statements from the access control itself) and divided it by the number
of distinct statements.
The result is larger than the threshold value of 1.5 which triggers this
warning.
The concrete values here are (<Redundancy> = <(><<)>Total number> / <(>
<<)>Distinct number>, #1: <(><<)>Maximum frequency>): &V1&.
One of the most redundant ASPECT PFCG_AUTH statements is as follows:
&V2&&V3&&V4&
The statement above may be truncated.


System Response

This message is a warning.


How to fix this error?

Try to reformulate the access control conditions to minimize redundancy.

The system issues an error message and will not allow you to continue with this transaction until the error is resolved.

<ZH>Example</>
This access control has a redundancy factor of 2:
GRANT SELECT ON ENTITY WHERE ( F ) = ASPECT PFCG_AUTH( S_OBJECT, FIELD )
AND G = 1 OR ( F ) = ASPECT PFCG_AUTH( S_OBJECT, FIELD ) AND G = 2;
By using parentheses, it can be improved to have redundancy factor 1:
GRANT SELECT ON ENTITY WHERE ( F ) = ASPECT PFCG_AUTH( S_OBJECT, FIELD )
AND ( G = 1 OR G = 2 );


Procedure for System Administrators


Error message extract from SAP system. Copyright SAP SE.