Acorel
To Acorel.nl

The spider web of connections between C/4HANA, CPI and S/4HANA

Jasper Cremers, 15 May 2019

Typically, an S/4HANA landscape has about 4 separate systems. Let’s say a development, a test, an acceptance and a production system. C/4HANA and CPI typically don’t have that many tenants. Connecting these systems can look like a spider web of connections, in this blog I will explain how you can keep them apart from each other in CPI.

S/4HANA vs C/4HANA vs CPI

Let’s assume that the S/4HANA landscape has 4 systems; development, test, acceptance and production. C/4HANA and CPI on the other hand, typically do not. In our case, we have 2 C/4HANA test tenants and 1 CPI test tenant. And both of course 1 production tenant.
Connecting all the non-productive tenants can be confusing; which S/4HANA system is connected to which C/4HANA tenant. If you would visualize the connections, it will look something like this. Hence, the spider web of connections:

During our implementation, this was our system landscape. We had 1 C/4HANA “Development | Test” tenant, which was used for the connection to S/4HANA development AND Test.
We were able to switch the integration between the two S/4HANA systems, which was pretty handy. How we did this is also explained in this blog.

CPI Integration Flow: change the names

First, let’s look into CPI.
The descriptions of the standard integration flows are not really clear (if you ask me).

Therefore I changed the names. First, I imported the integration flow into Eclipse and changed the names of the Windows explorer folders. Something like this makes much more sense to me:

Technically, the iflows are now still the same. If you try to deploy the same iflow twice, you will get an error message. Therefore you will need to change the Manifest. Go to the properties in Eclipse and change the ID and name.

So far so good, we can recognize iflows (and related systems) in CPI!

Interface modifications: connect the right dots together

S/4HANA -> C/4HANA

For the outgoing S/4HANA webservices, you’ll need to distinguish the URL’s as they all point to the same CPI tenant. For example:
– S/4HANA Development: cxf/S4/C4C/ReplicateBusinessPartner_DEV
– S/4HANA Test: cxf/S4/C4C/ReplicateBusinessPartner_TEST
– And so on

On the CPI tenant, the regarding iflow also needs to be updated with this URL.
When a message from S/4HANA is sent to CPI, the right iflow will be found (and the message will be directed to the right C/4HANA system):

C/4HANA -> S/4HANA

For the outgoing C/4HANA webservices, it’s pretty much the same. You’ll need to distinguish the path as they all point to the same CPI tenant. For example:
– C/4HANA Development: cxf/S4/C4C/ReplicateBusinessPartner_TEST
– C/4HANA Acceptance: cxf/S4/C4C/ReplicateBusinessPartner_ACC
– And so on

On the CPI tenant, the regarding iflow also needs to be updated.
When a message from C/4HANA is sent to CPI, the right iflow will be found (and the message will be directed to the right S/4HANA system):

You now know how to use 1 CPI tenant to connect multiple S/4HANA and C/4HANA tenants! Hurray!

Switch the integration between two S/4HANA systems

If needed, you can use the above setup to switch the active connection between 1 C/4HANA tenant and 2 S/4HANA systems. If you (for example) need to extend the integration, the S/4HANA way is to start on the development system. After that, move to the test system and so on.


For the integration from S/4HANA to C/4HANA, you don’t have to do anything. The CPI flows will direct both to the same C/4HANA tenant.

For the integration from C/4HANA to S/4HANA, you need to disable the integration to 1 of the S/4HANA systems.
When you trigger the replication (e.g. creating a new customer), the active communication arrangement will be determined.

You can create the same communication arrangement twice, both to another communication system:

Enable the outbound services for the communication partner (S/4HANA system) that you want active. And disable the outgoing services of the other communication scenario.

In C/4HANA, you can add field the External system field to check which system is relevant for the data. So you do need to pay attention, the data is not replicated between S/4HANA systems.

That’s it, happy interfacing!

Jasper Cremers

Read all my blogs

Receive our weekly blog by email?
Subscribe here: