Hello All,
I'm trying to have a try on the new feature of publish the CDS view into OData Service with annotation @OData.publish:true. But after I define the view and activate it in ADT. It always hint me like below:
Description | Resource | Path | Location | Type |
No access control for entity ZTEST_REF_OVP. Create DCL or use annot. AccessControl [Access Control Management] | ZTEST_REF_OVP (ABAP DDL Source) | [S4H] ZTEST_REF_OVP | Unknown | ABAP Syntax Check Problem |
The service ZTEST_REF_OVP_CDS does not exist [OData Exposure] | ZTEST_REF_OVP (ABAP DDL Source) | [S4H] ZTEST_REF_OVP | line 6 | ABAP Syntax Check Problem |
Could anybody help me on this? Thanks a lot!
Below please see my code to define the CDS view:
@AbapCatalog.sqlViewName: 'ZTest_REF_forOVP'
@ClientDependent: true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'CDS view for po amount greater than 10000'
@OData.publish:true
define view ZTEST_REF_OVP as select from snwd_po as po
inner join snwd_bpa as bpa
on po.partner_guid = bpa.node_key
{ key bpa.bp_id as BusinessPartner,
bpa.company_name,
sum( po.gross_amount ) as Total_Gross_Amount,
po.currency_code
}
group by
bpa.bp_id,
bpa.company_name,
po.currency_code
having sum(po.gross_amount) > 10000
Best regards,
Zhuoyi