on 2024 Aug 06 8:56 AM
Hi Gurus,
I have a custom CDS view ZEntity1 for which I defined a role with the same name as CDS view - ZEntity1 using DCL. According to the books the 'Grant select' should be on the CDS view, however in my DCL code of ZEntity1 the Grant Select is on another standard view "I_SalesDocumentItem".
Can some please explain if the DCL will control the view ZEntity1 or I_SalesDocumentItem? Is there any use in doing this way?
Code Snippet:
@EndUserText.label: 'DCL for ZENTITY1'
@MappingRole: true
define role ZENTITY1{
grant select on I_SalesDocumentItem
where ( _SalesDocument.SalesDocumentType ) =
aspect pfcg_auth ( v_vbak_aat,
auart,
actvt = '03' )
Hi
In your scenario, you have defined a custom CDS (Core Data Services) view ZEntity1 and associated a DCL (Data Control Language) role ZENTITY1 with it.
However, in the DCL code, you are granting SELECT privileges on a standard view I_SalesDocumentItem instead of ZEntity1.
Update the DCL Role: Modify the DCL role to grant SELECT on ZEntity1 instead of I_SalesDocumentItem.
Here is how the updated DCL role might look:
@EndUserText.label: 'DCL for ZENTITY1'
@MappingRole: true
define role ZENTITY1{
grant select on ZEntity1
where ( _SalesDocument.SalesDocumentType ) =
aspect pfcg_auth ( v_vbak_aat,
auart,
actvt = '03' )
}
By applying the GRANT SELECT on ZEntity1 in the DCL role, you directly control access to the CDS view as intended, ensuring that the role manages access to the correct data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
12 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.