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 本文链 ...
随机推荐
- 省掉80%配置时间,这款Mock神器免费又好用
前端的痛苦 作为前端,最痛苦的是什么时候? 每个迭代,需求文档跟设计稿都出来了,静态页面唰唰两天就做完了.可是做前端又不是简单地把后端吐出来的数据放到页面上就完了,还有各种前端处理逻辑啊. 后端接口还 ...
- synchronized有几种用法?
在 Java 语言中,保证线程安全性的主要手段是加锁,而 Java 中的锁主要有两种:synchronized 和 Lock,我们今天重点来看一下 synchronized 的几种用法. 用法简介 使 ...
- javaWeb代码整理02-jdbcTemplete数据库连接工具
jar包: maven坐标: /**属于spring框架的包*/<dependency> <groupId>org.springframework</groupId> ...
- PyTorch环境配置
PyTorch环境配置 本文档用于记录PyTorch环境配置过程中的要点. PyTorch环境配置 安装Miniconda 安装PyTorch 配置远程开发工具 基于CUDA的张量 导入警告问题 参考 ...
- MQTT物联网通讯协议入门
目录 一.MQTT协议概念 发布/订阅机制 MQTT客户端 Broker代理(服务器) MQTT消息结构 二.MQTT协议实现原理 MQTT连接 MQTT消息发布 MQTT订阅机制 MQTT订阅确认 ...
- vue项目中的去抖与节流
节流 // fn是我们需要包装的事件回调, interval是时间间隔的阈值 function throttle(fn, interval) { let last = 0; // last为上一次触发 ...
- python数据处理-matplotlib入门(2)-利用随机函数生成变化图形2
鉴于上一篇中最后三个问题: 1.上述程序是否能进行优化(比如功能相同的) 2.创建三个3个实例,用了3个语句,能否建一个函数,只输入一个数n,就自动创建n个实例?同时,每个实例的num_times随机 ...
- vue package.json 详解
示例: { "name": "scrm", "version": "0.1.0", "private" ...
- [cf]Codeforces Round #784(Div 4)
由于一次比赛被虐得太惨,,生发开始写blog的想法,于是便有了这篇随笔(找了个近期的cf比赛练练手(bushi))第一次写blog,多多包涵. 第二场cf比赛,第一场打的Div2,被虐太惨,所以第二场 ...
- 通过配置文件(.htaccess)实现文件上传
一·什么是服务器配置文件.htaccess 许多服务器还允许开发人员在各个目录中创建特殊的配置文件,以便覆盖或添加一个或多个全局设置.例如,Apache 服务器将从一个名为(.htaccess如果存在 ...