使用SAP C4C OData notification实现CRM和C4C的数据同步

简介: 使用SAP C4C OData notification实现CRM和C4C的数据同步

There is a useful feature OData notification in C4C which allows any kinds of external applications such as other SAP system or third party applications to hook the create, update and delete of a given business object in C4C.


In this blog, I will demonstrate the technical steps needed to monitor the create or update of C4C Opportunity in SAP CRM On-Premise system, that is, whenever a new Opportunity is created or updated in C4C, this change event is logged in SAP CRM accordingly. This might not be a valid case from business perspective, but you could just follow the steps to build your own integration scenario.


Detail steps

(1) Log on C4C, work center Administrator, General Settings

->OData: Event Notification to External Systems


image.png


Create a new Consumer by clicking button Add Row. Suppose system A6P is my CRM On-Premise and client 213 is the client where I expect to monitor the C4C Opportunity creation.


Here I specify Consumer Endpoint as https:///sap/bc/bsp/sap/crm?sap-client=213, which means once the ICF service in CRM under path /sap/bc/bsp/sap/crm will be called to log the C4C opportunity creation. I will create the ICF handler for this service in CRM in next step.


image.png


In Subscription tab, select corresponding Business Object and OData service for Opportunity. Since I am only interested with Create and Update, so mark the first two check-boxes accordingly.


image.png


(2) Go to CRM system, create a new ICF service in tcode SICF under path /sap/bc/bsp/sap/crm.

Of course you could change the path according to your own requirement.


image.png


Create a new handler class for this service and activate both.


image.png

It is ready now to write some real logic in CRM.


Paste the following source code and activate the class.


image.pngimage.png

image.png

Now go to C4C system, make some changes on Opportunity name field, for example change it to “Jerry change demo”,


image.png


And then the handler method in CRM will automatically be called.


Here below is an example of payload sent from C4C system, including BO instance id and change event type.


image.png


The detail information of changed opportunity could also be retrieved as well.


image.png


Further reading

You can find a list of all other blogs related to OData written by Jerry.


Consume standard C4C OData service via ABAP code

Leverage C4C Odata notification to monitor C4C Opportunity change in CRM system

OData Service backend implementation in C4C, CRM and S4 HANA

JMeter beginner – how to use JMeter to measure performance of OData service accessed parallelly

Regarding cookie manipulation in CL_HTTP_CLIENT to avoid CSRF token validation failure issue


相关文章
|
3月前
|
缓存 UED
关于 SAP OData Annotation Provider Class 以及 metadata 模型注册的事务码
关于 SAP OData Annotation Provider Class 以及 metadata 模型注册的事务码
28 0
|
4月前
|
XML API 数据格式
SAP 标准 OData 服务 CATALOGSERVICE;v=2 的作用介绍
SAP 标准 OData 服务 CATALOGSERVICE;v=2 的作用介绍
24 0
|
7月前
|
搜索推荐 前端开发 JavaScript
关于 SAP Fiori Launchpad 工作所依赖的 OData 服务
关于 SAP Fiori Launchpad 工作所依赖的 OData 服务
56 0
|
4月前
|
供应链 中间件
SAP CRM 和 ERP 系统之间的主数据同步 - PRODUCT_R3_ADAPTER
SAP CRM 和 ERP 系统之间的主数据同步 - PRODUCT_R3_ADAPTER
72 0
|
4月前
|
监控 前端开发 数据可视化
SAP 标准 OData 服务 ABAP_REPOSITORY_SRV 的作用介绍
SAP 标准 OData 服务 ABAP_REPOSITORY_SRV 的作用介绍
33 1
|
1月前
关于 SAP ABAP OData 服务如何实现 Deep Insert 场景 - SAP 应用的标准行为试读版
关于 SAP ABAP OData 服务如何实现 Deep Insert 场景 - SAP 应用的标准行为试读版
16 1
|
2月前
|
消息中间件 分布式计算 DataWorks
DataWorks常见问题之sap haha数据同步kafka如何解决
DataWorks是阿里云提供的一站式大数据开发与管理平台,支持数据集成、数据开发、数据治理等功能;在本汇总中,我们梳理了DataWorks产品在使用过程中经常遇到的问题及解答,以助用户在数据处理和分析工作中提高效率,降低难度。
51 6
|
2月前
|
数据库 开发者 容器
SAP OData metadata.xml 里 EntityType,EntitySet 和 EntityContainer 三个概念之间的区别和联系
SAP OData metadata.xml 里 EntityType,EntitySet 和 EntityContainer 三个概念之间的区别和联系
26 0
|
4月前
|
API
SAP Fiori Elements 针对 OData V2 和 V4 的 Extension API
SAP Fiori Elements 针对 OData V2 和 V4 的 Extension API
28 0
|
4月前
|
缓存 搜索推荐 开发者
关于 SAP 标准 OData 服务 /sap/bc/adt/ato/settings 的作用
关于 SAP 标准 OData 服务 /sap/bc/adt/ato/settings 的作用
37 0