ABAP CDS - DEFINE VIEW, name_list
Syntax
... ( name1, name2, ... ) ...
Effect
Defines the element names of a CDS view in ABAP CDS in a name list. The specified names name1, name2, ... are assigned to the elements defined explicitly in the SELECT list of the SELECT statement in the order given. The names function like the alternative names defined in the SELECT list using AS and overwrite these names. If a name list is specified, it must contain a name for each element of the view.
The view field is created under the element name in the CDS database view. Accordingly, an element name must comply with the rules for names of view fields of database views, as well as the general naming rules for names:
which means that it must also meet the
- naming conventions for component names of structures in ABAP Dictionary and
- cannot be a reserved component name. The reserved names that cannot be used are in the database table TRESE.
A name list can be specified only if the elements in the SELECT list are specified explicitly. No name lists can be used if the SELECT list is specified as * or if the element list contains the entry $EXTENSION.*.
Notes
- An explicit name list can be used, for example, to define the element names of a CDS view that defines a union set of multiple SELECT statements using UNION.
- A CDS view with an explicit name list cannot be expanded using EXTEND VIEW.
Example
Defines the names of the four elements of the CDS view business_partner as id, role, company_name, and phone_number.
- @AbapCatalog.sqlViewName: 'BPA_VW'
define view business_partner
(id, role, company_name, phone_number) as
select from snwd_bpa
{ key snwd_bpa.bp_id,
snwd_bpa.bp_role,
snwd_bpa.company_name,
snwd_bpa.phone_number }
Example
Defines the names of the three elements of the CDS view employee_sales_figures as financial_year, employee_id, and gross_amount.
- @AbapCatalog.sqlViewName: 'SALES_FIG_VW'
view employee_sales_figures
(financial_year, employee_id, gross_amount) as
select from sales_2011_tab
{ key '2011' as year,
key id,
amount }
union
select from sales_2012_tab
{ '2012' as year,
employee_number,
gross_amount }
ABAP CDS - DEFINE VIEW, name_list的更多相关文章
- ABAP CDS - DEFINE VIEW, view_annot
Syntax ... @annotation ... Effect Specifies Annotation annotation in the definition of a CDS view of ...
- 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 本文链 ...
随机推荐
- 『现学现忘』Git基础 — 2、Git和SVN的区别
1.Git和SVN的区别 (1)SVN(集中式版本管理系统) 集中式的版本控制系统都有一个单一的集中管理的服务器,保存所有文件的修订版本,而协同工作的人们都通过客户端连到这台服务器,取出最新的文件或者 ...
- 『忘了再学』Shell基础 — 9、Bash中的特殊符号(一)
目录 1.双单引号 2.双引号 3.$符号 4.反引号 5.$()符号 6.#符号 7.\符号 1.双单引号 '':单引号.在单引号中所有的特殊符号,如$和"`"(反引号)都没有特 ...
- css 让一行文字 字与字的隔开一点
效果: css: letter-spacing: 5rpx; 我这是小程序. 单位自带.px rem em这些,随自己需要带.
- 【FAQ】HMS Core推送服务与本地创建通知消息如何相互覆盖?
我们知道,单独使用HMS Core推送服务或本地创建通知消息,都可以实现通知消息的覆盖,方式分别为: 1.本地创建通知消息(简称本地通知消息) 通过notificationManager.notify ...
- [AcWing 35] 反转链表
迭代版本 点击查看代码 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next ...
- vue 时间过滤器
过滤器:定义:对要显示的数据进行特定格式化后再显示(适用于一些简单逻辑的处理).语法:1.注册过滤器: Vue.filter(name ,callback)或new Vue{filters:{}}2. ...
- 【mq】从零开始实现 mq-03-引入 broker 中间人
前景回顾 [mq]从零开始实现 mq-01-生产者.消费者启动 [mq]从零开始实现 mq-02-如何实现生产者调用消费者? [mq]从零开始实现 mq-03-引入 broker 中间人 上一节我们学 ...
- 软件包管理-yum私有仓库
Linux软件安装 包的依赖关系: 软件包之间可能存在依赖关系,甚至循环依赖,即:A包依赖B包,B包依赖C包,C包依赖A包 安装软件包时,会因为缺少依赖的包,而导致安装包失败. 解决依赖包管理工具: ...
- 做SaaS的程序员们,是时候关注企业架构了
SaaS赛道是一个超大赛道,足够容纳上万家服务商,不太可能有哪个服务商能满足所有场景,大部分SaaS服务商在某个垂直领域,提供差异化的产品和服务.SaaS产品大部分都是面向B端客户,少部分面向C端客户 ...
- .NET 中 GC 的模式与风格
垃圾回收(GC)是托管语言必备的技术之一.GC 的性能是影响托管语言性能的关键.我们的 .NET 既能写桌面程序 (WINFROM , WPF) 又能写 web 程序 (ASP.NET CORE),甚 ...