Integration Blog Posts
cancel
Showing results for 
Search instead for 
Did you mean: 
Joerg_Ackermann
Product and Topic Expert
Product and Topic Expert
631

In this blog post, I'd like to share with you a great new feature that we have recently delivered: in the Mapping Guideline (MAG) Editor, you can now use the Create 1:1 Mappings feature to automatically map the same nodes in the source and target subtrees.  

How to Use the New Feature

From the SAP Customer Influence program, we have learned that you, as our customers, frequently need the feature to create 1:1 mappings between identical message structures (see here for more details: Link). A typical use case for such a feature would be: you may need to do a few modifications to a message payload while keeping the rest unchanged. In such a case, you would need to define identical mappings for most of the message nodes and define a few diverging mapping elements for the required modifications. Our new feature helps to speed up the definition of the identical mapping elements.

In the header of the Mapping List section, you will find the new Create 1:1 Mappings button. To use it, you need to select group nodes on the source and target sides. To do so, either click first on the desired source node and then on the target node or draw a mapping line between the desired group nodes. Now, you can click on the Create 1:1 Mappings button to apply the new feature.

See the screenshot below for an illustration. In the example, we want to create identical mappings for the subtrees of Party[BUY] and Buyer.

blog-screenshot-1.jpg

The result of this action is shown in the following screenshot:

blog-screenshot-2.jpg

Mapping elements have been created for the identical nodes Name and Address, as well as for most child nodes of Address. Neither the source node partyRole nor the target node PartyID has a matching node and therefore no mappings have been created for them.  

In order to match source and target nodes, the following rules are applied:

  • Direct child nodes of the selected group nodes (like Name and Address) are matched if they have the same identifier and the same namespace prefix (if applicable). More precisely, they are matched if they have the same XML Node Name.
    • Note: In the MIG Editor, click on any node and navigate to the right-hand side to the tab Details, section Identifier Information. There, you will find the XML Node Name among other identifying information for the node. 
  • Matching also works if the nodes use the Integration Advisor qualifier concept (with the same qualifier values).
  • Moreover, matching is also applied to child nodes of child nodes (like Street or City). Here, the same rules as before are applied, but this requires that their parent node (here Address) has been matched as well.

And let me finally add a few more technical details:

  • The feature can be applied to complete message structures (by selecting both root nodes) but also to any other source and target group nodes (as in our example). In the latter case, group nodes do not need to have the same identifier.
  • New mapping elements are only created for previously unmapped target nodes. Existing mapping elements are not modified or removed. In our example above, a constant value had previously been defined for the target node AddressTypeCode, and this mapping remained unchanged (although there was a matching node on the source side).
  • The newly created mapping elements behave similarly to manually created mapping elements; in particular, Code Value Mapping or Date Time Conversion is automatically chosen if applicable. In our example above, the mapping element for CountryCode is a Code Value Mapping.

Conclusion

This blog post explains our new feature for creating 1:1 mappings in the MAG Editor. This feature will help you work even more efficiently with Integration Advisor when you need to automatically map complete message structures or subtrees.  

Further reading

https://help.sap.com/docs/cloud-integration/sap-cloud-integration/working-with-mapping-guideline-mag 

https://community.sap.com/t5/technology-blogs-by-sap/integration-advisor-overview-of-components-for-...