当前位置:网站首页>ABAP 从CDS VIEW 发布OData Service示例
ABAP 从CDS VIEW 发布OData Service示例
2022-04-23 06:25:00 【rogerix4】
1. 创建可供发布Odata Service 的 CDS VIEW
- 新建一个简单点CDS VIEW,并添加必要Annotation参数:@OData.publish: true
- 其他Annotation参数:ABAP CDS - ABAP Annotations

2. 在SAP GATEWAY上发布Odata服务
- 事务代码:/IWFND/MAINT_SERVICE(注意在事务代码前加/n或/o参数)
- 添加一个新的服务

- 填写参数



3. 访问Odata服务
-
直接调用浏览器访问
-
http://xxxx.com:8000/sap/opu/odata/sap/ZCDS_ODATA_01_CDS/?$format=xml


-
可通过调整参数**$format=json**,获取指定格式的数据
-
http://xxxx.com:8000/sap/opu/odata/sap/ZCDS_ODATA_01_CDS/?$format=json

-
获取视图全部数据
-
http://xxxx.com:8000/sap/opu/odata/sap/ZCDS_ODATA_01_CDS/ZCDS_ODATA_01?$format=json

-
仅读取某一行数据
-
http://xxxx.com:8000/sap/opu/odata/sap/ZCDS_ODATA_01_CDS/ZCDS_ODATA_01(‘127’)?$format=json

-
http://xxxx.com:8000/sap/opu/odata/sap/ZCDS_ODATA_01_CDS/ZCDS_ODATA_01(‘127’)?$format=xml

版权声明
本文为[rogerix4]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_30797051/article/details/123893329
边栏推荐
猜你喜欢

Django使用mysql数据库报错解决

Reflect on the limitations of event bus and the design and implementation of communication mechanism in component development process

Design optimization of MySQL database

SAP pi / PO rfc2soap publishes RFC interface as WS example

Background management system framework, there is always what you want

redis连接出错 ERR AUTH <password> called without any password configured for the default user.

基于可视化结构的身份证号码校验系统-树莓派实现

Solutions to common problems in visualization (VII) solutions to drawing scale setting

Implementation of MySQL persistence

SAP PI/PO rfc2RESTful 發布rfc接口為RESTful示例(Proxy間接法)
随机推荐
On BFC (block formatting context)
SAP DEBUG调试FOR IN、REDUCE等复杂的语句
SAP ECC连接SAP PI系统配置
Mysql持久性的实现
[CodeForces - 208E] Blood Cousins(k代兄弟问题)
技能点挖坑
[Ted series] how to get along with inner critics?
Authorization server (simple construction of authorization server)
8. Paging query
菜菜的刷题日记 | 蓝桥杯 — 十六进制转八进制(纯手撕版)附进制转换笔记
Applet newline character \ nfailure problem resolution - Daily pit stepping
简易随机点名抽奖(js下编写)
[hdu6833]A Very Easy Math Problem(莫比乌斯反演)
Learn to use search engines
学习笔记5-梯度爆炸和梯度消失(K折交叉验证)
嵌入式相关面经(一)
[2020WC Day2]F.采蘑菇的克拉莉丝(子树和查询、轻重儿子思想)
数论之阶与原根讲解
[牛客挑战赛47]C.条件 (bitset加速floyd)
Two threads print odd and even numbers interactively