Skip to Content
0
Jan 06, 2010 at 06:30 PM

XML to Internal table using XSLT by CALL TRANSFORMATION error

818 Views

Dear experts,

I have to fetch the data from an XML file using XSLT into internal tables. The XML file is very big as following:-

<?xml version="1.0" standalone="yes" ?>

- <Shipment>

<shipmentID>25091203S000778</shipmentID>

<manifestDateTime>2009-12-03T20:16:52.00</manifestDateTime>

<shipmentFacilityNumber>025</shipmentFacilityNumber>

<shipmentFacilityAbbreviation>CHI</shipmentFacilityAbbreviation>

<shipmentFacilityAddress1>810 KIMBERLY DRIVE</shipmentFacilityAddress1>

<shipmentFacilityAddress2 />

<shipmentFacilityCity>CAROL STREAM</shipmentFacilityCity>

<shipmentFacilityState>IL</shipmentFacilityState>

<shipmentFacilityPostalCode>601880000</shipmentFacilityPostalCode>

<shipmentTruckCarrierCode>X150</shipmentTruckCarrierCode>

<shipmentSourceCode>T</shipmentSourceCode>

<userID>CAMPOSG</userID>

- <Delivery>

<primaryCustomerNumber>954371</primaryCustomerNumber>

<primaryCustomerName>MIDWEST OFFICE SUPPLY</primaryCustomerName>

<primaryCustomerAddress1 />

<primaryCustomerAddress2>4765 INDUSTRIAL DR</primaryCustomerAddress2>

<primaryCustomerCity>SPRINGFIELD</primaryCustomerCity>

<primaryCustomerState>IL</primaryCustomerState>

<primaryCustomerPostalCode>627030000</primaryCustomerPostalCode>

<primaryCustomerPhoneNumber>2177535555</primaryCustomerPhoneNumber>

<shuttleStopFacilityNumber />

<billOfLadingNumber>25HZK99</billOfLadingNumber>

<carrierProNumber />

<shipmentTotalCartonCount>6</shipmentTotalCartonCount>

<shipmentTotalWeight>266</shipmentTotalWeight>

- <order>

<orderNumber>25HZK99</orderNumber>

<subOrderNumber />

<dateProcessed>2009-12-03</dateProcessed>

<primaryOrderNumber />

<shipTruckCode>X150</shipTruckCode>

<shipTruckDescription>UDS - ADDISON</shipTruckDescription>

<shipTruckPriorityCode>01</shipTruckPriorityCode>

<shipTruckGroupCode>01</shipTruckGroupCode>

<shipTruckDepartureTime>20.00.00</shipTruckDepartureTime>

<shipTruckDockID>07</shipTruckDockID>

<ldpFacilityAbbreviation />

<shuttleAvailableIndicator>N</shuttleAvailableIndicator>

<shuttleMessageText />

<crossDockFacilityCode />

<crossDockTruckCode />

<crossDockID />

<subsidizedFreightTruckID />

<customerPurchaseOrderNumber>623559</customerPurchaseOrderNumber>

<headerTypeCode>P</headerTypeCode>

<orderTypeID>RG</orderTypeID>

<deliveryTypeID>DS</deliveryTypeID>

<deliveryMethodCode />

<customerBarCode />

<customerReferenceData>25HZK99</customerReferenceData>

<customerReferenceText />

<customerRouteData>ZNED UNTED</customerRouteData>

<customerRouteText>ROUTE</customerRouteText>

<endConsumerPurchaseOrderNumber />

<endConsumerPurchaseOrderText />

<endConsumerName>CHARLESTON TRANS. FACILITY</endConsumerName>

<endConsumerAddress1>HOMEWOOD DT PROGRAM DEPT. 3</endConsumerAddress1>

<endConsumerAddress2>17341 PALMER BLVD.</endConsumerAddress2>

<endConsumerAddress3 />

<endConsumerCity>HOMEWOOD</endConsumerCity>

<endConsumerState>IL</endConsumerState>

<endConsumerPostalCode>60430</endConsumerPostalCode>

<endConsumerCountryCode />

<fillFacilityNumber>025</fillFacilityNumber>

<shpFacilityNumber>025</shpFacilityNumber>

<homeFacilityAbbrCode>STL</homeFacilityAbbrCode>

<homeFacilityNumber>015</homeFacilityNumber>

<multiCartonIndicator>Y</multiCartonIndicator>

<primaryCustomerIndicator>Y</primaryCustomerIndicator>

<shipToCustomerNumber>954371001</shipToCustomerNumber>

<customerCompanyID>01</customerCompanyID>

<customerTruckID>U888</customerTruckID>

<customerTruckDescription>UDS - ADDISON</customerTruckDescription>

<customerTruckDockID>13</customerTruckDockID>

<thirdPartyBillCarrier />

<thirdPartyBillID />

<thirdPartyBillType />

<qualityCheckIndicator>N</qualityCheckIndicator>

<warehouseLaydownID />

<packListPosition>I</packListPosition>

<preferredPackingType>CTN</preferredPackingType>

<preferredPackingMaterial>PAPER</preferredPackingMaterial>

<preferedPackingInstructions />

<totalOrderCartonQty>6</totalOrderCartonQty>

<convertAddressIndicator>N</convertAddressIndicator>

<dealerInstructionIndicator>Y</dealerInstructionIndicator>

<dealerinstructions1>CPO#: 623559</dealerinstructions1>

<dealerinstructions2>ATTN: DANA GRIFFIN</dealerinstructions2>

<dealerinstructions3>INFO: 612</dealerinstructions3>

<dealerinstructions4>ROUTE: ZNED UNTED</dealerinstructions4>

<dealerinstructions5 />

<dealerinstructions6 />

<shippingInstructionsIndicator>N</shippingInstructionsIndicator>

<shippingInstructions1 />

<shippingInstructions2 />

<shippingInstructions3 />

<shippingInstructions4 />

<shippingInstructions5 />

<shippingInstructions6 />

<specialInstructionsIndicator>N</specialInstructionsIndicator>

<specialInstructions1 />

<specialInstructions2 />

<customeContainerDesc />

- <carton>

<deliveryCartonID>253370905995</deliveryCartonID>

<shipIndicator>Y</shipIndicator>

<deliveryPalletID>X150</deliveryPalletID>

<consolidatedDeliveryCartonID />

<scanDateTime>2009-12-03T19:36:12.00</scanDateTime>

<cartonWeight>52</cartonWeight>

<dropShipFlag>1</dropShipFlag>

<carrierTrackingNumber />

<carrierZoneID>0</carrierZoneID>

<codAmount />

<customerPackageAmount />

<declaredValue />

<residentialDeliveryIndicator />

<serviceTypeCode>00</serviceTypeCode>

<ssccCode>006860244400829393</ssccCode>

- <Item>

<shipPrefix>UNV</shipPrefix>

<shipStockNumber>21200</shipStockNumber>

<itemDescription>PAPER XERO/DUP WE LTR 20#</itemDescription>

<orderQuantity>1</orderQuantity>

<originalShipQuantity>1</originalShipQuantity>

<shipQuantity>1</shipQuantity>

<inventoryUnitCode>CT</inventoryUnitCode>

<inventoryWeightQuantity>52.000</inventoryWeightQuantity>

<upcNumber>00000000000000</upcNumber>

<upcRetailCode>087547212004</upcRetailCode>

<hazmatIndicator>N</hazmatIndicator>

<serialRequiredIndicator>N</serialRequiredIndicator>

<dealerMemoPO>S</dealerMemoPO>

<cartonLineNumber>1</cartonLineNumber>

<orderLineNumber>11</orderLineNumber>

<originalOrderPrefix>UNV</originalOrderPrefix>

<originalOrderStockNumber>21200</originalOrderStockNumber>

<reasonCode />

- <Item_Serial>

<serialNumber />

</Item_Serial>

</Item>

</carton>

</order>

</Delivery>

</Shipment>

This is not the complete XML file as it exceeds the 15000 characters and then I cann't post here. So I have deleted much part of it.

The hierarchy is as following: Shipment->Delivery->Order->Carton->Item.

I have created a XSLT for it which is working fine.

But when I execute my report program it gives CX_SY_XSLT_FORMAT_ERROR saying that

Transformation error: Non-canonical structure of element name XML_OUTPUT.