How to Test Message Mapping Using the Eclipse Tool (NWDS)
With the PI 7.31 release, the Eclipse tooling also became available. In NWDS, we can now design and develop artifacts in the ESR by using the Eclipse tool. Even though the Java Swing tool will continue to be available, the direction for SAP is toward the Eclipse tools. This is not just for PI, but also for ABAP development.
One of the artifacts in the ESR is the Message Mapping, and the ability to test the mapping easily. In NWDS, the mapping tool is also GUI driven, with drag-n-drop and point-n-click. With PI 7.31 SP4, the Eclipse tool is based on XPath expression. With PI 7.31 SP6, a GUI mapping tool, similar to Message Mapping, will also be available in NWDS. Disregard to the type of mapping tool, we are still interested in the ability to test the mapping easily. In this blog, I will show how we can test the Message Mapping in NWDS, whether it is based on XPath or the GUI mapping tool.
This blog assumes that you are already familiar using NWDS to work with the ESR. If not, please reference the blog: Eclipse Tool for ESR in NW PI
Unlike the Swing tool in the ESR, where a “Test” tab is available to test the mapping, the NWDS tool requires a different process. Although, initially, we may consider this process to be more cumbersome, but it is really not bad to use. There are a couple of steps involved:
- Create a file containing the source XML document.
- Create a configuration, which consists of the Message Mapping program and the test file in #1.
With these 2 steps, we can run the test and a resulting XML will be created. During testing, we can re-use the file created in #1 and the configuration created in #2.
To show the steps for mapping test in NWDS, I have already created a simple Message Mapping. Basically, this mapping calculates the total amount based on the units purchased and the cost for each unit. There can be 1 or more “order_items”.
Steps in NWDS to test Message Mapping:
- Create the source XML:
- Right-click on the Message Mapping: Select “Generate” –> “XML File…”
- Select a project and provide a name for the source XML file:
If no project shows up or you want to use a new project, you can go to the main/top menu and create a general project. - Enter the data for the source in the new tab: (example below)
Save the file.
- Right-click on the Message Mapping: Select “Generate” –> “XML File…”
- Create the mapping configuration:
- Test the mapping by clicking: “Run”
A new tab will be created with the mapping test result.
As you can see, this is not bad at all.
I found that by creating a new project to organize all my mapping tests makes testing quite convenient, especially when I have to re-test my mapping programs.
As usual, delighted to see this info 🙂
Crispy clear 🙂 as always your blogs are really informative , thank you William.
Thanks for sharing the useful information. Nice and clear.
Nice info! Thanks. 🙂
Prateek
Very helpful, thanks
To the Point. All your blogs are very helpful.
Regards
Sachin Dhingra
Really helpful. However one thing I was searching of Display Queue functionality in standard swings GUI which I couldn't found over here.
That one is really helpful specially if you have multimappings.
Regards
Display Queue is not yet available with the Eclipse tool. It is on the list to be included in the future. Unfortunately, no date yet.
Regards,
William Li
Good info, thanks for sharing it William.
Thanks,
Aman
Thank you so much for sharing.
When is Display Queue option going to be available
Hi,
is there an API available to call this e.g. from an external webservice tool?
Kind regards
Jo
How do you assign a channel for RFC lookups to this setup?
Whenever i want to assign a value for the lookup parameter by pressing the button beside "value" nothing happens.
Kind regards,
Peter