ABAP CDS - DEFINE VIEW, view_annot
Syntax
... @annotation ...
Effect
Specifies Annotation annotation in the definition of a CDS view of the ABAP CDS before statement DEFINE VIEW. The character @ must be placed before the name annotation of the annotation. The table below shows the possible predefined annotations, which can be specified, and their meanings. All other annotations are user-defined annotations.
| annotation | value | Default Value | Meaning |
| AbapCatalog.buffering.status | #ACTIVE, #SWITCHED_OFF, #NOT_ALLOWED | #SWITCHED_OFF | SAP buffering active, allowed but not active, not allowed. |
| AbapCatalog.buffering.type | #SINGLE, #GENERIC, #FULL, #NONE | #NONE | Buffering type: Single records, generic area, complete or no SAP buffering. |
| AbapCatalog.buffering.numberOfKeyFields | Number between 0 and k-1 (k is the number of key elements) | 0 | Number of key elements for buffering generic areas |
| AbapCatalog.compiler.compareFilter | true, false | false | If true, the filter conditions of the path expressions of the view are compared. If the same filter condition occurs, the associated join expression is only evaluated once. Otherwise a separate join expression is created and evaluated for each filter condition. |
| AbapCatalog.sqlViewName | Character string, maximum 16 characters, which consists of letters, numbers and underscores and starts with a namespace prefix. | - | Mandatory. Name of the view in ABAP Dictionary. |
| ClientDependent | true, false | true | true means that the CDS view is client-specific. When accessed using SELECT, automatic client handling is performed. |
| DataAging.noAgingRestriction | true, false | false | false means that outdated data is not read. |
| EndUserText.label | Character string with maximum 60 characters | - | Descriptive short text of the CDS view. |
The first column shows the annotation name annotation of predefined annotations, the second column shows the possible values value and the third column shows the value, which is implicitly set for value (if the annotation is not explicitly used). If nothing is specified for value, the annotation should be specified without a value.
Notes
- The definition of a CDS view for ABAP Dictionary must always contain the predefined annotation AbapCatalog.sqlViewName, which defines the name of the view in the ABAP repository.
- If a CDS view is configured to be not client-specific with the predefined annotation ClientDependent false, all CDS views that use this view as a data source are also not client-specific.
- Predefined annotations with multiple-part names, which are introduced with the same names, can be listed together in the relevant annotation list in curly brackets and have the same meaning; for example, @AbapCatalog.buffering:{ status:... type:... }.
Example
Additional properties with predefined annotations are defined for the CDS view business_partner (except for the mandatory @AbapCatalog.sqlViewName with the name BPA_VW for the ABAP repository). The short text Business partner and the CDS view is not client-specific.
- @AbapCatalog.sqlViewName: 'BPA_VW'
@EndUserText.label: 'Business partner'
@ClientDependent: false
define view business_partner as
select from snwd_bpa
{ key snwd_bpa.bp_id as id,
snwd_bpa.bp_role as role,
snwd_bpa.company_name,
snwd_bpa.phone_number }
Example
SAP buffering with single record buffering is activated for the CDS view business_partner.
- @AbapCatalog.sqlViewName: 'BPA_VW'
@AbapCatalog.buffering.status: #ACTIVE
@AbapCatalog.buffering.type: #SINGLE
define view business_partner as
select from snwd_bpa
{ key snwd_bpa.bp_id as id,
snwd_bpa.bp_role as role,
snwd_bpa.company_name,
snwd_bpa.phone_number }
Example
SAP buffering for a generic area and a key element is activated for the CDS view business_partner.
- @AbapCatalog.sqlViewName: 'BPA_VW'
@AbapCatalog.buffering.status: #ACTIVE
@AbapCatalog.buffering.type: #GENERIC
@AbapCatalog.buffering.numberOfKeyFields: 1
define view business_partner as
select from snwd_bpa
{ key snwd_bpa.bp_id as id,
snwd_bpa.bp_role as role,
snwd_bpa.company_name,
snwd_bpa.phone_number }
Example
For user-defined annotations, see the example under annotations.
ABAP CDS - DEFINE VIEW, view_annot的更多相关文章
- ABAP CDS - DEFINE VIEW, name_list
Syntax ... ( name1, name2, ... ) ... Effect Defines the element names of a CDS view in ABAP CDS in a ...
- ABAP CDS - Syntax
The syntax of the DDL and of the DCL of the ABAP CDS comprises elements of the general DDL and DCL o ...
- Create Fiori List App Report with ABAP CDS view – PART 1
From Create Fiori List App Report with ABAP CDS view – PART 1 In this blog, I am going to show How C ...
- Create Fiori List App Report with ABAP CDS view – PART 2
In the Part 1 blog, we have discussed below topics CDS annotations for Fiori List Report. How to cre ...
- 教程:基于访问控制的ABAP CDS视图权限
Hi! 对每一个CDS视图,我们都可以通过DCL(Data Control Language)定义访问控制.在这篇文章中,我会介绍ABAP CDS视图中非常重要的一面:权限管理. 本文的阐述基于我正在 ...
- CDS测试框架介绍:如何为ABAP CDS Entities写测试
动机 现在大家都知道单元测试对我们代码的好处.并且我们都承认它是开发过程中不可或缺的一部分.但是在把代码切换到数据库的模式下的时候,我们被粗暴地打回了软件测试的黑暗年代...我们现在面临着逻辑下推到A ...
- 使用PlanViz进行ABAP CDS性能分析
如管理学学者彼得·德鲁克所说:你无法管理你不能衡量的东西( If you can't measure it, you can't manage it).要对已有程序进行性能优化,首先要对它的运行状况做 ...
- 【ABAP CDS系列】ABAP CDS中的系统信息
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP CDS系列]ABAP CDS中的系统 ...
- ABAP CDS 替换对象(Replacement Objects)引起的数据错误
最近遇到了一个诡异的问题:从CDS视图中取得的数据,和从透明表中取得的数据,会有不同的值.在这里记录下问题的表现和解决方案,以供参考. 系统版本:S/4HANA OP1610 涉及表:MCHB 本文链 ...
随机推荐
- go源码阅读 - container/ring
相比于List,环的结构有些特殊,环的头部就是尾部,所以每个元素可以代表自身这个环.环其实是一个双向回环链表.type Ring struct { next, prev *Ring Value int ...
- 手把手教会将 Windows 窗体桌面应用从.NET Framework迁移到 .NET SDK/.NET 6 格式
接上篇:手把手教会 VS2022 设计 Winform 高DPI兼容程序 (net461 net6.0 双出) https://www.cnblogs.com/densen2014/p/1614293 ...
- PyTorch 广播机制
PyTorch 广播机制 定义 PyTorch的tensor参数可以自动扩展其大小.一般的是小一点的会变大,来满足运算需求. 规则 满足一下情况的tensor是可以广播的. 至少有一个维度 两个ten ...
- i2c调试工具分享
i2c-tools简介 在嵌入式开发仲,有时候需要确认硬件是否正常连接,设备是否正常工作,设备的地址是多少等等,这里我们就需要使用一个用于测试I2C总线的工具--i2c-tools. i2c-tool ...
- 使用aspnetcore前后端分离开发,你一定要知道这个
前言 用过Vue单页面应用开发的,一定都知道Vue-router这个路由组件,它支持hash和history两种模式. HTML5 History 模式 vue-router 默认 hash 模式 - ...
- python自动化测试工具selenium使用指南
概述 selenium是网页应用中最流行的自动化测试工具,可以用来做自动化测试或者浏览器爬虫等.官网地址为:https://www.selenium.dev/.相对于另外一款web自动化测试工具QTP ...
- .NET混合开发解决方案8 WinForm程序中通过设置固定版本运行时的BrowserExecutableFolder属性集成WebView2控件
系列目录 [已更新最新开发文章,点击查看详细] 在我的博客<.NET混合开发解决方案7 WinForm程序中通过NuGet管理器引用集成WebView2控件>中介绍了WinForm ...
- Swift初探01 变量与控制流
Swift初探01 变量与控制流 输出"hello world"是几乎学习所有编程语言的第一课,这是程序员的情怀. 所以我们学习swift的第一步,就是输出一句"Hell ...
- c++动态内存分配需要注意的地方,可以不用尽量不用
在实际开发中,需要动态分配内存的场景极少,string和vector已经足够方便,如果不是非用不可的情况,采用动态分配内存就是给自己挖坑. 如果应用开发中一定要用动态内存分配技术,建议把它封装在类中, ...
- 从0到1使用kubebuiler开发operator
介绍 假设一个Nginx的QPS(服务器一秒内处理的请求数)上限为500,如果外部访问的QPS达到了600,为了保证服务质量,必须扩容一个Nginx来分摊请求. 在Kubernetes环境中,如果外部 ...