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

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

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


SPRO里面:

image.png


这个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.

image.png


image.png


通过http://diablo.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/KaTeX parse error: Expected 'EOF', got '&' at position 24: …?sap-client=001&̲format=xml


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


image.png


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


image.png


然后我们在IE里面测试:

http://ldcigm2.jerry.corp:50018/sap/opu/sdata/sap/CUSTOMER_BRIEFING/CustomerCollection?sap-client=001&$format=xml&search


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


image.png


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:


image.png


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


image.png


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

image.png


image.png


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

image.png


image.png

相关文章
|
1月前
|
中间件
什么是 SAP CRM 系统里的 Initial Download
什么是 SAP CRM 系统里的 Initial Download
23 0
|
2月前
|
缓存 UED
关于 SAP OData Annotation Provider Class 以及 metadata 模型注册的事务码
关于 SAP OData Annotation Provider Class 以及 metadata 模型注册的事务码
26 0
|
3月前
|
数据采集 供应链 数据管理
关于评估 SAP 主数据的数据初始化对 SAP 系统影响范围的方法论
关于评估 SAP 主数据的数据初始化对 SAP 系统影响范围的方法论
42 0
|
12天前
|
Java BI API
SAP Cloud for Customer 里如何通过 ABSL 二次开发方式消费 SAP S/4HANA 系统的 API
SAP Cloud for Customer 里如何通过 ABSL 二次开发方式消费 SAP S/4HANA 系统的 API
12 0
|
1月前
|
数据库 开发者 容器
SAP OData metadata.xml 里 EntityType,EntitySet 和 EntityContainer 三个概念之间的区别和联系
SAP OData metadata.xml 里 EntityType,EntitySet 和 EntityContainer 三个概念之间的区别和联系
24 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

热门文章

最新文章