on 06-10-2010 6:33 AM
Hello All,
I Have 2 messages one header and and one item. Will look something like below
Header message:
H1;012-003;123456789;
H2;012-003;987654321;
Item message:
I1;012-003;123456789;
I2;012-003;123456789;
I3;012-003;123456789;
I4;012-003;987654321;
I5;012-003;987654321;
Output should look something like below:
H1;012-003;123456789;
I1;012-003;123456789;
I2;012-003;123456789;
I3;012-003;123456789;
H2;012-003;987654321;
I4;012-003;987654321;
I5;012-003;987654321;
Header and item are 2 different messages which are to be mapped to a single message in message mapping.
Am also doing a removecontext for the item node on the target, but for some reason all the 5 items appear in the target message on testing the map. Tried putting some variables and if conditions, with out any help.
Any suggestions would be very much helpful..
--Prashanth
Hi,
You can try this:
assuming Input Structure is
Input
Header 0..onbd
Head1
Head2
Head3
Items 0..unbd
Item1
Item2
Item3
And Output Structure say :
Output
Records 0..unbd
Header 0..1
Head1
Head2
Head3
Items 0..unbd
Item1
Item2
Item3
Mapping :
Source Target
Header -
<Removecontext> -
> Records
Header----
>Header
Head1----
>Head1
Head2----
>Head2
Head3----
>Head3
[ Head3,Items3,Item3-[UseOneAMany] --- If equals Item3 Then Item3 - Remove context - SplitByValue (value change) -
-
>Items
]
Item1----
>Item1
Item2----
>Item2
Item3----
>Item3
Ritu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jude,
They are 2 common fields in the header and item messages which remain the same, they can be related. I copied the 2 header values into 2 variables and then tried to use that variables as an IF condition on the item fields.
Is this the way? Could not find proper blogs for this requirement. Appreciate if you can forward me the blogs.
--Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gurram ,
Its very easy ...try to find the help of the node functions.
You can find many good examples in SDN.
When i look into the example , you shd need a condition to split the Item detils , bco'z u have 5 line item and 3 moved to header 1 and other 2 moved to header 2 .( What is the condition)
Any Primary key ?
Any unique Field ?
Regards,
B.Jude
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.