Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP CDS Access Controls in Projection Views

axel_brke3
Participant
0 Kudos
585

Hi community,

we have an CDS Projection View which I want to restrict using an Access Control. This does unfortunately not work, Eclipse throws an error. The Access Control works fine in the underlying root view.

I cannot find anything in the Documentation on Access Controls or Projection Views.

Does anyone know how to use AC with Projection Views?

Any input is much appreciated!  

2 REPLIES 2
Read only

celinewilliams
Product and Topic Expert
Product and Topic Expert
0 Kudos
496

Hi @axel_brke3, regarding the error in Eclipse: we recommend to open a ServiceNow ticket with the following component: BC-DWB-AIE-CDS. Our colleagues can then work on the problem more efficiently and try to find a solution for it. Best regards!

Read only

ThorstenHoefer
Active Contributor
474

Hi,

access control can be defined for projection view:

@EndUserText.label: 'Access mgr 3'
@MappingRole: true
define role ZACI_EMP {
    grant
        select
            on
                ZI_EMP
                    where
                         Mgr = 3;       
}

@EndUserText.label: 'Mgr 3'
@MappingRole: true
define role ZACC_EMP {
      grant 
        select
            on ZC_EMP where inheriting conditions from entity ZI_EMP;              
}

SAP Help 

 

Please check the new feauture for Version 7.58
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abencds_dcl_role_proj...