创建CDS
--视图的基本语法
/*
@AbapCatalog.sqlViewName: '...'
@AbapCatalog.Buffering.status: #ACTIVE
@AbapCatalog.Buffering.type: #FULL
define view ...
as select from ...
{ ... }
*/
@AbapCatalog.sqlViewName: 'ZDEMO_CDS_T' --SQL描述 必输
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'ZDEMO_CDS'
define view ZDEMO_CDS --视图技术名称 必输 SQL描述和视图技术名称不可以一样
as
select from mara
{
matnr,
ersda ,
laeda}
where laeda = '00000000'
通过SE11可以查看
设置主键
@AbapCatalog.sqlViewName: 'ZDEMO_CDS_T'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'CDS 测试Demo'
define view ZDEMO_CDS
as
select from mara
{
key matnr,
ersda ,