首页 > 解决方案 > 扩展 CDS 视图失败

问题描述

我有两个 CDS 视图,ztest_cds 和 ztex_cds,其中ztest_cds一个是普通视图,ztex_cds一个是扩展ztest_cds.

ztex_cds中,我关联另一个表。当我活动ztest_cds时,我收到此错误消息:

表名 _book 未知或被别名遮蔽

当我双击时,ztex_cds来到前面,当我点击“激活”时,它以NO错误和警告结束。

ztest_cds代码:

@AbapCatalog.sqlViewName: 'zt_cds'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'test cds'
define view ztest_cds as select from sflight 
association [1..1] to spfli 
 on sflight.carrid = spfli.carrid
 and sflight.connid = spfli.connid{
key carrid,
key connid,
key fldate,
price,
currency
} 

ztex_cds代码:

@AbapCatalog.sqlViewAppendName: 'ztextend_cds'
@EndUserText.label: 'test extend cds'
extend view ztest_cds
with ztex_cds 
association to sbook as _book
        on _book.carrid = sflight.carrid
        and _book.connid = sflight.connid
association [1..1] to scustom as _cust
on _cust.id = _book.customid{
_book.bookid,
_book.customid,
 _cust.id,
_cust.name,
_cust.form,
_cust.street
}   

我应该怎么做ztest_cds

标签: abapcds

解决方案


推荐阅读