Skip to Content

Showcase New Feature MII v 12.2 – Value Mapping

Showcase New Feature MII v 12.2 – Value Mapping

Applies to- 12.2.3 Build (177)

Summary

This document showcases the new feature of Value Mapping in MII v12.2

The document takes us step by step showing how to use Value Map and Value Look Up Action Block Introduced recently.

Author: Ruchir Batra

Created On: 03 June 2012

Table of Content

Introduction to Value Mapping

Introduction to Example Set Up

Configuring the Value Map Action Block

Complete Process Flow

Conclusion

Introduction to Value Mapping

This feature helps us in translation of values between two systems. It allows data value read from one system to be replaced in another system with a replacement rule configured for the same.

For this, ValueMap.vmap class file was introduced in Meta-Inf tab under the Workbench. And XML Function Category in the transaction (in Workbench) added two new action blocks named Value Map and Value Lookup Action Block.

Why it came up?

Many a times, we have seen that data value coming from ECC is required in different fashion in another system. A lot of time, it’s a leading zero’s issue which we address while reading data from SAP ECC to another system. To tackle such problem, this new feature was introduced named “Value Mapping”.

Introduction to Example Set Up

To solve this issue, we set up (config) a rule under Meta Inf Tab. The Rule defines multiple source objects in form of xml or xsd. The source object consists of source location and source xpath (defining field to be updated).

The source object contains mapping object, which in turn has source value, target value and mapping type associated to it.

To Start:-

Click NEW on Value Map and you will see a screen comprising of REF1 and REF2 as below.

Rule Details-

Enter a Rule Name/Description: You want to define

Source Details –

Source Document:

Create a sample xml which will be similar to one you will be getting as an input. In our example- I created a sample input xml similar to Production Order Get List BAPI from ECC.

Source:

Define the xpath for which you want the data values to be transformed (between the systems). In our example- I have tagged it to Work Center I get through the BAPI in my example.

Click on Add Source and this will update the source information as in REF 1 below.

/wp-content/uploads/2012/06/pic1_107720.png

REF 1

After adding the source details- We define the Rule for the transformation below in the next section as per the snapshot REF2 below.

We have three match types to define. Equal, Contains, Regex.

In Source Value- we define the source value expected. Target Value defines the transformed value to be taken up against the source value.

Example- In our example, source value of G01L will be converted to G Value as an output after the value map action block is executed.(Match Type= Equal)

/wp-content/uploads/2012/06/pic2_107721.png

REF 2

< I have divided the Rule Creation Screen in two snapshots- REF 1 and REF 2 >

Configuring the Value Map Action Block

Config Part-

Assign a Project, Rule to it. There after you will see the source document and source location as per the rule already set up in Meta Inf tab.

You will also see mapping details as per configuration done. 

/wp-content/uploads/2012/06/pic3_107722.png

Link-

Provide an xml input to the Value Map Action Block.

Complete Process Flow

In our example, we pull data from ECC via PI Service (Production Order Get List Data from ECC). We pass output of PI Service to Value Map Action Block. It contains the data such as Work Center like G01, G01L, G02.. an arbitrary data.

In our Value Map, we mapped rule to translate G01L… value to G Value. And so on.

Hence in the tracer below- if we see the output from Value Map Action Block, we will see the Work Center value as G Value against G01L and J Value against J01L(From ECC)… and so on.

/wp-content/uploads/2012/06/pic4_107723.png

Conclusion

The above scenario showcase us how to use the Value Map Action Block. It helps us in transforming the value from one system to another and at same time- avoiding the logic to be implemented by the developer.

In the very same fashion- we can use Value Look up Action Block also. We provide input as Type defined data type value for which we receive output as key value pair. (In our example, we get output as {J01LLL=null, J01L=J Value, G01L=G Value} where in – J01LLL doesn’t have any rule mapping set, while J01L/G01L get transformed.)

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