Skip to Content
0
Former Member
Jul 06, 2009 at 08:18 PM

Message Mapping

54 Views

Hi,

My souce is as below

<RECORD>
     <ROW>
    <EAN1> E1<EAN1>
   <QUAN>1<QUAN>
    <ROW>
     <ROW>
    <EAN1> E2<EAN1>
   <QUAN>2<QUAN>
    <ROW>
     <ROW>
    <EAN1> E3<EAN1>
   <QUAN>3<QUAN>
    <ROW>
     <ROW>
    <EAN1> E1<EAN1>
   <QUAN>4<QUAN>
    <ROW>
<RECORD>

in the target there will be one header and different items for EAN(GROUP BY)

My Target structure will be

<HEADER>
<DETAIL>
   <DETAILROW>
  <UPC>E1<UPC>
  <QUAN>5<QUAN>
   <DETAILROW>
 <DETAIL>
<DETAIL>
   <DETAILROW>
  <UPC>E2<UPC>
  <QUAN>2<QUAN>
   <DETAILROW>
 <DETAIL>
<DETAIL>
   <DETAILROW>
  <UPC>E3<UPC>
  <QUAN>3<QUAN>
   <DETAILROW>
 <DETAIL>

I want to create one header and items(one per EAN) and if the EANs are same then i must add the quantities of EAN.

for detail i had done mapping as below

EAN ---> SORT -


>Splitby Value(value changed) -


> collapse contexts -


> detail.

which sorts EAN and creates one item for each ean.

and now i want to sum up the quantity for a EAN(see the target field values) , Please suggest how can i sort the quantity and add the quantity value for a single EAN.

Please help,