Wednesday, September 24, 2014

Using a customized IDOC in SAP Cloud for Customer HCI

Last week my colleague Nick van de Hulsbeek wrote a blog about the integration of SAP Cloud for Customer with SAP ECC. This week's blog will continue on Hana Cloud Integration (HCI), focusing on customising the default integration package.

A lot of customers have extra fields in there ECC environment, these fields are not available by default to SAP Cloud for Customer. To make these fields available you have to create an extension to the outgoing IDOC and make them available in HCI to map the fields to Cloud for Customer.

HCI provides a standard packages for integration with SAP ECC. SAP provides a lot of information about customising the C4C side, but doesn’t provide good documentation about customising the ECC side. In this blog I will explain how easy it is to implement this.

I’m not going to explain how HCI integration is setup. This is explained properly in the SAP documentation which can be found here:

Setup the extension

The first step that has to be done is to activate the extension on the DEBMAS_CFS IDOC. For this example I use the erp2cod.customermasterdata package, which uses this IDOC.

Generate the IDoc WSDL

After you have activated the extension we need the WSDL file of the service including the extension fields.

Run the report SRT_IDOC_WSDL_NS to generate a new wsdl with the extended fields. Open the wsdl in a texteditor to check if these fields are included.

Importing the WSDL in eclipse

Next we go to Eclipse IDE where you can download the default HCI integration package from your HCI environment. Open the project and add the downloaded WSDL of the IDOC to the src.main.resources.wsdl folder. Please note that the extension of the file is lowercase, otherwise you will not see it in some wizard screens.

I have copied the ERP_COD_BusinessPartnerERPBuldReplicateRequest.mmap, so that we can easily switch between the default mapping and the custom one.

Open the mapping file en replace the Source Element with the custom WSDL we just copied. If you open the mapping, all mappings should still be there.

When you open de mapping definition you will see the extension fields. Map this field with the destination field.

The last step you have to do is to change the mapping on the flow. Open the flow en select the ZERP_COD_BusinessPartnerERPBuldReplicateRequest.mmap. We are ready to deploy the package and test.


After testing, the extended fields should be transferred to SAP Cloud for Customer. The way to change the IDOC wsdl is similar to the way as replacing the SAP Cloud for Customer wsdl. With previous versions of the SAP Cloud 4 Customer Application Studio we did lost all the mappings, but with version 1408 this is fixed in the IDE.