How to Restrict Replication of Prospects from C4C to Backend System

Size: px
Start display at page:

Download "How to Restrict Replication of Prospects from C4C to Backend System"

Transcription

1 How to Restrict Replication of Prospects from C4C to Backend System Requirement: SAP C4C provides a standard functionality to restrict the replication of prospects to the backend system. However, there are some limitations to this functionality which results in the issues for an external pricing call to the backend system. This blog covers how we can overcome this limitation so that the C4C system is seamlessly integrated with the backend system. Solution: The solution will include the enhancement in two systems - SAP C4C and backend S/4 HANA system. Standard Functionality provided in C4C System to restrict Prospect replication: To restrict the replication of prospects to the backend system, SAP provides a standard functionality which includes a single question in Scoping as highlighted in below screenshot. But when you disable the replication of prospects and if the user triggers an external pricing call for the opportunity / Quote that contains prospect, the system gives an error and does not trigger external pricing. To avoid this error and allow the system to work seamlessly, we have to create enhancements in both C4C and S/4 HANA. The C4C system will be enhanced to restrict the prospects using the Cloud

2 application studio. Another enhancement will be carried out in S/4 HANA to get the pricing for transaction documents where prospects are used. Below is the detailed process which can be implemented to overcome the challenges in restricting the prospect replication and the corresponding document pricing. This enhancement involves the systems below: SAP Hybris Cloud For Customer (C4C) Hana Cloud Integration (HCI) S/4 HANA 1. Enhancement in C4C System: SAP C4C provides enhancement options (which are similar to BADI in its on-premise system like SAP ERP, SAP CRM) to enhance the standard functionality. Here, we have used the CheckBusinessObjectInstanceProcessIntegrationRelevance enhancement option. This enhancement option is called for outbound service interfaces of C4C integration. You can get more details about this enhancement option in the Repository explorer of the Cloud application studio as highlighted in the screenshot below. For one of our Client s business scenarios, we have stopped the prospect replication in 3 situations:

3 1. Whenever the Account is created in the role Prospect 2. Whenever the relationship is being replicated to the backend system (In this case SAP S/4 HANA) and it has Account in the role Prospect 3. Whenever the Account is created in the role Prospect on conversion of the lead to opportunity. Below are the details for the enhancement option:

4 2. Enhancement in S/4 System: Whenever the Pricing call hits S/4, it searches for the Customer in the incoming payload. As Prospects are not replicated to the backend system, S4 does not get the customer, and the pricing call fails. To avoid this, we created a dummy customer in S/4 HANA and maintained its ID in a custom table as shown in the screenshot below. Then, BADI in S/4 HANA was enhanced which will modify the incoming payload for the pricing call. The logic was written in such a way, that the system will check if the Customer in the incoming payload does not exist in S4 system. The business partner ID in the incoming payload will be replaced with the dummy customer ID in the S4 system. Technical Details are mentioned below.

5 S4 Provides BADI COD_SLS_SE_ADJUST_DATA which allows the developer to modify the incoming payload for the pricing call. This BADI was implemented to add the custom logic mentioned above. Method IF_COD_SLS_SE_SIMULATE_ORDER~ADJUST_IMPORT_DATA is enhanced with the required logic. With such an enhancement, we can overcome the limitations in the C4C system and allow the system to work seamlessly with any similar kind of out of the box business requirements.