on 11-09-2011 8:20 AM
Hi Experts
Please help in understanding the below mapping
Source: XXX
Target : AAA
condition: if XXX = 123 then name 1
if XXX = 456 then name 2
if XXX = 789 then name 3
if XXX = 098 then name 4
else name 5
Regards
Lara
one more suggestion..u can go for UDF also (However solution suggested by Mark is more simple)
input : var
execution type: single value
if(var.equals("123"))
{
return "name1";
}
else if(var.equals("456"))
{
return "name2";
}
else if(var.equals("789"))
{
return "name3";
}
else if(var.equals("098"))
{
return "name4";
}
else
{
return "name5";
}
XXX-UDF--AAA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Amit alreadt mention you can achieve this requirement using standard functions too,but you have to use multple standard functions -evry standard function is associated with java code so when you execute mapping program it executed all functions so it is kind of burden.
always try to follow best practises..in your case go for fix value table,in future if you want to add more conditions then adding entries in fix value table is simple.
Regards,
Raj
use value mapping for this http://www.saptechnical.com/Tutorials/XI/Graphicalmapping/conversions.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You can use fix values for your requirement
Use default value when lookup fails
Default value: name5
key value
123 name1
456 name2
789 name3
098 name4
Source -> fixValues -> target
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.