Skip to Content

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:

  1. Create a file containing the source XML document.
  2. 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”.
/wp-content/uploads/2012/11/pic1_156706.png

Steps in NWDS to test Message Mapping:

  1. Create the source XML:
    1. Right-click on the Message Mapping:  Select “Generate” –> “XML File…”
      /wp-content/uploads/2012/11/pic2_156762.png
    2. Select a project and provide a name for the source XML file:
      /wp-content/uploads/2012/11/pic3_156763.png
      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.
    3. Enter the data for the source in the new tab:  (example below)
      /wp-content/uploads/2012/11/pic4_156764.png
      Save the file.
  2. Create the mapping configuration:
    1. Right-click on the Message Mapping:  Select “Run As” –> “Run Configuration…”
      /wp-content/uploads/2012/11/pic5_156765.png
    2. Right-click on ESR Message Mapping:  select “New” or an existing configuration if one exists
      /wp-content/uploads/2012/11/pic6_156766.png
    3. Enter the configuration:
      1. Enter a configuration name
      2. Select the Message Mapping by clicking on “Browse…”
      3. Select the test source file from the project created in step #1, by clicking on “Workspace…”
      4. Click on “Apply” to save the configuration /wp-content/uploads/2012/11/pic7_156770.png
  3. Test the mapping by clicking: “Run”
    A new tab will be created with the mapping test result.
    /wp-content/uploads/2012/11/pic8_156772.png

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.

To report this post you need to login first.

12 Comments

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

  1. Ameet Kamat

    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

    (0) 
    1. William Li Post author

      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

      (0) 

Leave a Reply