on 02-14-2011 8:38 PM
HI Experts,
I am new to SAP PI topic and here I have a mapping requirement in one of the SAP PI development interfaces. and here i am not sure which function should i use to get the desired result. if this is not possible from graphical tool, then what is the best option.
Mappings
1) - 123456789(source) -- 123-45-6789(target)
2) code ( source)----
Check, if A1 = A2 , then C1 C2 D1 D2 D3 D4 = G12, E1 E2 = H26, F1 = M12
Thanks In advance,
Best Regards,
Kiran
Hi Kiran,
What are ABCD..are the values?
Do you need condition check and depending upon which you are populating..
If yes, its possible through graphical mapping.
Use function "If without else"
source node---->
If without else----> Target node
Condition----->
I hope you dont have any else conditon..
Regards,
Sushama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create a simple udf as below
Execution type : single variable
Type: Argument Name: var1 Java Type: String
public String numberFormat(String var1, Container container) throws StreamTransformationException{
String st1 = var1.substring(0,3);
String st2 = var1.substring(3,5);
String st3 = var1.substring(5,9);
String total = st1 + "-" + st2 + "-" + st3;
return total;
}
Map the source element with numberFormat UDF and connect output to targe field.
Tested the code and it works.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.