Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A lightweight way to synchronize C4C business data to S4HANA: Odata notification

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The synchronization of SAP Cloud for Customer and other traditional SAP products, in addition to using SAP Netweaver Process Integration and SAP HANA Cloud Integration, there are some lightweight synchronization methods.

This article introduces one of them, C4C OData Notification (Notification).

Log in to the C4C system, work center Administrator, work center view General Settings:

Select OData: Event Notification to External Systems

Assuming that A6P is my CRM system with a client of 213, my expected synchronization scenario is that once a new Opportunity is created on C4C, it will be automatically synchronized to CRM.

To do this, I need to create a new consumer and maintain an endpoint: https:///sap/bc/bsp/sap/crm?sap-client=213,

The ICF service that this endpoint points to needs to be created in the CRM system A6P/213, which is responsible for responding to the creation of the C4C system Opportunity.

On the Subscription tab, select the Business Object and OData services for Opportunity. Because I only want CRM to monitor the creation and update of C4C Oppportunity, I only check Create and Update checkbox.

To the CRM system, use the transaction code SICF to create a new ICF service under the path / sap/bc/bsp/sap/crm:

Create a new processing class:

Develop the following ABAP code:

METHOD if_http_extension~handle_request.DATA (lv_payload) = server- > request- > get_cdata (). CALL METHOD zcl_c4c_crm_integration_tool= > parse_json_to_internal_tableEXPORTINGiv_json = lv_payloadIMPORTINGet_node = DATA (lt_node). READ TABLE lt_node ASSIGNING FIELD-SYMBOL () WITH KEY attribute = 'event'.DATA (lv_event) =-value.READ TABLE lt_node ASSIGNING FIELD-SYMBOL () WITH KEY attribute =' odataServiceEndpoint'.DATA (lv_opp_detail) = zcl CLEAR: lt_node.CALL METHOD zcl_c4c_crm_integration_tool= > parse_json_to_internal_tableEXPORTINGiv_json = lv_opp_detailIMPORTINGet_node = lt_node.ENDMETHOD.

For the complete code of the zcl_c4c_crm_integration_tool class, refer to my Github

Now go back to the C4C system and modify any Opportunity, such as the name field, to change the value to "Jerry change demo":

Then the HANDLE_REQUEST of the handler processing class of the ICF service pointed to by the endpoint of the CRM registered in the C4C system will be automatically called: the ID and the modified type (new or updated) of the modified Opportunity in C4C will also be automatically passed into the CRM from C4C.

Details of Opportunity are also included. With this information, you can use One Order API such as CRM_ORDER_MAINTAIN to create or update the corresponding Opportunity in CRM.

For more original Jerry articles, please follow the official account "Wang Zixi":

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report