Creating an iDoc Mapping in Informatica Cloud Data Integration

One type of mapping I find particularly complicated to build is one using the SAP iDoc connector. The complicate part is achieving the correct value nesting. It is complicated because when you create the mapping, the nesting is not visible. It is created by the use of Primary and Foreign key fields (GPK and GFK in the mapplet).

I have seen several approaches to this that work and the approach I am going to share here is the one that I came up with and use because I understand it. YMMV.

First, I create a list of GPK and GFKs from the mapplet XML. These values can be found in the TRANFORMATION nodes within the MAPPLET node.

With this list in hand, I create the document GPK with a field that will be unique per iDoc. In this case I have a unique entity ID in my source and a date field that will make the entry for the entity unique. I prefix this key with the OTYPE because I may have multiple entries for the same object on the same date but different OTYPEs.

Creating the GPK_DOCNUM Value
Creating the GPK_DOCNUM Value

Then, for each immediate child, I define its GFK and GPK using the node names as prefixes:

Creating the GPK_E2PLOGI001 Value
Creating the GPK_E2PLOGI001 Value
Creating GPK_E2PITYP001 Value
Creating GPK_E2PITYP001 Value
Defining First Child of E2PITYP001
Defining First Child of E2PITYP001

The above examples goes three levels deep. If your iDoc requires nest your nodes in a different pattern, generate your GPK values in such as way that they can be properly created in both the parent and child node.

For ease of maintenance, I name the fields in the expressions the same as they are defined in the mapplet so that I can use Automatic field mapping, which is eliminates the need to manually re-map anytime I make a change:

Auto-mappping Fields for ease of Maintenance
Auto-mapping Fields for ease of Maintenance

I hope this saves you some of the time it took to get me to this approach.

Facebooktwitterredditlinkedinmail
© Scott S. Nelson

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.