on 05-13-2009 11:02 AM
hi
i have source structure like this
<records_mt>
<data> 1 to inbound
field1
field 2
field3
<data2> 1 to unbound
field4
field5
field6
my target structure is
<records_mt>
<data_target> 1 to inbound
field1
field 2
field3
field4
field5
field6
so if data1 comes one time data2 comes 3 times in the incoming message then in the target message i should have 3 records and every record should have field1, field2 and field3. I heard that we cna do this using context mapping. can anybody give me the exact mapping?
thanks
Hi Sudhakar,
Map your <data2. node to <data_target> node.
then for field1 field2 field3 use the useOneAsMany node function
The three inputs for Use One as many are
1) field1
2) <data2>
3) <data3>
GIve the output of useOneAsmany to field1 field2 field3 of the target respectively.
Map the field4 field5 field 6 normally.
Regards,
Ravi Kanth Talagana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please follow up as mentioned in Ravis reply. Instead of <data3> use <data2> itself.
The relation between first input and second input to UseOneAsMany is number of context changes should be same and between second input and third input is number of values should be same. Keep this in mind while mapping. The output of UseOneAsMany will be like the first input values will be replicating as many number of times you having the values in the second input and context changes depends on the context changes in the third input.
For more explantion just go through help.sap.com documents which clearly depicts with example.
For <data1> whatever be the number of fields inside it u can use the same function since field1 corresponds to field1 only in target.So even if number of fields in <data1> increased also what is the problem you forseeing in it I am not getting.
Regards,
Vineetha.
Hi,
No.we can not use like.
field1->
data2->
data2-> use one as many field1 of tartget
Because field one will form in single context.So you can not get field1 value in all the Target structure.But you need to populate field1 value in all the target structure.So you should use like below.
field1->
data2->
data2->SplitbyValue(each)-- use one as many field1 of tartget
Regards,
Prakasu.M
Hi Sudhakar,
Do like this.
data2------------>data_target
field1------\
data2--------->UseOneAsMany------>field1
data2------/
field2------\
data2--------->UseOneAsMany------>field2
data2------/
field3------\
data2--------->UseOneAsMany------>field3
data2------/
field4------->field4
field5------->field5
field6------->field6
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Map like below.
field1---use one as many---target(field1)
data2--
data2--splitbyvalue(each value)--
field1(source) -
target(field1)
same way map the fields comes in data1 to target. like field 2,field3
Directly map what are fields comes in data2 to target. like field5,field6
field4---target(field4)
This will work data1 must come in one time and data2 structure comes in multiple times.
Regards,
Prakasu.M
Edited by: prakasu on May 13, 2009 6:45 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use one as many in the mapping.
Map like below.
field1---use one as many---target(field1)
data2--
field4 (or)[data2--splitbyvalue(each value)]--
Regards,
Prakasu.M
Edited by: prakasu on May 13, 2009 3:37 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.