SAP Cloud Integration – Multi Mapping in Message Mapping
SAP Cloud Integration version 2.40 improves message mapping with multi mapping feature. Multi mapping enables you to use more than one message in the source or target of your mapping.
Let us understand multi mapping further with a simple integration flow.
Clicking on the resource link (MultiMappingDemo.mmap in this case) opens the message mapping editor
It already has one message in the source and target message structures.
Click on the pen icon to Edit message for source and/or target
This opens up the source and target messages editor. If you have already worked with it, you might observe the below changes
- Add icon ‘+’ has been introduced, to add more messages
- Occurrence table column has been introduced, to change the occurrence of message
- Action column has been introduced with
- Icon to Replace the message
- Icon to Delete the message
You can use the occurrence column to change the occurrence of the message. By default, the occurrence ‘1..1’ shall be selected. If you select the occurrence ‘0..1’ or ‘1..n’, the multi mapping for this message shall be enabled. For example, set the message occurrence to “0..1” click on OK header action. Go back to message mapping editor.
You will now observe the root element of the message is enclosed with ns0:Messages and ns0:Message1 elements as shown in the below screenshots. This indicates multi mapping.
The similar structure could also be observed in the target side as well.
Multi mapping is also enabled when you select more than one messages as the source or target in your mapping. Consider the same example of source and target message editor. Click on ‘+’ icon at Source Message and select a schema file.
Once the schema is added, you observe the same in source messages list shown below
Now, click OK. It will take you to the message mapping editor.
You can observe that elements for multi mapping has been populated in the source message with ns0:Messages root element and ns0:Message1 for existing EmployeeDetails element along with ns0:Message2 for newly added schema’s Levels element
Now, you can perform the required mapping definition for the multi mapping elements as per your scenario.
Note: Multi mapping support for EDMX is not enabled.