on 01-15-2009 6:29 PM
Hi all,
I need to do the below message mapping:
Source
Group_1 (0..n)
|--HL (1..1)
|---HirarchicalIDNumber(1..1)
|---ParentIdNumber(0..1)
|---Code (Can be S (shipment), O-Order, I-Item) (1..1)
Target:
Shipment
|--Order (1..n)
|--LevelCode (1..1)
|--PONumber (1..1)
I need to map Group to Order in such a way that below condition is satisfied:
Group_1/HL/Code='O' and ParentIDnumber= Shipment Group/ HirarchicalIDNumber
I need to make a tree on target such that all the Orders belonging to same Shipment are together on target side by comparing Code and ParentID number .Can any body please suggest
Any help will be really appriciated.
Thanks,
-Kulwant
Hi Kulwant,
You should use the below logic to create the target Order node :
Group_1/HL/Code
equals ------------
'O'
And --------- Createif ------ CollapseContext ----- Order
ParentIDnumber
equals ------------
HirarchicalIDNumber
Thanks,
Pooja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kulwant,
I'm not sure which is the real requirement. Please clarify between the two:
I need to map Group to Order in such a way that below condition is satisfied:
Group_1/HL/Code='O' and ParentIDnumber= Shipment Group/ HirarchicalIDNumber
or
I need to make a tree on target such that all the Orders belonging to same Shipment are together on target side by comparing Code and ParentID number
The first one would only concentrate in the Code = 'O', but the second one would need to take into consideration all Codes (S, O and I)
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pooja,
Although i don't have testing data but still i can explain as here:
Source:
Group(0..n)
|-- ID
|-- Code (Can be S-Shipment, O-Order, I - Item)
|-- Parent ID
Example: Source
<GROUP>
<ID>S1001</ID>
<CODE>S</CODE>
<PARENTID></PARENTID>
</GROUP>
<GROUP>
<ID>O1001</ID>
<CODE>O</CODE>
<PARENTID>S1001</PARENTID>
</GROUP>
<GROUP>
<ID>O1002</ID>
<CODE>O</CODE>
<PARENTID>S1001</PARENTID>
</GROUP>
<GROUP>
<ID>I1001</ID>
<CODE>I</CODE>
<PARENTID>O1001</PARENTID>
</GROUP>
Target:
Shipment(1..1)
|--Order(1..n)
|--Level Code(1..1)
|--PO Number(1..1)
|--Item(1..n)
|--LevelCode(1..1)
|--ItemNumber(1.1)
Example Output:
<Shipment>
<ORDER>
<LEVELCODE>O</LEVELCODE>
<PONUMBER>O1001</PONUMBER>
<ITEM>
<LEVELCODE>I</LEVELCODE>
<ItemNUMBER>I1001</PONUMBER>
</ITEM>
</ORDER>
<ORDER>
<LEVELCODE>O</LEVELCODE>
<PONUMBER>O1002</PONUMBER>
</ORDER>
</Shipment>
Hi Kulwant,
It is not possible to have the desired output using the current target structure since Order 1..n and Item: 1..n are both independent of each other. What you can do is to modify the target structure from:
+Target:
Shipment(1..1)
|--Order(1..n)
|--Level Code(1..1)
|--PO Number(1..1)
|--Item(1..n)
|--LevelCode(1..1)
|--ItemNumber(1.1)+
to
Shipment(1..1)
|--Order(1..n)
|----Level Code(1..1)
|----PO Number(1..1)
|----Item(1..n)
|-------LevelCode(1..1)
|-------ItemNumber(1..1)
User | Count |
---|---|
93 | |
10 | |
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.