Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
stefan_boller
Associate
Associate
0 Kudos

Introduction

Recently, we have introduced a new feature in Integration Advisor for the duplication of target nodes. This feature allows the duplication of leaf as well as group nodes of a target Message Implementation Guideline (MIG) in the Message Guideline (MAG) editor. This feature helps in special mapping situations where you have two sources which must be mapped to (multiple instances of) the same target node.

In this blog post, I will show a scenario which illustrates some of the benefits of this new feature when applying it to the duplication of group nodes. In a follow up article, a scenario with leaf nodes will be presented.

Scenario

As an example we use the following scenario: Assume you have a source MIG based on UN/EDIFACT message ORDERS (version D.21B S3, e.g.) which shall be mapped to an SAP IDoc ORDERS.ORDERS05. Furthermore, you agreed with your partner, which sends the UN/EDIFACT ORDERS message, that they can either use the DTM segment in the header to specify the expected delivery date for all items or the DTM segment of each item separately. However, on your own side you want to have the expected delivery date in segment E1EDP03 of each item independent of the decision of your partner.

Challenge

Now start the mapping design in the following way: You map the child DTM segment of segment group SG29 to E1EDP03. This would give the expected result when your partner sends the DTM segment with each item:

stefan_boller_0-1706801021419.png

But what happens if the information is contained in the header? Then E1EDP03 will remain empty. Somehow you would like to map the header's DTM segment to E1EDP03 as well, but that was not possible so far.

Solution

Now, our new feature kicks in: You can duplicate the E1EDP03 group node at the target side and map both DTM segments to different duplicates. This looks as follows:

stefan_boller_157-1706802290993.png

Now, you can map the header's DTM segment to the new duplicate and you are done. On message level both duplicates look the same, there are only distinguished in the MAG editor:

stefan_boller_158-1706802827341.png

How to do it on your own?

Create a MIG based on UN/EDIFACT message ORDERS version D.21B S3 as source MIG (see Creating a New Message Implementation Guideline). Then select segment group SG29, the child DTM of SG29, and the 2380 fields of both DTM segments (header and line item). As last step you qualify both DTM segments with qualifier 2005 and value 2 (Delivery date/time, requested), see also Qualifying Nodes.This should look similar to the source MIG shown in the screenshots above. Then create a second MIG based on SAP IDoc ORDERS.ORDERS05 (version 1809_FPS02) as target MIG. Select nodes E1EDP01 and E1EDP03 and all child nodes of E1EDP03. Similar to the source MIG qualify the E1EDP03 node with qualifier IDDAT and value 002 (Requested delivery date (customer)). The resulting MIG shall look like the target MIG in the screenshots above.

Now you can create a MAG using both MIGs (see Creating a New Mapping Guideline). Before you can draw the mapping lines you can now duplicate the node E1EDP03 of your target MIG: In Edit mode hover over the E1EDP03 node, press the overflow button, and select "Duplicate":

stefan_boller_0-1707127840456.png

In the duplicate editor add one duplicate by pressing the "Add" button and give the new duplicate a speaking name so that you can recognize it later:

stefan_boller_1-1707128037298.png

After pressing the "Apply" button you can use the new duplicate and design your mapping:

stefan_boller_2-1707128199945.png

Note that we also used the date time mapping feature of Integration Advisor in this example (see Date Time Conversion). Now you can simulate the mapping with the attached example payloads: 

  1. example with DTM segment of line items filled
    stefan_boller_0-1707128946919.png
  2. example with DTM segment of header filledstefan_boller_1-1707129157348.png

 

Summary

In this blog article we showed how we can use the new duplicate target nodes feature for solving a mapping challenge which previously was not possible. In a follow up article we will present another use case where in contrast to this example leaf nodes instead of group nodes are involved. We also would be happy to know more about your use cases for this new feature.
Please, share your ideas and feedback in a comment. Furthermore, you can follow the SAP Integration Suite topic page to get to know more about Integration Suite in general, or read other posts on Integration Advisor. You can also follow my profile if you want to read similar content in the future.

Appendix

In case you agreed with your partner that they can use the DTM segment in the header to specify the expected delivery date as default for all items but can override that date via the DTM segment of single items, the situation becomes a little bit more complex but can still be solved with Integration Advisor:  Just use the conditional mapping, delete the mapping line between the groups DTM [2005 = 2] in the header (source) and E1EDP03 [IDDAT = 002] [1] (duplicated target node), and add a new mapping line between the groups SG29 (source) and E1EDP03 [IDDAT = 002] [1] (target). Then you can use the field 2005 of the line item as a conditional node for the new group-to-group mapping by drawing a line from it to the same target node E1EDP03 [IDDAT = 002] [1]:

stefan_boller_0-1708336696979.png

Finally, enter 

 

 

 

 

 

not(boolean($nodes_in/D_2005))

 

 

 

 

 

as a condition. This will create the target node instance only if the DTM segment of the line item is not available in the corresponding line item. I attached a sample payload also for this case.

2 Comments