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 本文链 ...
随机推荐
- nacos集群模式搭建踩坑记录
首先数据库使用的本地的mysql 1.看日志提示no set datasource,使用虚拟机ping本地后发现无法ping通,原因是本地没有关闭防火墙. 2.看日志提示不允许建立数据库连接,原因是r ...
- Vue使用PostCSS 插件和如何使用sass及常用语法
为什么要使用PostCss 转换 px 单位的插件有很多,知名的有 postcss-px-to-viewport 和 postcss-pxtorem,前者是将 px 转成 vw,后者是将 px 转成 ...
- 随机获取gbr颜色值
- 小米手机简单 ROOT教程(百分百成功)
大家都知道啊,由于小米自带的换机软件不支持一些应用数据的还原,所以需要使用钛备份来还原应用和数据.但是钛备份需要root才能用,因为有些机器刚出没多久,第三方的recovery也没有,所以需要找到一种 ...
- bellman-ford 单源最短路问题 图解
核心思想:松弛操作 对于边(u,v),用dist(u)和(u,v)的和尝试更新dist(v): dist(v) = min(dist(v) , dist(u)+l(u,v) 注:dist(i)为源 ...
- IP地址的格式和分类,你都清楚吗?
一个执着于技术的公众号 在网际层中,利用 IP 地址将数据传输到目的地.为了能够使数据正确地发送到目标主机上,网络上的 IP 地址必须有一定的规则来识别主机的位置. IP地址的基本构成 为了便于寻址, ...
- mySql in 语句查询优化
有这么一条sql UPDATE product set BuyerCount =BuyerCount+1 where ProductId in( SELECT ProductId from order ...
- 【多线程】创建线程方式一:继承Thread类
创建线程方式一:继承Thread类 代码示例: /** * @Description 继承Thread类,重写run方法,调用start开启线程 * @Author hzx * @Date 2022- ...
- 206. Reverse Linked List - LeetCode
Question 206. Reverse Linked List Solution 题目大意:对一个链表进行反转 思路: Java实现: public ListNode reverseList(Li ...
- 满满干货!手把手教你实现基于eTS的分布式计算器
最近收到很多小伙伴反馈,想基于扩展的TS语言(eTS)进行HarmonyOS应用开发,但是不知道代码该从何处写起,从0到1的过程让新手们抓狂. 本期我们将带来"分布式计算器"的开发 ...