SAP Knowledge Base Article - Public

2868600 - Validation and Substitution not working for Cloud badi using CDS view

Symptom

 Validation and Substitution not working for Cloud BADI using CDS view

"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."

Environment

S/4 HANA Cloud

Reproducing the Issue

  1. App Custom Fields and Logic, Substitution or Validation created using CDS View (Check if there is CDS selection in BAdI implementation)

  2. In BAdI implementation, only “released” CDS views can be used. 
     
  3. In App View Browser (App ID F2170) , you can check if CDS view is Released. 

  4. For example take CDS view I_GLACCOUNTINCHARTOFACCOUNTS, this has status released.

    viewbrowser.png


  5. View Details. Select tab Annotation here you see Annotation: ACCESSCONTROL.AUTHORIZATIONCHECK  True: #CHECK. This means that this CDS view is with DCL (Data Control Language - authorization check)

    accesscontrol.png

Cause

Many CDS views are with DCL. If you want to select data from CDS view in BAdI implementation, you should decide if you need this DCL check. If not, add “WITH PRIVILEGED ACCESS”.

Resolution

In Custom fields and Logic App for BADI

Add "WITH PRIVILEGED ACCESS" after "SELECT XXX FROM XXX" in order to bypass the authorization check.

SELECT xxx
FROM XXX
WITH PRIVILEGED ACCESS

See Also

 2676581 - FAQ: Validation and Substitution Cloud BAdIs Availability

2462725 - FAQ: Validation and Substitution for Journal Entries in S/4 HANA Cloud

Keywords

WITH PRIVILEGED ACCESS, CDS, DCL, Data Control Language, authorizationCheck, authorization, restriction, pfcg_auth, su21,  access control, ACCESSCONTROL.AUTHORIZATIONCHECK

 
, KBA , FI-SL-VSR , Validation, Substitution and Rules , AC-INT , Accounting Interface , Problem

Product

SAP S/4HANA Cloud all versions