on 08-09-2013 2:58 AM
Hi experts
i have a requirement of multiline item mappings from single node at two same level nodes at target.
Scenario:accordingly with my example screen shot :
I will get 3 Record(Source) nodes, where as i have will send name1 ,name2 details at Record 1 (target) and City to Record2.
So my question is...for 3 source nodes..how should i do the mapping to get this result on target(shown below).Do i need to have write an UDF to achieve this.
Target result:
Name1
Name2
City
Name1
Name2
City
Name1
Name2
City
Thanks in advance.
Pooja.
Hello,
Why don't u change ur target structure? Create one Record1 node at target side and add 3 elements inside it - Name1, Name2 and City. In that case ur mapping will be quite simple.
Record1----O..Unbounded
Name1
Name2
City
Having said that if you don't want to change ur structure, then u have to follow this kind of approach - it will certainly work
http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/01/14/file-conversion-using-nodeception
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pooja,
I thinkthe only solution is to make an UDF to acummulate the values name1 and name2 for the same target.
It isn't difficult. Check this UDF:
public void addMultiLine(String[] name1, String[] name2, ResultList result, Container container) throws StreamTransformationException{
result.addValue(name1[0]);
result.addValue(name2[0]);
}
According your cardinalities you will need enough records tag as name1 and name2 tags:
To get the name1 and name2 to the target:
Example:
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.