前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SAP CDS view自学教程之二:当SAP CDS view被激活时,背后发生了什么

SAP CDS view自学教程之二:当SAP CDS view被激活时,背后发生了什么

作者头像
Jerry Wang
发布2020-08-14 09:46:33
4780
发布2020-08-14 09:46:33
举报

You paste the following source code for a simple CDS view into ABAP development studio and activate it:

代码语言:javascript
复制
@AbapCatalog.sqlViewName: 'zjerrySQL0208'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'test 233'
@ObjectModel: {
   createEnabled,
   deleteEnabled,
   updateEnabled
}
define view Zjerrytest20160208
as select from spfli association [0..1] to scarr as _scarr
on _scarr.carrid = spfli.carrid {
       key spfli.carrid,
       key _scarr.carrname,
       key spfli.connid,
       spfli.cityfrom,
       spfli.cityto
}

And you would like to know what objects are automatically generated during CDS view activation.

Automatically generated ABAP objects during CDS view activation You could query table TADIR with following parameters:

And get answer: DDLS: Data Definition Language SourceSTOB: Structured Object

The relationship among these objects is listed below:

And if you use the same approach described in tutorial part1, you can realize that lots of database tables “DD*” are involved during CDS view activation, for exampleDDLDEPENDENCY. A small tip here is, if you click “Display Object List” button, you will navigate to the package where other related ABAP artifacts within the same package are displayed as well.

Now we can go through each database table one by one.

Automatically inserted table entries during CDS view activation

Several table entries are inserted to the database tables in package SDDL during view activation.

DDDDLSRC

Query this table by specifying DDLNAME as CDS view name we specified in ABAP development studio, the name after keyword “define view” : Zjerrytest20160208, and we can find view source code stored in field SOURCE.

DDDDLSRC02BT Text table which stores the view description specified via annotation@EndUserText.label.

DDHEADANNO

It stores all header annotation specified in CDS view source code with corresponding value.

DDLDEPENDENCY

It maintains relationship between the CDS core entity and automatically generated database view.

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-08-13 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Automatically inserted table entries during CDS view activation
  • DDDDLSRC
  • DDHEADANNO
  • DDLDEPENDENCY
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档