Preparing Functional Dependencies in SAP Sales Cloud and SAP Service Cloud Version 2

Integrating Code Lists

Objective

After completing this lesson, you will be able to set up Code List integration by the example of Incoterms

Code List Replication

Code List Replication is a comfortable alternative to manual code list maintenance, which can reduce the maintenance effort tremendously, especially for larger code lists and where several languages need to be supported. The replication requires some additional steps for preparation, and then only a few small actions for the actual replication of a specific code list.

After some basic preparation steps that are necessary for all code list replication scenarios, every code list replication is carried out by the corresponding integration flow.

Evolution of Code List Replication

Code list replication has gone through several iterations, each reflected in how the corresponding integration flows are designed and triggered:

  • Initially, code lists were replicated from SAP S/4HANA via the Data Replication Framework.
  • This approach was later replaced by integration flows that fetched data independently from both SAP S/4HANA and the cloud CRM, triggered on a schedule by a timer. Fetching codes from the cloud CRM enabled comparison and thus allowed the deletion of codes that no longer existed in S/4. This was an optional feature that could be activated as Initial Load.
  • The latest version reintroduces an inbound message as the trigger. Unlike the first approach, the message originates from the cloud CRM and contains configuration details, such as the initial load option. It can be scheduled from the Communication Configuration screen. Some details for fetching codes from the connected systems have changed, but the overall logic remains.

Most importantly, the latest approach doesn't need a separate technical user anymore for fetching codes from the cloud CRM. This is now all covered by the communication configuration and the communication system's inbound channel.

Update Strategy

When updating to the latest integration flow versions for code list replication, keep two points in mind:

  • Update all code list replication integration flows at the same time to avoid a mixture of the code list replication architecture.
  • Keep the package's script collection up to date. The script collection has been updated to support the new approach and is a required dependency for all code list replication flows. An outdated script collection will prevent updated flows from working.

How Code List Replication Works

The following screenshot shows the Design view of the Replicate Incoterms Classification from SAP S4HANA integration flow, with the most important steps highlighted.

Screenshot of the Incoterms integration flow with the most important steps highlighted
  1. Inbound message to run the integration flow (refers to Scheduled Asynchronous Outbound Configurations in the cloud CRM)
  2. Fetch the currently maintained code values from the cloud CRM (refers to Synchronous Inbound Configurations in the cloud CRM; only required to remove codes)
  3. Fetch the currently maintained code values from SAP S/4HANA
  4. Compare code values and prepare the final code list for the cloud CRM
  5. Send the final code list to the cloud CRM, which may involve instructions to delete codes (refers to Asynchronous Inbound Configurations in the cloud CRM)

Integrating Code Lists

Initial Setup Steps for Code List Replication

The replication of code lists requires the following initial setup steps across the systems, which are independent of a particular code list. They are only required once:

  • SAP Sales and Service Cloud Version 2:
    • Communication Configuration with Asynchronous Inbound Configurations, Synchronous Inbound Configurations, and Scheduled Asynchronous Outbound Configuration for a particular code list.
    • Communication System with inbound and outbound channels
  • SAP S/4HANA:
    • OData service providing access to the code lists
    • Existing technical user needs access to it
  • Cloud Integration:
    • Script collection of the master data integration package must be deployed

Note

Earlier versions of the Code List Replication integration flows required setting up an additional technical user to access the code lists in the cloud CRM. With the latest version, introduced in June 2026, this is no longer necessary. The integration flow accesses the code lists via the Synchronous Inbound Configuration using the communication user of the assigned communication system.

After preparing all systems, you can configure and deploy code list replication integration flows.

Configuration in SAP S/4HANA

All code list values are being provided to Cloud Integration via an OData service (step 3 in the graphic earlier). This service must be made accessible.

You can enable the OData service endpoint via the SAP Gateway Service Administration using transaction /N/IWFND/V4_ADMIN.

  1. Navigate to Published Service Groups.
  2. Search for the Service Group ID: CDI_CDS with System Alias: LOCAL.
  3. Publish the service group.

Configuration in SAP Sales and Service Cloud Version 2

Replicating a code list requires three services in the Communication Configuration:

  1. Scheduled Asynchronous Outbound Configuration: Triggers the integration flow to run the synchronization
  2. Synchronous Inbound Configuration: Required to read existing codes in the cloud CRM and delete obsolete ones that do not exist in the external system
  3. Asynchronous Inbound Configuration: Receives the synchronized code list from the integration flow

The following screenshot shows a sample Communication Configuration that only contains the services required to replicate the Incoterms Classification code list.

A screenshot of the cloud CRM showing a sample Communication Configuration that only contains the services required to replicate the Incoterms Classification code list.

For a clean initial load of a code list, it’s mandatory to delete all codes in the cloud CRM that do not exist in SAP S/4HANA. For that, the integration flow reads the currently maintained code list values from the cloud CRM.

Configuration in Cloud Integration

Before you can configure the integration flow, make sure bi-directional communication between Cloud Integration and the cloud CRM has been set up. The authentication details have been prepared earlier in this course.

  1. Navigate to Design→Integrations and APIs→package: SAP Sales Cloud and SAP Service Cloud Version 2 Integration for Master Data with SAP S/4HANA, and then Artifacts tab
  2. Find the integration flow and select Configure from the three-dots menu.

Caution

If you haven’t deployed the Master Data Replication Script Collection yet, select it in the integration package’s artifacts list and choose Deploy. It’s a prerequisite for the code list replication integration flows. They cannot run without the script collection.

Note

You can open the integration flow to see where the adapters from the Configure dialog are located in the design view, so you can better understand what information is required. A screenshot of the Design view was shown earlier in this lesson.

Configure the integration flow:

  1. The Sender tab provides settings for the endpoint where the scheduled outbound message from the cloud CRM is sent to. This triggers the code list replication logic.
  2. The Receiver tab gathers all details about the systems from which data is read and written to. This integration flow interacts with two systems using three different endpoints. They can be configured by switching the Receiver and Adapter Type dropdowns:
    1. Receiver S4 – HTTP Adapter: Since this adapter points to the SAP S/4HANA system, it must use the cloud connector, which can be achieved by selecting Proxy Type: On-Premise. Following that, the PROT-HOST-PORT must reflect the system entry of the Cloud Connector. In the demo environment, s4hana with port 8443 was used. The protocol in this field must always be http://. The connection is still encrypted through the secure tunnel of the Cloud Connector. Finally, enter the authentication details. In the demo, the already existing user credential SSCv2_to_S4 was used for basic authentication against SAP S/4HANA.
    2. Receiver CNS –First HTTP Adapter: The cloud CRM has two endpoints – one for reading code lists and one for updating them – so there are two HTTP adapters shown. Based on the address, you can see which one you’re currently configuring. The inbound-sync-data-connector-service (notice the sync) endpoint is used for reading code list values. Enter the cloud CRM’s hostname and the credentials accordingly.
    3. Receiver CNS – Second HTTP Adapter: The second HTTP adapter updates the code lists. It uses the inbound-data-connector-service (without snyc) endpoint. When switching to this HTTP adapter, the hostname and credential should be pre-filled from the other CNS HTTP adapter that you maintained just before.
  3. The More tab contains additional system-specific and data load-related settings:
    1. Client: The client of the SAP S/4HANA system. In the demo environment: 400.
    2. Language: The languages in which the descriptions of the code list values should be available in the cloud CRM. Use comma-separated, two-character ISO codes here. Please note that this only selects the corresponding language entries in SAP S/4HANA. This is not a real-time translation.

Save the configuration and deploy the integration flow.

Five screenshots that show the configuration dialog with the details of the sender, receiver, and more tabs as explained previously.

Run Code List Replication

After configuring all systems, you can trigger the code list replication from the Communication Configuration screen in the cloud CRM. Locate the code list entry in the Scheduled Asynchronous Outbound Configurations section and choose Edit Schedule.

Screenshot of a special communication configuration in the cloud CRM that only contains the Replicate Incoterms code list items with the schedule button and a dialog to configure the details of the run.

You can decide to run the replication immediately or schedule it for a later point in time with or without recurrence. Finally, you can choose to Delete entries that are unavailable in the external system, which is the former Initial Load feature. It is recommended to run the replication with this option enabled at least for the first time to clean up unused code entries from the cloud solution so that users cannot select those values and messages would fail when sent to S/4HANA later.

If everything was set up correctly, the code list in SAP Sales and Service Cloud Version 2 will show the same values as in SAP S/4HANA after the run.

Comparison of Incoterms code list after replication.

If you would like to compare the Incoterms code list in your environment, you can do it as follows:

  • SAP Sales and Service Cloud Version 2: From the user menu, navigate to Settings→Customers→Incoterms
  • SAP S/4HANA
    • View Only: Use transaction SE16 or SE16N and open table TINC
    • Maintain: Use transaction SPRO → SAP Reference IMG→Sales and Distribution→Master Data→Business Partners→Customers→Billing Document→Incoterms→Define Incoterms.

Strategy for Code List Maintenance

After discussing manual maintenance and the replication of code lists in depth, let's summarize both approaches with a short When to use what? listing:

  • Replication
    • Synchronization, including translations and deletion of obsolete codes, tremendously saves effort for large code lists.
    • Can be run periodically to ensure code lists are up to date.
    • Due to the initial setup effort, it is particularly worthwhile when multiple code lists are in use.
  • Manual Maintenance
    • For code lists that do not support replication.
    • Might be less effort for small code lists without frequent changes and no or only a few translations
  • Conclusion: Replication of code lists is the preferred way for real projects where several code lists need to be synchronized.