Hi Gurus,
My scenario is File to File
My Source structure is as below
<RECORD> <ROW> <OrderNumber/> <CyberSourceRequestId/> <OrderDate/> <CustomerID/> <ContactEmailAddress/> <ContactPhoneNumber/> <ShipToAddress/> <ShipToCity/> <ShipToCountry/> <ShipToDescription/> <ShipToState/> <ShipToZip/> <ShippingCharges/> <ShippingInstructions/> <SoldToAddress/> <SoldToCity/> <SoldToCountry/> <SoldToDescription/> <SoldToState/> <SoldToZip/> <ProductID/> <ProductReferenceNumber/> <ProductEANNumber/> <ProductName/> <ProductModel/> <QuantityOrdered/> <OrderCouponCode/> <OrderCouponAmount/> <OrderTaxes/> <Price/> <FinalPrice/> <FinalProductNetPrice/> <OrderTotalAmount/> <GCAmount/> <CCAmount/> </ROW> </RECORD>
My Target is below
<header> <LegacyCompanyNumber>YSL</LegacyCompanyNumber> <CustomerNumber>701</CustomerNumber> <OrderDate></OrderDate> <NetAmount></NetAmount> <TaxAmount></TaxAmount> <FreightAmount></FreightAmount> <TotalAmount>Constant</TotalAmount> <PrepaidAmount>0</PrepaidAmount> <GiftCertAmount></GiftCertAmount> <StoreCreditAmount>0</StoreCreditAmount> <LoyaltyCardAmount>0</LoyaltyCardAmount> <ChargeCardAmount></ChargeCardAmount> <detail> <detailrow> <UPC></UPC> <Description></Description> <Quantity></Quantity> <Price>Constant</Price> <CouponPromoAmount>0</CouponPromoAmount> <CouponStructuralAmount>0</CouponStructuralAmount> <CouponOtherAmount>0</CouponOtherAmount> </detailrow> </detail> </header>
Suppose if my file contains records as below
570774 xxx xxx xxx xxx 570774 xxx xxx xxx xxx 570775 xxx xxx xxx xxx
For each new order number(key field ex: 570774) a new xml file to be created , from the above example 2 xml files sholud be created(one for 570774 and the other for 570775)
How can i acheive this functionality? Please help me on this,
Thanks in advance
Regards
Srinivas