Custom logic implementation fails for SAP_WFRT user due to authorization issues.
SAP S/4HANA Cloud
Reproducing the Issue
- Go to the Custom Fields and Logic app
- Create new custom logic for an implementation that will use the workflow user SAP_WFRT
- Examples are Workflow Agent Determination
- The Custom Logic will have a SELECT statement to get data from a CDS view
The business user testing the logic had authorization to select data from a CDS View, but the SAP_WFRT user does not have authorization.
In this case adding WITH PRIVILEGED ACCESS to the SELECT statement will allow the logic to succeed.
As an example for I_ProfitCenter it would look like:
SELECT SINGLE profitctrresponsibleuser FROM I_ProfitCenter WITH PRIVILEGED ACCESS INTO CORRESPONDING FIELDS OF [ ... ]
Custom Fields and Logic, Custom Logic CDS View, SELECT WITH PRIVILEGED ACCESS, workflow, BAdI , KBA , MM-IV-INT-WF , Workflow , BC-SRV-APS-EXT-BL , Custom Business Logic , Problem