<<cds_common_notes CDS注释.pdf>>
CDS中常用注释说明 | 优通SAP (ut163.com)
@Semantics.quantity.unitOfMeasure: 'ACDOCA.RUNIT' 数量的单位注释
@Semantics.amount.currencyCode: 'ACDOCA.RHCUR' 金额的单位注释
、
视图注解
字段注解
扩展视图注解
创建DDL路径
File-new-other-ABAP-Core Data Services-Data Definition
创建 view with join / view with left outer join
除上面路径外的其他路径 ,如下
可以写成下面这种语句
左连接
创建 view with Association
另外新建define view
如果要关联多个表,可以写成多个View with Association
例:
带参数查询(类似选择屏幕输入值)
选择define view with parameters
参数可写多个
运行该语句,会弹出框,可填入参数
SE11展示效果如下
需要注意的是表名需要使用待扩展视图中的表别名,如下图中的p
展示效果
SE11查看效果
@AbapCatalog.sqlViewName: 'ZS_FL_AN_15590'
@EndUserText.label: 'Flight prices'
@AbapCatalog.buffering.status: #ACTIVE
@AbapCatalog.buffering.type: #FULL
define view ZSCDS_FL_AN_15590 as
select from sflight {
key carrid,
@EndUserText.label: 'Flight Number'
key connid,
@EndUserText.quickInfo: 'Flight departure date'
key fldate,
@EndUserText.label: 'Airfare Currency'
@Semantics.currencyCode: true
currency,
@Semantics.amount.currencyCode: 'currency'
@EndUserText.quickInfo: 'Airfare Economy Class'
price
}
新建program