Skip to Content
0
Former Member
Oct 07, 2015 at 12:13 PM

CDS View Authorization

495 Views

Hi everyone,

I have created a simple CDS View in Eclipse which works really great. Now I try to make some auth-checks like descripted in the docu:

ABAP Keyword Documentation

I have created an DCL Source in Eclipse which looks like this:

@EndUserText.label: 'Auth for Working Place and Ordertype'
@MappingRole: 'true'
define role ZR_TC_AUTH {
    grant select on Zpm_Tc_Order
    where ( vaplz,
            auart,
            werks ) = 
    aspect pfcg_auth (  Z_PM_TC,
                        ARBPL,
                        AUFART,
                        IWERK,
                        ACTVT = '31' );
    
}

In my Backend i have created a custom auth Object called Z_PM_TC. I have assigned this object in a Userrole. Now if i check my cds view in SE11 or Data Preview in Eclipse I get all the same data like before auth check. So auth check is not triggered. Also in Backend trace (ST01) I can't see that a check for my custom auth-object is done. So do I need to make an other connection between DDL and DCL? Or does it require a higher patchlevel? Our system is 740 SP-Level 009

I hope somebody know what im doing wrong.

Thanks for your help

Best Regards

Max