on 01-25-2010 2:26 PM
hi, guru
I have a source as below
<source>
<record typeA="xx" typeB="yy">
<name>name1</name>
</record>
<record typeA="xx" >
<name>name2</name>
</record>
</source>
I'd like to create output as
<target>
<record>
<type>typeA</type>
<value>xx</value>
<name>name1</name>
</record>
<record>
<type>typeB</type>
<value>yy</value>
<name>name1</name>
</record>
<record>
<type>typeA</type>
<value>xx</value>
<name>name2</name>
</record>
</target>
How do I write this mapping? UseOneAsMany? please help , thanks.
anybody can help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
here you need to use the count of the attributes and pass it to the function of useone as many second and third values and use name1 as the first field...
HTH
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Its usually used when we want a field value from source(occurence 0..1 or 1..1) to be repeated multiple times in target structure.
Following link would give you more on useOneAsMany : http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/frameset.htm
Regards
Soumen...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ts usually used when we want a field value from source(occurence 0..1 or 1..1) to be repeated multiple times in target structure.
Following link would give you more on useOneAsMany : http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/frameset.htm
Regards
Soumen...
Thanks, I did read this link, however I did not under the 3nd parameter well.
however I did not under the 3nd parameter well.
Did the below line did not help:
The field that can occur more than once is expected as the third parameter. In our example, this is name
If you see in the source XML that is shown in the help section you will find that name field occurs multiple times within an order node whereas type field ocurs just once hence type is the first parameter while name is the second parameter...you can even refer this blog which shows the similar behaviour without SpliByValue function.
Regards,
Abhishek.
Did the below line did not help:
The field that can occur more than once is expected as the third parameter. In our example, this is name
If you see in the source XML that is shown in the help section you will find that name field occurs multiple times within an order node whereas type field ocurs just once hence type is the first parameter while name is the second parameter...you can even refer this blog which shows the similar behaviour without SpliByValue function.
Regards,
Abhishek.
Thanks, but I think this help doc is a little different from my case.
I have 2 attributes typeA and typeB, they may or may not appear, I'm not sure how to use them as the parameters to UseOneAsMany.
have 2 attributes typeA and typeB, they may or may not appear, I'm not sure how to use them as the parameters to
UseOneAsMany.
you cant use both of them, only one needs to be used.....and they need to be present if you want the source node (parameter1) to be repeated in the target some number of times.
>
>
have 2 attributes typeA and typeB, they may or may not appear, I'm not sure how to use them as the parameters to > UseOneAsMany.
> you cant use both of them, only one needs to be used.....and they need to be present if you want the source node (parameter1) to be repeated in the target some number of times.
sorry for again.
I think I'm not smart enough to understand ti.
Can you write down the detailed mapping for my case? I'm a newbie of PI, you answer will be really help.
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.