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

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

  1. ABAP CDS - DEFINE VIEW, view_annot

    Syntax ... @annotation ... Effect Specifies Annotation annotation in the definition of a CDS view of ...

  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内容页模板过滤清理简介smalltext前后空格的方法!

    在内容模板你需要调用的地方使用如下代码输出简介即可过滤简介smalltext前后的空格了: <? $qian=array(" "," ","\t ...

  2. springboot打包时候忽略编译测试类

    方法1.可以在依赖中加入插件 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId ...

  3. JavaWeb和WebGIS学习笔记(三)——GeoServer 发布shp数据地图

    系列链接: Java web与web gis学习笔记(一)--Tomcat环境搭建 Java web与web gis学习笔记(二)--百度地图API调用 JavaWeb和WebGIS学习笔记(三)-- ...

  4. 【FAQ】接入HMS Core地图服务过程中常见问题总结

    HMS Core地图服务(Map Kit)给开发者提供一套地图开发调用的SDK,助力全球开发者实现个性化地图呈现与交互,方便轻松地在应用中集成地图相关的功能,全方位提升用户体验. 在日常工作中,我们会 ...

  5. 【CSAPP】Bomb Lab实验笔记

    bomblab这节搞的是二进制拆弹,可以通俗理解为利用反汇编知识找出程序的六个解锁密码. 早就听闻BOMBLAB的大名,再加上我一直觉得反汇编是个很艰难的工作,开工前我做好了打BOSS心理准备.实际上 ...

  6. B+树能存多少数据?

    B+树能存多少数据? 图 MySQL B+树示意图 InnoDB页的大小默认是16KB: 假设一条记录大小为1KB,则一个数据页中可以存16条数据(忽略页中的其他数据结构) 假设主键为int,又指针大 ...

  7. Spring 源码(11)Spring Bean 的创建过程(2)

    Spring Bean 的创建过程介绍了FactoryBean 的创建方式,那么接下来介绍不是FactoryBean的创建方式,在创建过程中,又会分为单例的Bean的创建,原型类型的Bean的创建等. ...

  8. vue - Vue路由

    至此基本上vue2.0的内容全部结束,后面还有点elementUI和vue3.0的内容过几天再来更新. 这几天要回学校去参加毕业答辩,断更几天 一.相关理解 是vue的一个插件库,专门用来实现spa( ...

  9. python 批量探测服务端开放的TCP端口

    现在大多服务器都有做icmp限制或直接禁掉,导致我们业务去连接服务器异常时无法判断是程序问题还是网络问题,所以写一个简单探测tcp端口脚本来探测服务器所开放的端口,再使用tcp测试双向时延来排掉网络问 ...

  10. unity---光照基础

    发射光源类型 光照参数介绍 让摄像头看到Flare 耀斑 改变影子