BizTalk Server General - Mapping problem

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > November 2005 > Mapping problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Mapping problem
mhiltyGComm

2005-11-22, 5:54 pm

I have a problem mapping xml to a flat file.

I am mapping from an XCBL 852 to a flat file, what I need is for the
output to look like this.
H 852PAL00000012005050820050514
D1BP13993 UP050375005872 CCcustomer#
D2QA
D30251971 017534-1 02922510 0292251 0316082
03629910 0388855
D30514827 0175348

D2QP
D30251971 017534-1 02922510 0292251 0316082
03629910 0388855
D30514827 0175348

D2RE
D302519710010 017534-100 0292251025 029225133 031608200
03629910 03888550
D305148272305 0175348


Basicly I need for each part number to have the D2 code and then for
each the location code and QTY, I currently have 18 different locations
and need them to be on the D3 line
I have the H, D1, and the D2 all mapping correctly, but the D3 line is
a location code and QTY
I have tried everything looping, table looping , mass copy and nothing
seems to work. I can get the map to work with only 1 location code and
QTY for each D2 line but need all the locations and QTYs in the D3 line
for that Part number. Here is the schema
<ProductActivity xmlns="http://insinkerator.com.schema">
<Header xmlns="">
<TransactionCode>852</TransactionCode>
<BatchNumber>PAL0000001</BatchNumber>
<FromDate>20050508</FromDate>
<ToDate>20050514</ToDate>
</Header>
<Detail xmlns="">
<ItemReference>
<VendorItemQualifier>BP</VendorItemQualifier>
<VendorItemNumber>13993</VendorItemNumber>
<UPCItemQualifier>UP</UPCItemQualifier>
<UPC>050375005872</UPC>
<BuyerItemQualifier>CC</BuyerItemQualifier>
<BuyerItemNumber>customer#</BuyerItemNumber>
</ItemReference>
<Quantities>
<QuantityQualifier>
<QuantityQualifierCode>QA</QuantityQualifierCode>
</QuantityQualifier>
<DestinationQuantity>
<LocationCode1>025197</LocationCode1>
<LocationCode1Quantity>1</LocationCode1Quantity>
<LocationCode2>017534</LocationCode2>
<LocationCode2Quantity>-1</LocationCode2Quantity>
<LocationCode3>029225</LocationCode3>
<LocationCode3Quantity>10</LocationCode3Quantity>
<LocationCode4>029225</LocationCode4>
<LocationCode4Quantity>1</LocationCode4Quantity>
<LocationCode5>031608</LocationCode5>
<LocationCode5Quantity>2</LocationCode5Quantity>
<LocationCode6>036299</LocationCode6>
<LocationCode6Quantity>10</LocationCode6Quantity>
<LocationCode7>038885</LocationCode7>
<LocationCode7Quantity>5</LocationCode7Quantity>
</DestinationQuantity>
<DestinationQuantity>
<LocationCode1>051482</LocationCode1>
<LocationCode1Quantity>7</LocationCode1Quantity>
<LocationCode2>017534</LocationCode2>
<LocationCode2Quantity>8</LocationCode2Quantity>
<LocationCode3></LocationCode3>
<LocationCode3Quantity></LocationCode3Quantity>
<LocationCode4></LocationCode4>
<LocationCode4Quantity></LocationCode4Quantity>
<LocationCode5></LocationCode5>
<LocationCode5Quantity></LocationCode5Quantity>
<LocationCode6></LocationCode6>
<LocationCode6Quantity></LocationCode6Quantity>
<LocationCode7></LocationCode7>
<LocationCode7Quantity></LocationCode7Quantity>
</DestinationQuantity>
</Quantities>
<Quantities>
<QuantityQualifier>
<QuantityQualifierCode>QP</QuantityQualifierCode>
</QuantityQualifier>
<DestinationQuantity>
<LocationCode1>025197</LocationCode1>
<LocationCode1Quantity>1</LocationCode1Quantity>
<LocationCode2>017534</LocationCode2>
<LocationCode2Quantity>-1</LocationCode2Quantity>
<LocationCode3>029225</LocationCode3>
<LocationCode3Quantity>10</LocationCode3Quantity>
<LocationCode4>029225</LocationCode4>
<LocationCode4Quantity>1</LocationCode4Quantity>
<LocationCode5>031608</LocationCode5>
<LocationCode5Quantity>2</LocationCode5Quantity>
<LocationCode6>036299</LocationCode6>
<LocationCode6Quantity>10</LocationCode6Quantity>
<LocationCode7>038885</LocationCode7>
<LocationCode7Quantity>5</LocationCode7Quantity>
</DestinationQuantity>
<DestinationQuantity>
<LocationCode1>051482</LocationCode1>
<LocationCode1Quantity>7</LocationCode1Quantity>
<LocationCode2>017534</LocationCode2>
<LocationCode2Quantity>8</LocationCode2Quantity>
<LocationCode3></LocationCode3>
<LocationCode3Quantity></LocationCode3Quantity>
<LocationCode4></LocationCode4>
<LocationCode4Quantity></LocationCode4Quantity>
<LocationCode5></LocationCode5>
<LocationCode5Quantity></LocationCode5Quantity>
<LocationCode6></LocationCode6>
<LocationCode6Quantity></LocationCode6Quantity>
<LocationCode7></LocationCode7>
<LocationCode7Quantity></LocationCode7Quantity>
</DestinationQuantity>
</Quantities>
<Quantities>
<QuantityQualifier>
<QuantityQualifierCode>RE</QuantityQualifierCode>
</QuantityQualifier>
<DestinationQuantity>
<LocationCode1>025197</LocationCode1>
<LocationCode1Quantity>10010</LocationCode1Quantity>
<LocationCode2>017534</LocationCode2>
<LocationCode2Quantity>-100</LocationCode2Quantity>
<LocationCode3>029225</LocationCode3>
<LocationCode3Quantity>1025</LocationCode3Quantity>
<LocationCode4>029225</LocationCode4>
<LocationCode4Quantity>133</LocationCode4Quantity>
<LocationCode5>031608</LocationCode5>
<LocationCode5Quantity>200</LocationCode5Quantity>
<LocationCode6>036299</LocationCode6>
<LocationCode6Quantity>10</LocationCode6Quantity>
<LocationCode7>038885</LocationCode7>
<LocationCode7Quantity>50</LocationCode7Quantity>
</DestinationQuantity>
<DestinationQuantity>
<LocationCode1>051482</LocationCode1>
<LocationCode1Quantity>72305</LocationCode1Quantity>
<LocationCode2>017534</LocationCode2>
<LocationCode2Quantity>8</LocationCode2Quantity>
<LocationCode3></LocationCode3>
<LocationCode3Quantity></LocationCode3Quantity>
<LocationCode4></LocationCode4>
<LocationCode4Quantity></LocationCode4Quantity>
<LocationCode5></LocationCode5>
<LocationCode5Quantity></LocationCode5Quantity>
<LocationCode6></LocationCode6>
<LocationCode6Quantity></LocationCode6Quantity>
<LocationCode7></LocationCode7>
<LocationCode7Quantity></LocationCode7Quantity>
</DestinationQuantity>
</Quantities>
</Detail>
<Detail xmlns="">
My input looks like this.
<ns0:InventoryReport xmlns:dgs="http://www.w3.org/2000/09/xmldsig#"
xmlns:core="rrn:org.xcbl:schemas/xcbl/v4_0/core/core.xsd"
xmlns:ns0="rrn:org.xcbl:schemas/xcbl/v4_0/materialsmanagement/v1_0/materialsmanagement.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InventoryReportHeader>
<ns0:InventoryReportID>127765572309984442</ns0:InventoryReportID>
<ns0:InventoryReportIssueDate>2005-11-15T13:40:30</ns0:InventoryReportIssueDate>
<ns0:InventoryReportType>
<ns0:InventoryReportTypeCoded>SellerInventoryReport</ns0:InventoryReportTypeCoded>
</ns0:InventoryReportType>
<ns0:InventoryReportDates>
<ns0:StartDate>2005-01-24T00:10:00</ns0:StartDate>
<ns0:EndDate>2005-01-30T00:10:00</ns0:EndDate>
</ns0:InventoryReportDates>
<ns0:InventoryReportParty>
<ns0:SenderParty>
<core:PartyID>
<core:Agency>
<core:AgencyCoded>AssignedByPartyOriginatingTheMessage</core:AgencyCoded>
</core:Agency>
<core:Ident>5152629511</core:Ident>
</core:PartyID>
<core:NameAddress>
<core:Name1>Plumb Supply</core:Name1>
</core:NameAddress>
<core:PartyRoleCoded>Distributor</core:PartyRoleCoded>
</ns0:SenderParty>
<ns0:ReceiverParty>
<core:PartyID>
<core:Agency>
<core:AgencyCoded>AssignedBySellerOrSellersAgent</core:AgencyCoded>
</core:Agency>
<core:Ident>2625545432</core:Ident>
</core:PartyID>
<core:NameAddress>
<core:Name1>In-Sink-Erator</core:Name1>
</core:NameAddress>
<core:PartyRoleCoded>ManufacturerOfGoods</core:PartyRoleCoded>
</ns0:ReceiverParty>
</ns0:InventoryReportParty>
</InventoryReportHeader>
<ListOfInventoryReportDetail>
<ns0:InventoryReportDetail>
<ns0:LineItemNumber>1</ns0:LineItemNumber>
<ns0:InventoryItemIdentifiers>
<core:PartNumbers>
<core:SellerPartNumber xsi:type="core:PartNumType">
<core:PartID>41741</core:PartID>
<core:PartIDExt>H770</core:PartIDExt>
</core:SellerPartNumber>
<core:BuyerPartNumber xsi:type="core:PartNumType">
<core:PartID>41741</core:PartID>
<core:PartIDExt>H770</core:PartIDExt>
</core:BuyerPartNumber>
<core:ManufacturerPartNumber>
<core:PartID>41741</core:PartID>
<core:PartIDExt>H770</core:PartIDExt>
</core:ManufacturerPartNumber>
<core:OtherItemIdentifiers>
<core:ProductIdentifierCoded>
<core:ProductIdentifierQualifierCoded>UPC</core:ProductIdentifierQualifierCoded>
<core:ProductIdentifier>0000000000</core:ProductIdentifier>
</core:ProductIdentifierCoded>
</core:OtherItemIdentifiers>
</core:PartNumbers>
<core:CommodityCode>
<core:Agency>
<core:AgencyCoded>AssignedByPartyOriginatingTheMessage</core:AgencyCoded>
<core:AgencyDescription>001-DM(Plumb
Supply)</core:AgencyDescription>
<core:CodeListIdentifierCodedOther>Warehouse</core:CodeListIdentifierCodedOther>
</core:Agency>
<core:Ident>001-DM</core:Ident>
</core:CommodityCode>
</ns0:InventoryItemIdentifiers>
<ns0:TotalInventoryQuantity xsi:type="core:QuantityCodedType">
<core:QuantityValue>6</core:QuantityValue>
<core:UnitOfMeasurement>
<core:UOMCoded>EA</core:UOMCoded>
</core:UnitOfMeasurement>
<core:QuantityQualifierCoded>AvailableQuantity</core:QuantityQualifierCoded>
</ns0:TotalInventoryQuantity>
<ns0:ListOfInventoryMangementDetail>
<ns0:InventoryManagementDetail>
<ns0:InventoryQuantity>
<core:QuantityValue>0</core:QuantityValue>
<core:UnitOfMeasurement>
<core:UOMCoded>EA</core:UOMCoded>
</core:UnitOfMeasurement>
<core:QuantityQualifierCoded>OnOrderQuantity</core:QuantityQualifierCoded>
</ns0:InventoryQuantity>
</ns0:InventoryManagementDetail>
<ns0:InventoryManagementDetail>
<ns0:InventoryQuantity>
<core:QuantityValue>0</core:QuantityValue>
<core:UnitOfMeasurement>
<core:UOMCoded>EA</core:UOMCoded>
</core:UnitOfMeasurement>
<core:QuantityQualifierCoded>QuantitySold</core:QuantityQualifierCoded>
<core:QuantityQualifierCodedOther>Direct</core:QuantityQualifierCodedOther>
</ns0:InventoryQuantity>
</ns0:InventoryManagementDetail>
<ns0:InventoryManagementDetail>
<ns0:InventoryQuantity>
<core:QuantityValue>0</core:QuantityValue>
<core:UnitOfMeasurement>
<core:UOMCoded>EA</core:UOMCoded>
</core:UnitOfMeasurement>
<core:QuantityQualifierCoded>QuantitySold</core:QuantityQualifierCoded>
<core:QuantityQualifierCodedOther>Warehouse</core:QuantityQualifierCodedOther>
</ns0:InventoryQuantity>
</ns0:InventoryManagementDetail>
<ns0:InventoryManagementDetail>
<ns0:InventoryQuantity>
<core:QuantityValue>6</core:QuantityValue>
<core:UnitOfMeasurement>
<core:UOMCoded>EA</core:UOMCoded>
</core:UnitOfMeasurement>
<core:QuantityQualifierCoded>AvailableQuantity</core:QuantityQualifierCoded>
</ns0:InventoryQuantity>
</ns0:InventoryManagementDetail>
</ns0:ListOfInventoryMangementDetail>
</ns0:InventoryReportDetail>
<ns0:InventoryReportDetail>
Any help on getting all the location codes to one field?

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com