一步步创建ABAP CDS view

简介: 一步步创建ABAP CDS view
  1. Add AG3 or ER9 in your local SAPGUI.

image.png

  1. Open your ABAP Studio:

image.png

Select the system where you will work:

image.png

Click next:

image.png

Once done, you can find your new project:

image.png

Create your own package in SAPGUI:

image.png

And add it to favourite:

image.png

image.png

image.png

Paste the following source code:

@AbapCatalog.sqlViewName: 'zjerrySQLView'

 

@AbapCatalog.compiler.compareFilter: true

 

@AccessControl.authorizationCheck: #CHECK

 

@EndUserText.label: 'this is description'

 

define view Zjerrytest20160309(

 

   id,

 

   carrier,

 

   flight,

 

   departure,

 

   destination

 

 )

 

 as select from spfli

 

   join         scarr on scarr.carrid = spfli.carrid

 

{

 

 key spfli.carrid,

 

 key scarr.carrname,

 

 key spfli.connid,

 

     spfli.cityfrom,

 

     spfli.cityto

 

}

Activate your CDS view:

image.png

Test

image.png

or

image.png

Difference between lt_wrong and lt_right is that the former also contains a column with client field, which is not needed in application handling. Always use the approach indicated by lt_right.


Guideline

In the above example, the CDS database view zjerrysqlview serves mainly the internal technical purpose to realize the view in the dictionary. You can, but you should not use it in ABAP programs. Instead, you work with the CDS entity, whose name is defined behind DEFINE VIEW. In the example it is zjerrytest20160309. Only the entity carries the full capabilities of the CDS view, like semantical information, client handling, connection to authority checks (planned), and so on. You can use the CDS entity behind TYPE for declaring work areas and in Open SQL in ABAP programs.


相关文章
|
5月前
|
SQL Android开发
创建 SAP ABAP CDS View 保存失败 - Dependencies DDL source - View Entity not written
创建 SAP ABAP CDS View 保存失败 - Dependencies DDL source - View Entity not written
创建 SAP ABAP CDS View 保存失败 - Dependencies DDL source - View Entity not written
|
12月前
|
数据库
什么是 SAP ABAP CDS view 的 Filtered association?
什么是 SAP ABAP CDS view 的 Filtered association?
|
5月前
|
数据库 存储 BI
SAP ABAP CDS View 源代码存储的数据库表揭秘和其他相关数据库表介绍试读版
SAP ABAP CDS View 源代码存储的数据库表揭秘和其他相关数据库表介绍试读版
SAP ABAP CDS View 源代码存储的数据库表揭秘和其他相关数据库表介绍试读版
|
5月前
|
数据库
迈入 SAP CDS View 世界的前置知识 - SAP ABAP 数据库视图介绍试读版
迈入 SAP CDS View 世界的前置知识 - SAP ABAP 数据库视图介绍试读版
迈入 SAP CDS View 世界的前置知识 - SAP ABAP 数据库视图介绍试读版
|
5月前
|
数据库 SQL 应用服务中间件
SAP ABAP CDS View 和 HANA CDS View 相同点和不同点辨析
SAP ABAP CDS View 和 HANA CDS View 相同点和不同点辨析
SAP ABAP CDS View 和 HANA CDS View 相同点和不同点辨析
|
SQL 数据库
SAP ABAP CDS view 视图的 Replacement 技术介绍
SAP ABAP CDS view 视图的 Replacement 技术介绍
|
SQL 数据库连接 数据库
在 Excel 内使用 ODBC 消费 SAP ABAP CDS view
在 Excel 内使用 ODBC 消费 SAP ABAP CDS view
|
5月前
|
前端开发 开发工具 Android开发
小技巧分享 - 使用 Visual Studio Code 查看和修改 ABAP 代码试读版
小技巧分享 - 使用 Visual Studio Code 查看和修改 ABAP 代码试读版
小技巧分享 - 使用 Visual Studio Code 查看和修改 ABAP 代码试读版
|
5月前
|
BI
工具分享 - 将一个 ABAP Function Group 内所有 Function Module 按照代码行数从高到低排序并显示
工具分享 - 将一个 ABAP Function Group 内所有 Function Module 按照代码行数从高到低排序并显示
工具分享 - 将一个 ABAP Function Group 内所有 Function Module 按照代码行数从高到低排序并显示
|
5月前
|
开发者 供应链 BI
SAP ABAP CALL SUBSCREEN 代码解析
SAP ABAP CALL SUBSCREEN 代码解析

热门文章

最新文章

下一篇
无影云桌面