cancel
Showing results for 
Search instead for 
Did you mean: 

User level restriction on CDS view

0 Kudos

Hi All,

I have created CDS view, now I want to restrict access to it based on the roles defined for standard transaction VA05.

Only users maintained in VA05 roles should be able to access it.

Kindly suggest how can we achieve this type of authorization restrictions in CDS.

Thanks

FredericGirod
Active Contributor
0 Kudos

first, check in SU24 the authorization present in the VA05 transaction, and choose the good one

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

Hi Abdul/ Sanil,

I am not looking for authorization check on records. I want to allow certain amount of users to access CDS and see the contents.

Thanks,

Abdul_Waheed
Contributor
0 Kudos

Dear vbadhan

For this case, create a new role in PFCG and include authorization objects there. Define what data based on selected fields users should see.

sanilbhandari
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi

The below blog might be useful.

https://blogs.sap.com/2020/04/09/implementing-dcl-with-cds-views-and-roles/

Thanks & regards

Sanil Bhandari

Abdul_Waheed
Contributor
0 Kudos

Example:

@MappingRole: true
define role ZC_SalesOrder {
    grant select on ZC_SalesOrder
    where ( SalesOrderType ) =
    aspect pfcg_auth ( V_VBAK_AAT,
                       AUART,
                       ACTVT = '03' );
}
Abdul_Waheed
Contributor
0 Kudos

To apply authorization checks on records from the database, you should leverage the CDS access controls.

You can create access control for the CDS View with required VA05 authorization objects, fields, and activity.

0 Kudos

Hi Frederic, Thanks for your input.

S_DEVELOP with ACTVT = 16 should be good but how to assign this to CDS view. Any suggestions?

Thanks