CDS创建详细操作步骤

<<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

  • 10
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值