SAP OData service的执行是如何从Gateway系统转交到backend系统

简介:

下面是我今天研究的后台OData数据的model以及如何在IE里面consume:

SPRO里面:

这个model provider class定义了LWM_CUSTOMER_BRIEFING这个model的所有structure,以及structure之间的相互关系。
现在没有一个图形化界面的tool来做modelling,我们只能在CL_LWM_CB_ADAPTER_MDP的DEFINE里面定义model的structure。具体做法是预先定义好后台要使用的entity的data type,
Customer briefing 所有使用到的DDIC object全部放在这个package里面:LWM_CRM_CUSTOMER_BRIEFING

在DEFINE里面,通过ABAP 代码创建一个个entity,给它们绑上DDIC object,同时建立相互关系,如association.


通过http://ldcigm2.herr.corp:50018/sap/opu/sdata/sap/customer_briefing?sap-client=001 我们可以拿到customer briefing的service document。
Service document里面只定义了哪些entity暴露了哪些操作,真正metadata的full definition xml用这个URL down:
http://ldcigm2.jerry.corp:50018/sap/opu/sdata/sap/customer_briefing/$metadata?sap-client=001&$format=xml

service document也能通过SICF进去之后,从sap node出发,点test拿到。

比如这部分就说明CustomerCollection这个节点能够执行“search”的action:

然后我们在IE里面测试:
http://ldcigm2.jerry.corp:50018/sap/opu/sdata/sap/CUSTOMER_BRIEFING/CustomerCollection?sap-client=001&$format=xml&search

返回所有的Customer信息,Customer node的property就是在figure1里面看到的那些。

Search 所有name property中包含“UT_Customer” 的Customer
http://ldcigm2.jerry.corp:50018/sap/opu/sdata/sap/CUSTOMER_BRIEFING/CustomerCollection?sap-client=001&$format=xml&search=UT_Customer

返回Partner ID = 133的customer的detail 信息
http://ldcigm2.jerry.corp:50018/sap/opu/sdata/sap/CUSTOMER_BRIEFING/CustomerCollection(133)?sap-client=001&$format=xml

所有这些操作都在service provider class CL_LWM_CB_ADAPTER_RDP里面实现,

如果我们直接在IE里面通过http://ldcigm2.jerry.corp:50018/sap/opu/sdata/sap/CUSTOMER_BRIEFING/CustomerCollection(133)?sap-client=001&$format=xml
的URL consume OData service:

Gateway 系统上首先会根据OData service expose出来的external name找到internal使用的service ID:

然后根据service ID找到对应的CRM 系统的destination:

通过RFC直接call CRM系统上的一个remote function module:


在CRM的这个FM上设个断点,发现断点已经被触发了。

本文来自云栖社区合作伙伴“汪子熙”,了解相关信息可以关注微信公众号"汪子熙"。

相关文章
|
1月前
|
中间件
什么是 SAP CRM 系统里的 Initial Download
什么是 SAP CRM 系统里的 Initial Download
23 0
|
10天前
|
Java BI API
SAP Cloud for Customer 里如何通过 ABSL 二次开发方式消费 SAP S/4HANA 系统的 API
SAP Cloud for Customer 里如何通过 ABSL 二次开发方式消费 SAP S/4HANA 系统的 API
12 0
|
2月前
|
安全 数据安全/隐私保护
SAP ABAP Gateway 系统接口 /IWBEP/IF_MGW_APPL_SRV_RUNTIME 的作用介绍
SAP ABAP Gateway 系统接口 /IWBEP/IF_MGW_APPL_SRV_RUNTIME 的作用介绍
27 0
|
2月前
|
SQL 开发框架 数据库
聊聊 SAP ABAP 系统里的胖接口(Fat Interface)
聊聊 SAP ABAP 系统里的胖接口(Fat Interface)
28 0
|
2月前
|
搜索推荐
关于 SAP ABAP 系统的 User parameter COM_IOITF_DEBUG
关于 SAP ABAP 系统的 User parameter COM_IOITF_DEBUG
17 0
|
2月前
|
存储 BI 数据库
SAP ABAP 系统数据库表 TFDIR的作用介绍
SAP ABAP 系统数据库表 TFDIR的作用介绍
33 1
|
2月前
|
数据库 开发工具 Windows
聊聊 SAP ABAP 系统的 ABAP 对象注册表 TADIR试读版
聊聊 SAP ABAP 系统的 ABAP 对象注册表 TADIR试读版
16 0
|
2月前
|
存储 数据库
如何查询 SAP ABAP 系统做过的基于源代码的增强信息试读版
如何查询 SAP ABAP 系统做过的基于源代码的增强信息试读版
19 0
|
9天前
|
负载均衡 Nacos 数据安全/隐私保护
SpringCloud GateWay 使用
SpringCloud GateWay 使用
17 0
|
1月前
|
缓存 Java API
【云原生】Spring Cloud Gateway的底层原理与实践方法探究
【云原生】Spring Cloud Gateway的底层原理与实践方法探究