cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Pattern...

HarshC
Active Participant
0 Kudos

Hi Guys,

I have a R/3 <-> XI <-> WebService Scenario. Where the data coming in as IDocs needs to be mapped to its equivalent value on the WebService Side. For eg:

For a field Country:

Input

GB

IN

EU

Output

Great Britain

India

European Union

Now this can be easily done by a UDF Mapping function. But I forsee this kind of requirement to occur for a number of fields and with many(20-30) input types each. Is there any recommended way of handling such mappings? A mapping pattern perhaps?

Thanks,

Harsh

Accepted Solutions (1)

Accepted Solutions (1)

former_member91687
Active Contributor
0 Kudos

Hi Harsh,

Check the FixValue functionality and value mapping in this doc for your requirement.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638">Mapping Functionality in XI</a>

This should help

Regards,

Chandra

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Harsh,

One simple alternate way is using global variables(Java Section) in Graphical mapping.

Declare a HashMap and initialize with key value pairs like

myMap.put("EU","European Union");
 myMap.put("IN","INDIA");

Then write an UDF to get value from the global HashMap variable by passing key as argument, this UDF can be used for any number of target fields without changing the UDF code, the new key value pair can be added in Java section without touching UDF code.

Regards,

Ananth

bhavesh_kantilal
Active Contributor
0 Kudos

Harsh,

This is handled using Value Mapping.

Check the E learning section on the XI home page for the SDN TV demo on value Mapping.

Regards,

Bhavesh