Comparing Mapping programs/versions in SAP PI/ SAP PO
We always face problem while comparing two mapping programs in SAP PI/PO.
SAP PO ESR swing tool comes with additional feature of version comparison to compare between two versions of same mapping program. There are cases when we have to compare same mapping programs in different environment (say development and production) then we don’t have any choice. Here is a simple way forward to do the same with less effort.
In case of SAP PI we don’t have such comparison. We have to search all the mapped fields manually.
Graphical mapping in SAP PI is a java program that has been designed to perform the mapping using graphical tool. Now in order to compare the two mapping programs we can follow these simple steps. Let’s take two mapping programs: Map_Source, Map_Target [this naming is just for reference to understand]. We have to compare these two. The two mapping can be from the same mapping programs in different environment (dev and prod), same mapping program with different version, or any two mapping to be compared with. This document is inspired by idea of Grzegorz Glowacki in SCN blog://Compare Versions of Message mapping?? possible?? | SCN
- SAP PI ESR swing tool
- SAP PO ESR swing tool
- Text comparison tool
(Here we are using free web tool https://www.diffchecker.com/diff for text comparison)
Case A: Applicable to both SAP PI as well as SAP PO
Step 1. Open mapping Map_Source and click on text preview mode.
The arrow marks the text preview button.
Step 2. Copy from this area as text data.
The code looks like below
Step 3. Open mapping Map_Target in text preview mode.
Follow the above steps to copy the text data from Map_Target.
Step 4. Now using text comparison tool in our case we are using free web tool
https://www.diffchecker.com/diff for text comparison we are comparing the mapping.
Step 5. Paste Map_Source(text code) in ORIGINAL TEXT field and Map_Target (text code) to CHANGED TEXT field.
Click on Find Difference button in the bottom of the page.
The red part corresponds to Map_Source and Green part corresponds to Map_Target.
The output will be as follows:
From the output we can find all the nodes which are mapped in Map_Source but not mapped in Map_Target or those not mapped in Map_Source but mapped in Map_Target.
The screen shot shows /WMMBID02/IDOC/E1MBXYH/E1MBXYI/LGORTnode mapped in Map_Source but this node is not mapped in Map_Target.
Similarly the screen shot shows /WMMBID02/IDOC/E1MBXYH/USNAM node mapped in Map_Target but this node is not mapped in Map_Source.
Hence all the mapping difference is listed in one go instead of going for manual search which is quite tedious.
Case B. Use of Compare Version [SAP PO] to compare between two versions of same mapping program in one environment.
We have direct option for comparison between two versions of same mapping program in one environment. Just select the version number in the given fields. Click on compare button.
The difference in mapped nodes are reflected in blue color.
This facility is limited to SAP PO ESR swing tool to compare between two versions of same mapping program. There are cases when we have to compare same mapping programs in different environment (say development and production) then we don’t have any choice and do it manually. In case of SAP PI we don’t have such comparison. We have to search all the mapped fields manually.
Benefits of Implementation
- Manual work reduced.
- 100 % accuracy in comparison.
- Time saved.