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. 今天记录一下h5跳转小程序,可以通过短信推广小程序

    今天记录一下h5跳转小程序最简单的方法,首先准备条件,是一个已经上线的小程序 根据URL Schame进行跳转,在微信公众平台登录自己的小程序,然后生成RL Schame,如下图 其次按照步骤进行小程 ...

  2. Pytest系列(一)初次了解

    在之前,我分享过unittest系列,后来有很多人问我,能不能出pytest的教程,正好最近在整理pytest相关的资料,那么,就趁着这个机会,去和大家分享一下pytest系列. pytest是一个非 ...

  3. 『现学现忘』Git基础 — 4、Git下载与安装

    目录 1.Git下载 2.Git在Windows下的详细安装 3.验证Git是否安装成功 1.Git下载 进入官方地址下载Git客户端:https://git-scm.com/download/win ...

  4. 约定编程与Sping AOP

    一.约定编程 Spring AOP是一种约定流程的编程,咱们可以先通过动态代理模式的实现来理解Spring AOP的概念. 代理的逻辑很简单,例如,当你需要采访一名儿童时,首先需要经过他父母的同意,在 ...

  5. Java 从零开始实现一个画图板、以及图像处理功能,代码可复现

    Java 从零开始实现一个画图板.以及图像处理功能,代码可复现 这是一个学习分享博客,带你从零开始实现一个画图板.图像处理的小项目,为了降低阅读难度,本博客将画图板的一步步迭代优化过程展示给读者,篇幅 ...

  6. 从零搭建Pytorch模型教程(三)搭建Transformer网络

    ​ 前言 本文介绍了Transformer的基本流程,分块的两种实现方式,Position Emebdding的几种实现方式,Encoder的实现方式,最后分类的两种方式,以及最重要的数据格式的介绍. ...

  7. CesiumJS 2022^ 原理[3] 渲染原理之从 Entity 看 DataSource 架构 - 生成 Primitive 的过程

    目录 API 用法回顾 1. 为什么要从 Viewer 访问 Entity API 1.1. 高层数据模型的封装 - DataSource API 1.2. 显示管理器 DataSourceDispl ...

  8. 封闭的一个多月,老菜鸟的 机械手和AGV 自动搬运小项目总结

    最近上海疫情严重,闲赋在家无事可做,手机里不断的推送一些无脑的谩骂声音,索性找点事情做,将3月份实施的一个自动搬运小项目做一个简单的汇总,便于今后项目实施中积累一些经验.项目需求非常简单,因为能力有限 ...

  9. 5 分钟教你快速掌握 GitHub Actions 自动部署博客

    自从 GitHub 宣布 GitHub Actions 在平台上对所有开发人员和存储库可用以来,GitHub Actions 越来越受欢迎.很多第三方平台在生态系统中有速度等限制,将进一步推动开发人员 ...

  10. 【ACM程序设计】求最小生成树 Kuskual算法

    Kuskual算法 流程 1 将图G看做一个森林,每个顶点为一棵独立的树 2 将所有的边加入集合S,即一开始S = E( 并查集) 3 从S中拿出一条最短的边(u,v),如果(u,v)不在同一棵树内, ...