As we know HCI comes with pre shipped content for various integration scenarios, for example SAP Cloud for Customer Integration with SAP CRM or SAP Cloud for Customer Integration with SAP ERP. The content uses standard IDOC , which sometimes need to be extended to cater to customer specific requirement.
In this blog post I will show how the extended IDOC can be used in place of standard IDOC while retaining the mapping provided by SAP for standard elements
Assumption: you have already extended an IDOC.
Step 1: Use the report SRT_IDOC_WSDL_NS to download the IDOC definition in form of a WSDL (See NOTE 1728487)
Note: Standard report download the file with extension WSDL, which should be renamed to wsdl, else HCI will not recognize the service definition.
For example in my case the file was saved with name COD_EQUIPMENT_SAVE01.WSDL, which I renamed to COD_EQUIPMENT_SAVE01.wsdl
Step 2: Open the wsdl file with a text editor and remove the target namespace from the schema element as shown below
Step 3: Replace all the occurrence of tns: with empty value
Step 4: Add maxOccurs attribute to the IDOC element to support bulking as in the original mapping
Save your service definition file.
Step 5: Copy the wsdl to the package src.main.resources.wsdl of the desired iFlow project
Step 6: Finally replace the original IDOC definition with the imported IDOC definition in the mapping editor as shown below
Step 7: Select the request message type
Step 8: Save your mapping and make sure there are no errors reported
Step 9: Verify your changes and make sure the existing mappings are retained, example: below I can see the IDOC occurrence has been set to 9999