Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

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:

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.

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.

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:

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.

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.

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.

7 Comments