Skip to Content

Introduction

Mapping programs can potentially undergo many structural changes during its lifecycle. PI/XI developers know far too well that a structural change can reap havoc on an existing message mapping. This is because for each target mapping defined, there is a corresponding XPath expression that is used by the mapping editor to locate the field in the source and target structure. If a new element name or hierarchy level/node is introduced, the original XPath expression becomes invalid and the mapping editor can no longer locate the correct field to map from/to.

In SAP NetWeaver Processs Integration (PI) 7.1, this problem still exists. HOWEVER, a new enhancement to the mapping tool in PI 7.1 allows for adjustments to the mapping in an interactive way to relieve some of the pain when structural changes are introduced to the mapping. This new function is called Correct Structural Inconsistencies/Reload with Improvements.

 

Using the “Correct Structural Inconsistencies” Function

Consider an example where the original message mapping looks as shown below:

image

Both the source and target messages have “flat” structures. Now imagine that a new requirement is introduced for this mapping where a new target message with a more hierarchical structure is required and the name of an element is changed.

image

In the new structure, elements ‘Street’, ‘City’, and ‘ZipCode’ are subelements under ‘Address’ and elements ‘Phone’ and ‘E_Mail’ are subelements under ‘Contact’. Plus notice that ‘Name’ has changed to ‘FirstName’. Let’s see what happens when the original target message is replaced with the new one.

image

image

As you can see, a familiar processing log pops up listing all the target mappings that had to be deleted and skipped because the path to the original field could no longer be found. However, you probably noticed a new button on the toolbar:

image

Note that the “Correct Structural Inconsistencies” function appears only if, at the very least, a field used in a target-field mapping cannot be found when a mapping is opened or a new message is introduced.

When selecting the Correct Structural Inconsistencies button, an interactive dialog will appear that gives you an opportunity to reassign the mapping from the original field to a field in the new structure. For example, in the first case, the function evaluates the missing field /ns0:User_0/Name. This should be mapped to ‘FirstName’ in the new structure. So simply highlight ‘FirstName’ and select the Move button.

image

Once moved, the target mapping will immediately indicate that the mapping is complete and the interactive dialog shows the mapping of the old field to the new field. It also moves on to evaluate the next missing field /ns0:User_0/Street.

image

image

You proceed with the interactive dialog in this manner until all the missing fields are replaced with a new one or the missing field is skipped. In the end, in our example at least, the interactive dialog completely reassigns all the missing fields and the new mapping is complete. Notice that the Correct Structural Inconsistencies button is no longer visible.

image

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Tarun Bahal
    I have been working with Xi for last 6 months or so. I cant keep a count as to how many nights i have spent due to issues caused by changes in structures..

    This feature will defi–nite–ly be a biiig time releif.

    Regards,

    Tarun Bahal

    (0) 
  2. Saravana Kumar Kuppusamy
    if i have used a std. function or an UDF before mapping it to the target element ? Will the “new icon” help retain the existing logic i have in place for the individual elements in the target node ? Or will only a strainght 1-1 mapping work ?

    Thanks
    Saravana

    (0) 
    1. Jin Shin Post author
      This feature will give you an opportunity to interactively find a replacement (in the new target structure) for the lost target element. So for whatever mapping logic you already have in place before the original target element, as long as you find and designate a new compatbile target element, it should preserve your mapping.

      Regards,
      Jin

      (0) 

Leave a Reply