Skip to Content

Introduction

A more flexible and “dynamic” way to define a value mapping is to use the standard function Value mapping (Conversions function group area). Using this standard function, you can refer to value pairs that are defined at a later point in time during configuration. To define the value pairs in eclipse we use value mapping group.

The advantages of this approach are that value mappings can be reused within different message mappings and values can be specified later at configuration time.We use value mapping to map multiple representations of an object across different applications or companies.There is a slight difference in defining Value mapping definition in SAP HCI and SAP PI [on-Premise].

/wp-content/uploads/2015/08/test_jpg_763727.png

Go to Eclipse main menu File –> New –> Integration project

In the new project Wizard, provide name for value mapping and select project type as “Value mapping” and click on Finish.

/wp-content/uploads/2015/08/test2_763716.png

Value mapping project will be created in the “Project Explorer” with a node type “IFLMAP” as below.

/wp-content/uploads/2015/08/test3_763717.png

Expand the project to check the default objects created under this

/wp-content/uploads/2015/08/test4_763736.png

Modify the value mapping

Open value_mappig.xml under value mapping project.

/wp-content/uploads/2015/08/test5_763737.png

Value mapping.xml –> Right click –> Paste the required xml as per the requirement.

/wp-content/uploads/2015/08/test6_763738.png

We will get the below pop-up window to overwrite –> click Yes.

/wp-content/uploads/2015/08/test7_763769.png

Continue

/wp-content/uploads/2015/08/test8_763770.png

Click ok.

Open  Value_mapping.xml in the editor and choose source tab

/wp-content/uploads/2015/08/test9_763771.png

Enter the group ID, agency, schema and value as shown in the example below, and save the changes.

/wp-content/uploads/2015/08/test10_763775.png

If we need to edit values, we can do it in design tab

/wp-content/uploads/2015/08/test11_763776.png

How to use Value mapping in message mapping?

In the project explorer view à expand the project. Click on “src.main.resources.mapping”à double click the message mapping where you want to use the value
mapping.

/wp-content/uploads/2015/08/test12_763777.png

Message mapping will be open in mapping editor.

/wp-content/uploads/2015/08/test13_763778.png

Click on Definition tab to view the mapping between source and target structures.

In the expression tab page –> select the value mapping which is under standard functions –> Conversions

/wp-content/uploads/2015/08/test14_763779.png

Select value mapping and drop it in expression editor tab.

/wp-content/uploads/2015/08/test15_763780.png

Double click on the value mapping function and provide details for value mapping parameters.

/wp-content/uploads/2015/08/test16_763784.png

Connect the node to the value mapping function as per the requirement and save the changes.

We can check the consistency to validate the value mapping. The inconsistencies can be invalid content [ values for agency – schema pair repeated / incorrect / missing tags] entered in the value_mapping.xml ma There may be chances to check To check the consistency of the value mapping.

Right click on the value mapping project and choose execute checks. We can check the results in console tab as shown below

/wp-content/uploads/2015/08/test17_763785.png

To report this post you need to login first.

4 Comments

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

  1. Ruddy Enzo Reategui Macedo

    Great job Bhargava krishna Talasila!

    I have an integration scenario similar to its example, I have created a value mapping to set different values by country, the idea is to have a general value mapping of values and from other iflow to read them, how do I read those values from my iflow 2?

    I was not very clear this:

    How to use Value mapping in message mapping?

    regards

    (0) 
  2. Imran Shaik

    Hi, Can any one tell me about what value i need to give for source identifier and target identifier  as per the example provided above(Value_mapping.xml)?

    (0) 

Leave a Reply