Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Difficult order mapping
- This topic has 0 replies, 1 voice, and was last updated 9 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
October 22, 2009 at 3:06 AM #23499
Dear BizTalk friends,
I have one problem with with mapping between two complex orders and hope that somebody can help me with some good solution.
Namely this is my Source or input schema which at one row content header and line information :
<Orders>
<Order>
<OrderNumber>
<Customer Number>
<ShipDate>
<DeliveryDate>
<Adress>
<ZipCode>
<Town>
<ItemNo>
<Quantity>
<Amount>
<Status>
<ShipmentMethod>
<PaymentMethod>INPUT EXAMPLE : 10001;customer;12/12/2009;12/12/2009;Adress;129999;London;R33331;100;10000;Released;CIF;Cash
This is my output or destination schema which has separated header and line parts
<Order>
<OrderHeader>
<OrderNumber>
<Customer>
<ShipDate>
<DeliveryDate>
<Adress>
<ZipCode>
<Town>
<OrderLine>
<OrderNumber>
<LineNumber>
<ItemNo>
<Amount>
<Quantity>EXAMPLE :
10001;Customer;12/12/2009;12/12/2009;Adress;129999;London (Header)
10001;1;T4444;10000;100 (Line)The problem for me starts if I have as input for example two orders with two lines. Example :
10001;customer;12/12/2009;12/12/2009;Adress;129999;London;R33331;100;10000;Released;CIF;Cash (order1)
10001;customer;12/12/2009;12/12/2009;Adress;129999;London;R33336;500;60000;Released;CIF;Bank (order1)
10002;customer;12/15/2009;12/15/2009;Adress;129999;Paris;R33331;100;10000;Released;CIF;Cash (order2)
10002;customer;12/15/2009;12/15/2009;Adress;129999;Paris;R33336;900;90000;Released;CIF;Bank (order2)With the current mapping as output I got this :
10001;Customer;12/12/2009;12/12/2009;Adress;129999;London
10001;Customer;12/12/2009;12/12/2009;Adress;129999;London (double record, same as previous)
10002;Customer;12/15/2009;12/15/2009;Adress;129999;Paris
10002;Customer;12/15/2009;12/15/2009;Adress;129999;Paris (double record, same as previous)
10001;1;R33331;10000;100
10001;2;R33336;50000;600
10002;3;R33331;10000;100 (line number is 3 but should be 1 because it is new order)
10002;4;R33336;90000;900 (line number is 4 but should be 2 because it is new order)My goal is to get this as output :
10001;Customer;12/12/2009;12/12/2009;Adress;129999;London
10002;Customer;12/15/2009;12/15/2009;Adress;129999;Paris
10001;1;R33331;10000;100
10001;2;R33336;50000;600
10002;1;R33331;10000;100 (line number is 3 but should be 1 because it is new order)
10002;2;R33336;90000;900 (line number is 4 but should be 2 because it is new order)The my questions is :
1. How to eliminate double (same records) which exist for order header ?
2. How to iterate line numbers on that way that if have new order always starts with 1 and not to continue with the the iteration (make special iteration per order) ?Hope that somebody can help me.
Thanks in advance.
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.