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.
How Code List Replication Works
For some code lists, you will find two integration flows where one’s name starts with "Deprecated". The following screenshot shows such two integration flows for the Incoterms code list on the SAP Business Accelerator Hub.

The old, deprecated code list integration flows worked similarly to other master or transactional integration flows, where SAP S/4HANA sends data to the integration flow. This was additional setup effort on the SAP S/4HANA side, because outbound communication settings needed to be defined per code list. In contrast to that, the new variants fetch the currently maintained code list values from SAP Sales and Service Cloud Version 2 and SAP S/4HANA via REST and OData services, respectively, compare the values, and make the required changes in SAP Sales and Service Cloud Version 2, so that the values match exactly the ones in SAP S/4HANA afterwards. They run on a timer-based schedule or can be triggered manually.
The following screenshot shows this procedure in the Design view of the Replicate Incoterms Classification from SAP S4HANA integration flow, with the most important steps highlighted:

- Start-Timer to schedule or manually run the integration flow
- Fetch the currently maintained code values from the cloud CRM (required to remove existing ones)
- Fetch the currently maintained code values from SAP S/4HANA
- Compare code values and prepare the final code list for the cloud CRM
- Send the final code list to the cloud CRM (which may involve instructions to delete existing code values)

