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的更多相关文章

  1. ABAP CDS - DEFINE VIEW, name_list

    Syntax ... ( name1, name2, ... ) ... Effect Defines the element names of a CDS view in ABAP CDS in a ...

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

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

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

  5. 教程:基于访问控制的ABAP CDS视图权限

    Hi! 对每一个CDS视图,我们都可以通过DCL(Data Control Language)定义访问控制.在这篇文章中,我会介绍ABAP CDS视图中非常重要的一面:权限管理. 本文的阐述基于我正在 ...

  6. CDS测试框架介绍:如何为ABAP CDS Entities写测试

    动机 现在大家都知道单元测试对我们代码的好处.并且我们都承认它是开发过程中不可或缺的一部分.但是在把代码切换到数据库的模式下的时候,我们被粗暴地打回了软件测试的黑暗年代...我们现在面临着逻辑下推到A ...

  7. 使用PlanViz进行ABAP CDS性能分析

    如管理学学者彼得·德鲁克所说:你无法管理你不能衡量的东西( If you can't measure it, you can't manage it).要对已有程序进行性能优化,首先要对它的运行状况做 ...

  8. 【ABAP CDS系列】ABAP CDS中的系统信息

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP CDS系列]ABAP CDS中的系统 ...

  9. ABAP CDS 替换对象(Replacement Objects)引起的数据错误

    最近遇到了一个诡异的问题:从CDS视图中取得的数据,和从透明表中取得的数据,会有不同的值.在这里记录下问题的表现和解决方案,以供参考. 系统版本:S/4HANA OP1610 涉及表:MCHB 本文链 ...

随机推荐

  1. 帝国cms插件 解决后台修改信息时内容关键字不替换的问题

    很多站长是不是发现了帝国cms增加信息时,是有关键词替换的,这样是有利于网站优化排名. 但是在后台格式化数据之后,再去进行修改之后,对不起,内容关键字就实效了. 针对这一问题,解决方案如下: 找到 / ...

  2. 安卓记账本开发学习day1

    学习了一些简单的布局与界面设计

  3. OpenHarmony 3.1 Beta 样例:使用分布式菜单创建点餐神器

    (以下内容来自开发者分享,不代表 OpenHarmony 项目群工作委员会观点) 刘丽红 随着社会的进步与发展,科技手段的推陈出新,餐饮行业也在寻求新的突破与变革,手机扫描二维码点餐系统已经成为餐饮行 ...

  4. PHP入门-Window 下利用Nginx+PHP 搭建环境

    前言 最近公司有个PHP项目需要开发维护,之前一直都是跟着巨硬混的,现在要接触PHP项目.学习一门新语言之前,先搭建好环境吧,鉴于公司项目是基于php 7.1.33 版本的,所以以下我使用的都是基于这 ...

  5. 程序员延寿指南「GitHub 热点速览 v.22.17」

    很多人对程序员的固有印象之一便是常加班.易"猝死"!近几年的许多报道似乎也进一步加深了这种印象.应该如何更好地健康地活着.敲喜欢的代码呢?HowToLiveLonger 教你如何从 ...

  6. XCTF练习题---MISC---快乐游戏题

    XCTF练习题---MISC---快乐游戏题 flag:UNCTF{c783910550de39816d1de0f103b0ae32} 解题步骤: 1.观察题目,下载附件 2.还真是一个游戏,赢了就得 ...

  7. 【CSAPP】Cache Lab 实验笔记

    cachelab这节先让你实现个高速缓存模拟器,再在此基础上对矩阵转置函数进行优化,降低高速缓存不命中次数.我的感受如上一节,实在是不想研究这些犄角旮旯的优化策略了. 前期准备 我实验的时候用到了va ...

  8. C++基础-3-函数

    3. 函数 3.1 函数默认参数 1 #include<iostream> 2 using namespace std; 3 4 //函数的默认参数 5 //自己传参,就用自己的,如果没有 ...

  9. 经典!服务端 TCP 连接的 TIME_WAIT 过多问题的分析与解决

    开源Linux 专注分享开源技术知识 本文给出一个 TIME_WAIT 状态的 TCP 连接过多的问题的解决思路,非常典型,大家可以好好看看,以后遇到这个问题就不会束手无策了. 问题描述 模拟高并发的 ...

  10. AspNetCore7.0源码解读之UseMiddleware

    Use​Middleware​Extensions 前言 本文编写时源码参考github仓库主分支. aspnetcore提供了Use方法供开发者自定义中间件,该方法接收一个委托对象,该委托接收一个R ...