Create a CDS view and we have the view type as ‘BASIC’ view

To publish this as oData, add the annotation as: @OData.publish: true


@AbapCatalog.sqlViewName: ‘ZFLIGHT_VW’
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: ‘Flight View CDS’
@VDM.viewType: #BASIC
@OData.publish: true
define view Zflight_View
as select from sflight
{
key sflight.carrid,
key sflight.connid,
key sflight.fldate,
sflight.price,
sflight.currency,
sflight.planetype,
sflight.seatsmax,
sflight.seatsocc
}

  


Activate the view. Then a symbol would appear at the line: @OData.publish: true, whihc tells that a service ‘ZFLIGHT_VIEW_CDS’ created and we have to add this service on Tx- /IWFND/MAINT_SERVICE


Go to the Tx- /IWFND/MAINT_SERVICE, click on Add Service button

Provide the alias name, and the service name and hit enter key.

The created service will appear in the list. Select the service and click on Add Selected Service.

Select local object and continue.

The information appears.

In the hana studio, activate the the view and a new symbol appears at the line’@OData.publish: true’ . Put the cursor on the mark

Click on the link: OData-Service

Here is the service. Now change the url and put ‘$metadata’


So here the service metadata information appears.

sap/opu/odata/sap/ZFLIGHT_VIEW_CDS/$metadata


To execute the view and get the details, change the url sap/opu/odata/sap/ZFLIGHT_VIEW_CDS/Zflight_View

It returns all the entries.

ABAP CDS ON HANA-(12)ODATA Service的更多相关文章

  1. HANA CDS与ABAP CDS

    如果你在网络或者SCN上面搜索CDS,即SAP的Core Data Services,你会很容易地找到类似“Core Data Services(CDS)是一个在SAP HANA中用于定义和消费富语义 ...

  2. 如何在SAP云平台ABAP编程环境里把CDS view暴露成OData服务

    Jerry 2016年在学习SAP CDS view时,曾经写过一个CDS view的自学系列,其中有一篇提到了一个很方便的注解: @OData.publish: true 加上这个注解的CDS vi ...

  3. 使用ABAP CDS视图创建服务

    介绍本文介绍使用ABAP Core Data Services创建OData服务的最快方法. 给出了有关@ OData.publish注释利用率,对数据源CDS实体的引用和从DDIC结构导入的详细信息 ...

  4. 教程:基于访问控制的ABAP CDS视图权限

    Hi! 对每一个CDS视图,我们都可以通过DCL(Data Control Language)定义访问控制.在这篇文章中,我会介绍ABAP CDS视图中非常重要的一面:权限管理. 本文的阐述基于我正在 ...

  5. 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 ...

  6. ABAP CDS-Part 1(ABAP CDS实体)

    文章翻译自Tushar Sharma的文章,转载请注明原作者和译者! 目录 预备条件 一.概述 二.ABAP CDS实体(CDS Entity) a.定义ABAP CDS Views b.ABAP C ...

  7. 使用PlanViz进行ABAP CDS性能分析

    如管理学学者彼得·德鲁克所说:你无法管理你不能衡量的东西( If you can't measure it, you can't manage it).要对已有程序进行性能优化,首先要对它的运行状况做 ...

  8. ABAP CDS ON HANA-(5)テーブル結合ビュー

    JOINs in CDS View In ABAP CDS, Join between two data sources is allowed. Allowed joins are:- Inner J ...

  9. ABAP CDS - SELECT, association

    ABAP CDS - SELECT, association Syntax ... ASSOCIATION [ [min..max] ] TO target [AS _assoc] ON cond_e ...

随机推荐

  1. python操作oracle小测试

    首先使用python操作数据库需要导入cx_Oracle包import cx_Oracle这个包需要单独下载,下载地址:https://pypi.python.org/pypi/cx_Oracle使用 ...

  2. C++中的RAII(转)

    转自https://blog.csdn.net/wangshubo1989/article/details/52133213 有很多东西我们一直在用,但是不知道他的名字. 什么是RAII? RAII是 ...

  3. POJ-3273 Monthly Expense---最小化最大值

    题目链接: https://cn.vjudge.net/problem/POJ-3273 题目大意: 给N个数,划分为M个块(不得打乱数顺序).找到一个最好的划分方式,使得块的和的最大值 最小 解题思 ...

  4. Window下搭建foundation apps环境

    Window下搭建foundation apps环境 框架:AngularJS.Foundation, 构建工具:Gulp, 开发环境:node.js. 操作系统:windows (一)环境准备 1 ...

  5. serlvet配置xml和@WebServlet

    简单介绍 XML元素不仅是大小写敏感的,而且它们还对出现在其他元素中的次序敏感.例如,XML头必须是文件中的第一项,DOCTYPE声明必须是第二项,而web-app元素必须是第三项.在web-app元 ...

  6. 【luogu P1402 酒店之王】 题解

    题目链接:https://www.luogu.org/problemnew/show/P1402 菜 #include <queue> #include <cstdio> #i ...

  7. 【luogu P2298 Mzc和男家丁的游戏】 题解

    题目链接:https://www.luogu.org/problemnew/show/P2298 对于迷宫问题,bfs是比较好的选择. 直接bfs模板 #include <iostream> ...

  8. sql得到表中的列信息

    取列全部用的 sys. 中的表 CTE:WITH name AS() 用法:   sql树形查询 ①主键信息 SELECT ic.column_id, ic.index_column_id, ic.o ...

  9. chrome中的network面板,怎么添加method(请求类型)选项.

  10. SpingMVC前置控制器过滤问题

    /<servlet-mapping> <servlet-name>Springmvc</servlet-name> <url-pattern>/< ...