cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization Mechanism : OData service development using CDS via Referenced Data Sources

jibin_joy
Contributor
0 Kudos

Hi All,

Please share valuable suggestion

      How Authorization mechanism for OData service development  using CDS via Referenced Data Sources () can achieve for below case  ?

    Consider 2 User can access this Sales Order oData Service "User1" and "User2" . Now "User1" can view Sales Order of particular set of Customer like "C1" and "C2" and "User2" can view other set of Customer like "C3" and "C4".

Regards,

Jibin Joy

Accepted Solutions (1)

Accepted Solutions (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jibin,

you can define authorization checks within your CDS view.

ABAP Keyword Documentation

The new CDS authorization concept exists alongside the classic authorization concept and can be used independently or in combination with the classic concept (Authority-check).

The DCLs (data control language) are an extension of the DDL document that is used to define the CDS view.

A typical example would be the following:

@EndUserText.label: 'Role to view translation objects by language'

@MappingRole: 'true'

ROLE demo_documents {   

grant SELECT on demo_translation     

WHERE ( targetLang, textType ) = ASPECT pfcg_auth         

( S_TRANSLAT, TLANGUAGE, TRANOBJ, ACTVT = '02'); }


See also the blog from

Best Regards

Andre

jibin_joy
Contributor
0 Kudos

Thanks for Information

Answers (0)