---
dummy endpoint, before
import com.sap.gateway.ip.core.customdev.util.Message;
import groovy.json.JsonSlurper;
def Message processData(Message message) {
def payload = message.getBody(String.class)
def messageType = "despatches" // Default to despatches
if (payload.startsWith("sourcingDeliveries")) {
messageType = "sourcingDeliveries"
} else if (payload.startsWith("despatches")) {
messageType = "despatches"
}
message.setProperty("messageType", messageType)
return message;
}
----
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://schemas.royalcanin.com/BizTalk/2012/Pub/SalesOrderExport">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:choose>
<xsl:when test="local-name() = 'Envelope'">
<xsl:copy-of select="Payload/*"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="*"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
----
start -> 9th sep 24 15:20
excel and xslt logicn , validaiton.
The provided XSLT code does a good job of transforming the source XML (ns0:PurchaseHeaders
) to the desired target format (sourcingDeliveries
). However, there are a few points to be aware of and some areas where the logic could be improved:
Areas needing attention:
Date and Time Handling: While you're handling date and time, the approach with the concatenation and 'T00:00:00UTC+00:00' is correct, but consider using a dedicated XSLT function for date and time formatting (format-dateTime
) for better clarity and control. It would allow you to specify timezones directly.
Item Position: The item position (itemPosition
) is being calculated based on the position of the ReservationEntry
within the ReservationEntries
array. If multiple ReservationEntry
entries have the same TNOPAL
, the same item position would be assigned, potentially leading to duplicates. This could be addressed by using a grouping mechanism within XSLT to assign unique item positions across all ReservationEntry
entries with the same TNOPAL
.
Start and End Production Dates: You're correctly using xsl:for-each
with xsl:sort
to determine the minimum and maximum manufacturing dates for each TNOPAL
. However, the code could be refactored for better readability. It could potentially be simplified by using the min
and max
functions directly on the ManufacturingDate
within the ReservationEntry
elements that have the same TNOPAL
, but remember that these functions might need to be defined using xsl:function
in XSLT 2.0.
Missing Fields: You have omitted a few fields that are mentioned in the mapping table: standardCarrierAlphaCode
, distance
, distanceUom
, totalTravellingTime
, unitTravellingTime
, etc., in both the sourcingDelivery
and stage
elements. Ensure these are handled based on your business logic.
Empty Fields: You have some default values for fields like freightOrderType
and shippingStrategy
, which is good. However, you should consider adding default values for other empty fields as well, especially those that are required in the target system.
Overall:
The XSLT code provides a good starting point for the transformation. However, you should address the points mentioned above to ensure accuracy and robustness. I suggest focusing on these key areas:
- Date and Time Handling: Use a dedicated function for more control.
- Item Position: Ensure unique item positions across all
ReservationEntry
entries with the same TNOPAL
. - Start and End Production Dates: Refactor the logic for clarity.
- Missing Fields: Include logic for the remaining fields.
- Empty Fields: Consider adding default values where appropriate.
Example XSLT snippet using format-dateTime
:
<requestedDeliveryDate>
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptDate">
<xsl:value-of select="format-dateTime(concat(ns0:ExpectedReceiptDate, 'T', ns0:ExpectedReceiptTime), '[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01]UTC+00:00')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'0000-00-00T00:00:00UTC+00:00'"/>
</xsl:otherwise>
</xsl:choose>
</requestedDeliveryDate>
By addressing these points, you'll create a more complete and accurate XSLT transformation for your warehouse system.
end----
-----
new code:
-------
old code
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://schemas.royalcanin.com/BizTalk/2012/Pub/PurchaseOrder">
<xsl:output method="xml"
indent="yes"/>
<xsl:template match="/">
<sourcingDeliveries>
<xsl:for-each select="ns0:PurchaseHeaders/PurchaseHeader">
<sourcingDelivery>
<cargoVolume></cargoVolume>
<cargoVolumeUom></cargoVolumeUom>
<cargoWeight></cargoWeight>
<cargoWeightUom></cargoWeightUom>
<containerId></containerId>
<currentStatus></currentStatus>
<currentStatusDate></currentStatusDate>
<distance></distance>
<distanceUom></distanceUom>
<freightOrderDescription></freightOrderDescription>
<freightOrderType>PROCURE</freightOrderType>
<freightOrderID></freightOrderID>
<meanOfTransport></meanOfTransport>
<sealNumber>SEAL1234</sealNumber>
<shippingInstructions></shippingInstructions>
<shippingStrategy></shippingStrategy>
<sourcingDeliveryId>
<xsl:value-of select="ns0:DocumentNo"/>
</sourcingDeliveryId>
<standardCarrierAlphaCode></standardCarrierAlphaCode>
<totalTravellingTime></totalTravellingTime>
<unitTravellingTime></unitTravellingTime>
<carrier>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</carrier>
<stages>
<stage>
<arrivalDateTime></arrivalDateTime>
<carrierId></carrierId>
<departureDateTime></departureDateTime>
<distance></distance>
<distanceUom></distanceUom>
<number>1</number>
<standardCarrierAlphaCode></standardCarrierAlphaCode>
<totalTravellingTime></totalTravellingTime>
<unitTravellingTime></unitTravellingTime>
<destination>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</destination>
<source>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</source>
<stageDeliveries>
<stageDelivery>
<sequenceNumber>1</sequenceNumber>
<sourcingDeliveryId><xsl:value-of select="ns0:DocumentNo"/> </sourcingDeliveryId>
</stageDelivery>
</stageDeliveries>
</stage>
</stages>
<sourcingDeliveries>
<sourcingDelivery>
<actualGoodsIssueDate></actualGoodsIssueDate>
<billOfLading></billOfLading>
<commentText></commentText>
<companyCode></companyCode>
<customerDeliveryAppointment></customerDeliveryAppointment>
<distributionChannel></distributionChannel>
<division></division>
<documentDate></documentDate>
<documentReference></documentReference>
<goodsReceiptStatus></goodsReceiptStatus>
<goodsReceiptStatusText></goodsReceiptStatusText>
<grossWeight></grossWeight>
<incotermPart1></incotermPart1>
<incotermPart2></incotermPart2>
<meanOfTransport></meanOfTransport>
<palletBase></palletBase>
<palletSpace></palletSpace>
<pickingInstructionText></pickingInstructionText>
<plannedDeliveryDate></plannedDeliveryDate>
<plannedGoodsIssueDate></plannedGoodsIssueDate>
<plannedLoadingDate></plannedLoadingDate>
<plannedMatAvailabilityDate></plannedMatAvailabilityDate>
<postingDate></postingDate>
<sourceType>Vendor</sourceType>
<destinationType>Plant</destinationType>
<priority></priority>
<purchasingGroup></purchasingGroup>
<purchasingOrganization></purchasingOrganization>
<putawayStatus></putawayStatus>
<putawayStatusText></putawayStatusText>
<requestedDeliveryDate>
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptDate">
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptTime and string-length(ns0:ExpectedReceiptTime) > 0">
<xsl:value-of select="concat(ns0:ExpectedReceiptDate, 'T', ns0:ExpectedReceiptTime, 'UTC+00:00')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(ns0:ExpectedReceiptDate, 'T00:00:00UTC+00:00')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'0000-00-00T00:00:00UTC+00:00'"/>
</xsl:otherwise>
</xsl:choose>
</requestedDeliveryDate>
<salesOrganisation></salesOrganisation>
<shippingInstructionText></shippingInstructionText>
<shippingStrategy></shippingStrategy>
<sourcingDeliveryId>53270</sourcingDeliveryId>
<!--doubt sourceType?-->
<!-- destination type missed-->
<sourcingDeliveryType>SOURCING</sourcingDeliveryType>
<specialProcessIndicator></specialProcessIndicator>
<specialProcessIndicatorText></specialProcessIndicatorText>
<transportationPlanningDate></transportationPlanningDate>
<volume></volume>
<volumeUom></volumeUom>
<warehouseNumber></warehouseNumber>
<weightUom></weightUom>
<soldToParty>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</soldToParty>
<source>
<location>
<xsl:value-of select="ns0:BuyFromVendorNo"/>
</location>
<name1>
<xsl:value-of select="ns0:Buy-fromName"/>
</name1>
<name2/>
<houseNumber/>
<street1>
<xsl:value-of select="ns0:Buy-fromAddress"/>
</street1>
<street2>
<xsl:value-of select="ns0:Buy-fromAddress2"/>
</street2>
<postalCode>
<xsl:value-of select="ns0:Buy-fromPostCode"/>
</postalCode>
<poBox/>
<city>
<xsl:value-of select="ns0:Buy-fromCity"/>
</city>
<state> <xsl:value-of select="ns0:Buy-fromCounty"/> </state>
<country>
<xsl:value-of select="ns0:Buy-fromCountry_RegionCode"/>
</country>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDIBuyFromVendorNo"/>
</globalLocationNumber>
</source>
<billToParty>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</billToParty>
<carrier>
<location>
<xsl:value-of select="ns0:MainCarrierNo"/>
</location>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDIMainCarrierNo"/>
</globalLocationNumber>
</carrier>
<destination>
<location>
<xsl:value-of select="ns0:LocationCode"/>
</location>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDILocationCode"/>
</globalLocationNumber>
</destination>
<items>
<xsl:for-each select="PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry">
<xsl:variable name="itemPosition"
select="position()"/>
<item>
<baseUom></baseUom>
<batch><xsl:value-of select="ns0:LotNo"/></batch>
<bestBeforeDate>
<xsl:value-of select="concat(ns0:ExpirationDate, 'T00:00:00UTC+00:00')"/>
</bestBeforeDate>
<conversionFactorToBuom>
<xsl:if test="ns0:Quantity != 0 and ns0:QuantityBase != 0">
<xsl:value-of select="ns0:QuantityBase div ns0:Quantity"/>
</xsl:if>
</conversionFactorToBuom>
<customerMaterialReference></customerMaterialReference>
<customerPurchaseOrderDate></customerPurchaseOrderDate>
<customerPurchaseOrderNumber></customerPurchaseOrderNumber>
<eanOrUpcReference></eanOrUpcReference>
<endProductionDate>
<xsl:variable name="xyz1"
select="ns0:TNOPAL"/>
<xsl:for-each select="//PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry[ns0:TNOPAL=$xyz1]">
<xsl:sort select="ns0:ManufacturingDate"
data-type="text"
order="descending"/>
<xsl:if test="position() = 1">
<xsl:value-of select="concat(ns0:ManufacturingDate,'T00:00:00UTC+00:00')"/>
</xsl:if>
</xsl:for-each>
<!-- <xsl:value-of select="max(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/> -->
</endProductionDate>
<externalHU2></externalHU2>
<goodsReceiptQuantityInBuom></goodsReceiptQuantityInBuom>
<goodsReceiptQuantityInSuom></goodsReceiptQuantityInSuom>
<grossWeight></grossWeight>
<higherItemPosition></higherItemPosition>
<itemCategory></itemCategory>
<itemPosition>
<xsl:value-of select="$itemPosition"/>
</itemPosition>
<lotNumber></lotNumber>
<materialDescription>
<xsl:value-of select="../../ns0:Description"/>
</materialDescription>
<materialReference>
<xsl:value-of select="../../ns0:ItemNo"/>
</materialReference>
<materialType></materialType>
<packagingMaterial></packagingMaterial>
<parentSsccs>
<parentSscc>
<localPalletId></localPalletId>
<parentHUNumber></parentHUNumber>
<parentHuPickedQuantity></parentHuPickedQuantity>
</parentSscc>
</parentSsccs>
<plannedReceiptQuantityInBuom>
<xsl:value-of select="ns0:QuantityBase"/>
</plannedReceiptQuantityInBuom>
<plannedReceiptQuantityInSuom>
<xsl:value-of select="ns0:Quantity"/>
</plannedReceiptQuantityInSuom>
<plant>
<xsl:value-of select="../../../../ns0:LocationCode"/>
</plant>
<positiveRelease>
<xsl:value-of select="ns0:PHRStatus"/>
</positiveRelease>
<positiveReleaseDate>
<xsl:value-of select="concat(ns0:RDD, 'T00:00:00UTC+00:00')"/>
</positiveReleaseDate>
<preceedingDocumentCategory></preceedingDocumentCategory>
<preceedingDocumentNumber></preceedingDocumentNumber>
<preceedingDocumentPosition></preceedingDocumentPosition>
<preceedingDocumentType></preceedingDocumentType>
<preceedingDocumentTypeDesc></preceedingDocumentTypeDesc>
<productionDate>
<xsl:value-of select="concat(ns0:ManufacturingDate, 'T00:00:00UTC+00:00')"/>
</productionDate>
<qualityStatus></qualityStatus>
<shipToPurchaseOrderNumber></shipToPurchaseOrderNumber>
<ssccNumber>
<xsl:value-of select="ns0:TNOPAL"/>
</ssccNumber>
<startProductionDate>
<!-- <xsl:value-of select="min(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/>
<xsl:value-of select="min(ReservationEntry[TNOPAL = ../TNOPAL]/ManufacturingDate)"/>
<xsl:value-of select="PurchaseLine/ReservationEntries/ReservationEntry[min(ns0:ManufacturingDate)]/ns0:ManufacturingDate"/>>
<xsl:value-of select="max(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/>-->
<xsl:variable name="xyz"
select="ns0:TNOPAL"/>
<xsl:for-each select="//PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry[ns0:TNOPAL=$xyz]">
<xsl:sort select="ns0:ManufacturingDate"
data-type="text"
order="ascending"/>
<xsl:if test="position() = 1">
<xsl:value-of select="ns0:ManufacturingDate"/>
</xsl:if>
</xsl:for-each>
</startProductionDate>
<stockType></stockType>
<storageLocation></storageLocation>
<transportationGroup></transportationGroup>
<uomCode>
<xsl:value-of select="../../ns0:UnitOfMeasureCode"/>
</uomCode>
<vendorBatch></vendorBatch>
<volume></volume>
<volumeUom></volumeUom>
<weightUom></weightUom>
<wmsQualityStatus><xsl:value-of select="ns0:QualityStatus"/>
</wmsQualityStatus>
</item>
</xsl:for-each>
</items>
</sourcingDelivery>
</sourcingDeliveries>
</sourcingDelivery>
</xsl:for-each>
</sourcingDeliveries>
</xsl:template>
</xsl:stylesheet>
----
new code 2nd sep 24
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://schemas.royalcanin.com/BizTalk/2012/Pub/PurchaseOrder">
<xsl:output method="xml"
indent="yes"/>
<xsl:template match="/">
<sourcingDeliveries>
<xsl:for-each select="ns0:PurchaseHeaders/PurchaseHeader">
<sourcingDelivery>
<cargoVolume></cargoVolume>
<cargoVolumeUom></cargoVolumeUom>
<cargoWeight></cargoWeight>
<cargoWeightUom></cargoWeightUom>
<containerId></containerId>
<currentStatus></currentStatus>
<currentStatusDate></currentStatusDate>
<distance></distance>
<distanceUom></distanceUom>
<freightOrderDescription></freightOrderDescription>
<freightOrderType>PROCURE</freightOrderType>
<freightOrderID></freightOrderID>
<meanOfTransport></meanOfTransport>
<sealNumber>SEAL1234</sealNumber>
<shippingInstructions></shippingInstructions>
<shippingStrategy></shippingStrategy>
<sourcingDeliveryId>
<xsl:value-of select="ns0:DocumentNo"/>
</sourcingDeliveryId>
<standardCarrierAlphaCode></standardCarrierAlphaCode>
<totalTravellingTime></totalTravellingTime>
<unitTravellingTime></unitTravellingTime>
<carrier>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</carrier>
<stages>
<stage>
<arrivalDateTime></arrivalDateTime>
<carrierId></carrierId>
<departureDateTime></departureDateTime>
<distance></distance>
<distanceUom></distanceUom>
<number>1</number>
<standardCarrierAlphaCode></standardCarrierAlphaCode>
<totalTravellingTime></totalTravellingTime>
<unitTravellingTime></unitTravellingTime>
<destination>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</destination>
<source>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</source>
<stageDeliveries>
<stageDelivery>
<sequenceNumber>1</sequenceNumber>
<sourcingDeliveryId><xsl:value-of select="ns0:DocumentNo"/> </sourcingDeliveryId>
</stageDelivery>
</stageDeliveries>
</stage>
</stages>
<sourcingDeliveries>
<sourcingDelivery>
<actualGoodsIssueDate></actualGoodsIssueDate>
<billOfLading></billOfLading>
<commentText></commentText>
<companyCode></companyCode>
<customerDeliveryAppointment></customerDeliveryAppointment>
<distributionChannel></distributionChannel>
<division></division>
<documentDate></documentDate>
<documentReference></documentReference>
<goodsReceiptStatus></goodsReceiptStatus>
<goodsReceiptStatusText></goodsReceiptStatusText>
<grossWeight></grossWeight>
<incotermPart1></incotermPart1>
<incotermPart2></incotermPart2>
<meanOfTransport></meanOfTransport>
<palletBase></palletBase>
<palletSpace></palletSpace>
<pickingInstructionText></pickingInstructionText>
<plannedDeliveryDate></plannedDeliveryDate>
<plannedGoodsIssueDate></plannedGoodsIssueDate>
<plannedLoadingDate></plannedLoadingDate>
<plannedMatAvailabilityDate></plannedMatAvailabilityDate>
<postingDate></postingDate>
<sourceType>Vendor</sourceType>
<destinationType>Plant</destinationType>
<priority></priority>
<purchasingGroup></purchasingGroup>
<purchasingOrganization></purchasingOrganization>
<putawayStatus></putawayStatus>
<putawayStatusText></putawayStatusText>
<requestedDeliveryDate>
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptDate">
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptTime and string-length(ns0:ExpectedReceiptTime) > 0">
<xsl:value-of select="concat(ns0:ExpectedReceiptDate, 'T', ns0:ExpectedReceiptTime, 'UTC+00:00')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(ns0:ExpectedReceiptDate, 'T00:00:00UTC+00:00')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'0000-00-00T00:00:00UTC+00:00'"/>
</xsl:otherwise>
</xsl:choose>
</requestedDeliveryDate>
<salesOrganisation></salesOrganisation>
<shippingInstructionText></shippingInstructionText>
<shippingStrategy></shippingStrategy>
<sourcingDeliveryId>53270</sourcingDeliveryId>
<!--doubt sourceType?-->
<!-- destination type missed-->
<sourcingDeliveryType>SOURCING</sourcingDeliveryType>
<specialProcessIndicator></specialProcessIndicator>
<specialProcessIndicatorText></specialProcessIndicatorText>
<transportationPlanningDate></transportationPlanningDate>
<volume></volume>
<volumeUom></volumeUom>
<warehouseNumber></warehouseNumber>
<weightUom></weightUom>
<soldToParty>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</soldToParty>
<source>
<location>
<xsl:value-of select="ns0:BuyFromVendorNo"/>
</location>
<name1>
<xsl:value-of select="ns0:Buy-fromName"/>
</name1>
<name2/>
<houseNumber/>
<street1>
<xsl:value-of select="ns0:Buy-fromAddress"/>
</street1>
<street2>
<xsl:value-of select="ns0:Buy-fromAddress2"/>
</street2>
<postalCode>
<xsl:value-of select="ns0:Buy-fromPostCode"/>
</postalCode>
<poBox/>
<city>
<xsl:value-of select="ns0:Buy-fromCity"/>
</city>
<state> <xsl:value-of select="ns0:Buy-fromCounty"/> </state>
<country>
<xsl:value-of select="ns0:Buy-fromCountry_RegionCode"/>
</country>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDIBuyFromVendorNo"/>
</globalLocationNumber>
</source>
<billToParty>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</billToParty>
<carrier>
<location>
<xsl:value-of select="ns0:MainCarrierNo"/>
</location>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDIMainCarrierNo"/>
</globalLocationNumber>
</carrier>
<destination>
<location>
<xsl:value-of select="ns0:LocationCode"/>
</location>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDILocationCode"/>
</globalLocationNumber>
</destination>
<items>
<xsl:for-each select="PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry">
<xsl:variable name="itemPosition"
select="position()"/>
<item>
<baseUom></baseUom>
<batch><xsl:value-of select="ns0:LotNo"/></batch>
<bestBeforeDate>
<xsl:value-of select="concat(ns0:ExpirationDate, 'T00:00:00UTC+00:00')"/>
</bestBeforeDate>
<conversionFactorToBuom>
<xsl:if test="ns0:Quantity != 0 and ns0:QuantityBase != 0">
<xsl:value-of select="ns0:QuantityBase div ns0:Quantity"/>
</xsl:if>
</conversionFactorToBuom>
<customerMaterialReference></customerMaterialReference>
<customerPurchaseOrderDate></customerPurchaseOrderDate>
<customerPurchaseOrderNumber></customerPurchaseOrderNumber>
<eanOrUpcReference></eanOrUpcReference>
<endProductionDate>
<xsl:variable name="xyz1"
select="ns0:TNOPAL"/>
<xsl:for-each select="//PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry[ns0:TNOPAL=$xyz1]">
<xsl:sort select="ns0:ManufacturingDate"
data-type="text"
order="descending"/>
<xsl:if test="position() = 1">
<xsl:value-of select="concat(ns0:ManufacturingDate,'T00:00:00UTC+00:00')"/>
</xsl:if>
</xsl:for-each>
<!-- <xsl:value-of select="max(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/> -->
</endProductionDate>
<externalHU2></externalHU2>
<goodsReceiptQuantityInBuom></goodsReceiptQuantityInBuom>
<goodsReceiptQuantityInSuom></goodsReceiptQuantityInSuom>
<grossWeight></grossWeight>
<higherItemPosition></higherItemPosition>
<itemCategory></itemCategory>
<itemPosition>
<xsl:value-of select="$itemPosition"/>
</itemPosition>
<lotNumber></lotNumber>
<materialDescription>
<xsl:value-of select="../../ns0:Description"/>
</materialDescription>
<materialReference>
<xsl:value-of select="../../ns0:ItemNo"/>
</materialReference>
<materialType></materialType>
<packagingMaterial></packagingMaterial>
<parentSsccs>
<parentSscc>
<localPalletId></localPalletId>
<parentHUNumber></parentHUNumber>
<parentHuPickedQuantity></parentHuPickedQuantity>
</parentSscc>
</parentSsccs>
<plannedReceiptQuantityInBuom>
<xsl:value-of select="ns0:QuantityBase"/>
</plannedReceiptQuantityInBuom>
<plannedReceiptQuantityInSuom>
<xsl:value-of select="ns0:Quantity"/>
</plannedReceiptQuantityInSuom>
<plant>
<xsl:value-of select="../../../../ns0:LocationCode"/>
</plant>
<positiveRelease>
<xsl:value-of select="ns0:PHRStatus"/>
</positiveRelease>
<positiveReleaseDate>
<xsl:value-of select="concat(ns0:RDD, 'T00:00:00UTC+00:00')"/>
</positiveReleaseDate>
<preceedingDocumentCategory></preceedingDocumentCategory>
<preceedingDocumentNumber></preceedingDocumentNumber>
<preceedingDocumentPosition></preceedingDocumentPosition>
<preceedingDocumentType></preceedingDocumentType>
<preceedingDocumentTypeDesc></preceedingDocumentTypeDesc>
<productionDate>
<xsl:value-of select="concat(ns0:ManufacturingDate, 'T00:00:00UTC+00:00')"/>
</productionDate>
<qualityStatus></qualityStatus>
<shipToPurchaseOrderNumber></shipToPurchaseOrderNumber>
<ssccNumber>
<xsl:value-of select="ns0:TNOPAL"/>
</ssccNumber>
<startProductionDate>
<!-- <xsl:value-of select="min(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/>
<xsl:value-of select="min(ReservationEntry[TNOPAL = ../TNOPAL]/ManufacturingDate)"/>
<xsl:value-of select="PurchaseLine/ReservationEntries/ReservationEntry[min(ns0:ManufacturingDate)]/ns0:ManufacturingDate"/>>
<xsl:value-of select="max(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/>-->
<xsl:variable name="xyz"
select="ns0:TNOPAL"/>
<xsl:for-each select="//PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry[ns0:TNOPAL=$xyz]">
<xsl:sort select="ns0:ManufacturingDate"
data-type="text"
order="ascending"/>
<xsl:if test="position() = 1">
<xsl:value-of select="ns0:ManufacturingDate"/>
</xsl:if>
</xsl:for-each>
</startProductionDate>
<stockType></stockType>
<storageLocation></storageLocation>
<transportationGroup></transportationGroup>
<uomCode>
<xsl:value-of select="../../ns0:UnitOfMeasureCode"/>
</uomCode>
<vendorBatch></vendorBatch>
<volume></volume>
<volumeUom></volumeUom>
<weightUom></weightUom>
<wmsQualityStatus><xsl:value-of select="ns0:QualityStatus"/>
</wmsQualityStatus>
</item>
</xsl:for-each>
</items>
</sourcingDelivery>
</sourcingDeliveries>
</sourcingDelivery>
</xsl:for-each>
</sourcingDeliveries>
</xsl:template>
</xsl:stylesheet>
old code 2nd sep 24
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://schemas.royalcanin.com/BizTalk/2012/Pub/PurchaseOrder">
<xsl:output method="xml"
indent="yes"/>
<xsl:template match="/ns0:PurchaseHeaders/PurchaseHeader">
<sourcingDeliveries>
<sourcingDelivery>
<cargoVolume></cargoVolume>
<cargoVolumeUom></cargoVolumeUom>
<cargoWeight></cargoWeight>
<cargoWeightUom></cargoWeightUom>
<containerId></containerId>
<currentStatus></currentStatus>
<currentStatusDate></currentStatusDate>
<distance></distance>
<distanceUom></distanceUom>
<freightOrderDescription></freightOrderDescription>
<freightOrderID></freightOrderID>
<freightOrderType>
<xsl:choose>
<xsl:when test="ns0:PurchaseOrderType = 'PROCURE'">
<xsl:text>PROCURE</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>ICB</xsl:text>
</xsl:otherwise>
</xsl:choose>
</freightOrderType>
<meanOfTransport></meanOfTransport>
<sealNumber></sealNumber>
<shippingInstructions></shippingInstructions>
<shippingStrategy></shippingStrategy>
<sourcingDeliveryId>
<xsl:value-of select="ns0:DocumentNo"/>
</sourcingDeliveryId>
<standardCarrierAlphaCode></standardCarrierAlphaCode>
<totalTravellingTime></totalTravellingTime>
<unitTravellingTime></unitTravellingTime>
<carrier>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</carrier>
<stages>
<stage>
<arrivalDateTime></arrivalDateTime>
<carrierId></carrierId>
<departureDateTime></departureDateTime>
<distance></distance>
<distanceUom></distanceUom>
<number>1</number>
<standardCarrierAlphaCode></standardCarrierAlphaCode>
<totalTravellingTime></totalTravellingTime>
<unitTravellingTime></unitTravellingTime>
<destination>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</destination>
<source>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</source>
<stageDeliveries>
<stageDelivery>
<sequenceNumber>1</sequenceNumber>
<sourcingDeliveryId><xsl:value-of select="ns0:DocumentNo"/>
</sourcingDeliveryId>
</stageDelivery>
<sourcingDeliveries>
<sourcingDelivery>
<actualGoodsIssueDate></actualGoodsIssueDate>
<billOfLading></billOfLading>
<commentText></commentText>
<companyCode></companyCode>
<customerDeliveryAppointment></customerDeliveryAppointment>
<distributionChannel></distributionChannel>
<division></division>
<documentDate></documentDate>
<documentReference></documentReference>
<goodsReceiptStatus></goodsReceiptStatus>
<goodsReceiptStatusText></goodsReceiptStatusText>
<grossWeight></grossWeight>
<incotermPart1></incotermPart1>
<incotermPart2></incotermPart2>
<meanOfTransport></meanOfTransport>
<palletBase></palletBase>
<palletSpace></palletSpace>
<pickingInstructionText></pickingInstructionText>
<plannedDeliveryDate></plannedDeliveryDate>
<plannedGoodsIssueDate></plannedGoodsIssueDate>
<plannedLoadingDate></plannedLoadingDate>
<plannedMatAvailabilityDate></plannedMatAvailabilityDate>
<postingDate></postingDate>
<sourceType>Vendor</sourceType>
<destinationType>Plant</destinationType>
<priority></priority>
<purchasingGroup></purchasingGroup>
<purchasingOrganization></purchasingOrganization>
<putawaytStatus></putawaytStatus>
<putawaytStatusText></putawaytStatusText>
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptDate">
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptTime">
<xsl:value-of select="concat(ns0:ExpectedReceiptDate, 'T', ns0:ExpectedReceiptTime, 'UTC+00:00')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(ns0:ExpectedReceiptDate, 'T00:00:00UTC+00:00')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'0000-00-00T00:00:00UTC+00:00'"/>
</xsl:otherwise>
</xsl:choose>
<salesOrganisation></salesOrganisation>
<shippingInstructionText></shippingInstructionText>
<shippingStrategy></shippingStrategy>
<sourcingDeliveryId>
<xsl:value-of select="ns0:DocumentNo"/>
</sourcingDeliveryId>
<sourcingDeliveryType>SOURCING</sourcingDeliveryType>
<specialProcessIndicator></specialProcessIndicator>
<specialProcessIndicatorText></specialProcessIndicatorText>
<transportationPlanningDate></transportationPlanningDate>
<volume></volume>
<volumeUom></volumeUom>
<warehouseNumber></warehouseNumber>
<weightUom></weightUom>
<soldToParty>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</soldToParty>
<source>
<location>
<xsl:value-of select="ns0:BuyFromVendorNo"/>
</location>
<name1>
<xsl:value-of select="ns0:Buy-fromName"/>
</name1>
<name2/>
<houseNumber/>
<street1>
<xsl:value-of select="ns0:Buy-fromAddress"/>
</street1>
<street2>
<xsl:value-of select="ns0:Buy-fromAddress2"/>
</street2>
<postalCode>
<xsl:value-of select="ns0:Buy-fromPostCode"/>
</postalCode>
<poBox/>
<city>
<xsl:value-of select="ns0:Buy-fromCity"/>
</city>
<state> <xsl:value-of select="ns0:Buy-fromCounty"/> </state>
<country>
<xsl:value-of select="ns0:Buy-fromCountry_RegionCode"/>
</country>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDIBuyFromVendorNo"/>
</globalLocationNumber>
</source>
<billToParty>
<city></city>
<country></country>
<globalLocationNumber></globalLocationNumber>
<houseNumber></houseNumber>
<location></location>
<name1></name1>
<name2></name2>
<phone></phone>
<poBox></poBox>
<postalCode></postalCode>
<state></state>
<street1></street1>
<street2></street2>
</billToParty>
<carrier>
<location>
<xsl:value-of select="ns0:MainCarrierNo"/>
</location>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDIMainCarrierNo"/>
</globalLocationNumber>
</carrier>
<destination>
<location>
<xsl:value-of select="ns0:LocationCode"/>
</location>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDILocationCode"/>
</globalLocationNumber>
</destination>
<items>
<xsl:for-each select="PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry">
<xsl:variable name="itemPosition"
select="position()"/>
<item>
<ssccNumber>
<xsl:value-of select="ns0:TNOPAL"/>
</ssccNumber>
<packagingMaterial/>
<startProductionDate>
<!-- <xsl:value-of select="min(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/>
<xsl:value-of select="min(ReservationEntry[TNOPAL = ../TNOPAL]/ManufacturingDate)"/>
<xsl:value-of select="PurchaseLine/ReservationEntries/ReservationEntry[min(ns0:ManufacturingDate)]/ns0:ManufacturingDate"/>>
<xsl:value-of select="max(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/>-->
<xsl:variable name="xyz"
select="ns0:TNOPAL"/>
<xsl:for-each select="//PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry[ns0:TNOPAL=$xyz]">
<xsl:sort select="ns0:ManufacturingDate"
data-type="text"
order="ascending"/>
<xsl:if test="position() = 1">
<xsl:value-of select="ns0:ManufacturingDate"/>
</xsl:if>
</xsl:for-each>
</startProductionDate>
<endProductionDate>
<xsl:variable name="xyz1"
select="ns0:TNOPAL"/>
<xsl:for-each select="//PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry[ns0:TNOPAL=$xyz1]">
<xsl:sort select="ns0:ManufacturingDate"
data-type="text"
order="descending"/>
<xsl:if test="position() = 1">
<xsl:value-of select="ns0:ManufacturingDate"/>
</xsl:if>
</xsl:for-each>
<!-- <xsl:value-of select="max(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/> -->
</endProductionDate>
<externalHU2/>
<itemPosition>
<xsl:value-of select="$itemPosition"/>
</itemPosition>
<higherItemPosition/>
<materialReference>
<xsl:value-of select="../../ns0:ItemNo"/>
</materialReference>
<materialDescription>
<xsl:value-of select="../../ns0:Description"/>
</materialDescription>
<customerMaterialReference/>
<eanOrUpcReference/>
<itemCategory/>
<materialType/>
<batch>
<xsl:value-of select="ns0:LotNo"/>
</batch>
<lotNumber/>
<vendorBatch/>
<plannedReceiptQuantityInSuom>
<xsl:value-of select="ns0:Quantity"/>
</plannedReceiptQuantityInSuom>
<goodsReceiptQuantityInSuom/>
<uomCode>
<xsl:value-of select="../../ns0:UnitOfMeasureCode"/>
</uomCode>
<plannedReceiptQuantityInBuom>
<xsl:value-of select="ns0:QuantityBase"/>
</plannedReceiptQuantityInBuom>
<goodsReceiptQuantityInBuom/>
<baseUom/>
<conversionFactorToBuom>
<xsl:if test="ns0:Quantity != 0 and ns0:QuantityBase != 0">
<xsl:value-of select="ns0:QuantityBase div ns0:Quantity"/>
</xsl:if>
</conversionFactorToBuom>
<transportationGroup/>
<plant>
<xsl:value-of select="../../../../ns0:LocationCode"/>
</plant>
<storageLocation/>
<bestBeforeDate>
<xsl:value-of select="concat(ns0:ExpirationDate, 'T00:00:00UTC+00:00')"/>
</bestBeforeDate>
<productionDate>
<xsl:value-of select="concat(ns0:ManufacturingDate, 'T00:00:00UTC+00:00')"/>
</productionDate>
<wmsQualityStatus><xsl:value-of select="ns0:TNOPAL"/>
</wmsQualityStatus>
<qualityStatus/>
<positiveRelease>
<xsl:value-of select="ns0:PHRStatus"/>
</positiveRelease>
<positiveReleaseDate>
<xsl:value-of select="concat(ns0:RDD, 'T00:00:00UTC+00:00')"/>
</positiveReleaseDate>
<preceedingDocumentNumber/>
<preceedingDocumentPosition/>
<preceedingDocumentCategory/>
<preceedingDocumentType/>
<preceedingDocumentTypeDesc/>
<customerPurchaseOrderNumber/>
<customerPurchaseOrderDate/>
<shipToPurchaseOrderNumber/>
<grossWeight/>
<weightUom/>
<volume/>
<volumeUom/>
<stockType/>
<parentSsccs>
<parentSscc>
<localPalletId></localPalletId>
<parentHUNumber></parentHUNumber>
<parentHuPickedQuantity></parentHuPickedQuantity>
</parentSscc>
</parentSsccs>
<requestedDeliveryDate>
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptDate">
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptTime">
<xsl:value-of select="concat(ns0:ExpectedReceiptDate, 'T', ns0:ExpectedReceiptTime, 'UTC+00:00')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(ns0:ExpectedReceiptDate, 'T00:00:00UTC+00:00')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'0000-00-00T00:00:00UTC+00:00'"/>
</xsl:otherwise>
</xsl:choose>
</requestedDeliveryDate>
</item>
</xsl:for-each>
</items>
</sourcingDelivery>
</sourcingDeliveries>
</stageDeliveries>
</stage>
</stages>
</sourcingDelivery>
</sourcingDeliveries>
</xsl:template>
</xsl:stylesheet>
----------------------
<AssignMessage async="false" continueOnError="false" enabled="true" name="ExtractClientId">
<Set>
<Header name="ClientId">
<XPath expression="substring-before(context/Request/Headers/Authorization,':')"/>
</Header>
</Set> </AssignMessage>
<AssignMessage async="false" continueOnError="false" enabled="true" name="ExtractClientId">
<Set>
<Headers>
<Header name="ClientId">
<Pattern>{oauth_client_id}</Pattern>
</Header>
</Headers>
</Set>
</AssignMessage>
Date 12/08/2024
Topic Endpoint Name :
petc_cross_l2c_ord_sol_event_despatchStock_created_can_v1
Topic Endpoint Name :
petc_cross_l2c_ord_sol_event_despatchStock_created_can_v1
Topic :
petc/cross/l2c/ord/despatchstock/created/can/v1/trnl/wms<partnerid>/<region>/<LEcountry>
/<sourceType>/<destinationType>/<sourceCountry>/<destinationCountry>/<source>/<destination>
/undefined/undefined/undefined
Queue name :
petc_cross_l2c_ord_sol_q_despatchStock_navision_v1
sap-btp-eoc-poc-cu
bookWorm@08
-------
use excel, copy required col, in local excel , sheet, paste in vertex, saying , excel sheet input.
--------------------------
Logic mentioned in excel sheet as follows;
Source System 1NAV Transformation Mapping rules <Target System Name> Source Structure - Fields Name Navigation Field Description Field Length (Char) Mapping Field Name Navigation sourcingDeliveries sourcingDelivery sourcingDeliveries- >sourcingDelivery <DocumentNo> <PurchaseHeader> PO Number 20 passthrough sourcingDeliveryId sourcingDeliveries- >sourcingDelivery- >sourcingDeliveryId keep empty freightOrderID sourcingDeliveries- >sourcingDelivery- >freightOrderID keep empty freightOrderDescription sourcingDeliveries- >sourcingDelivery- >freightOrderDescription Default value 'PROCURE' freightOrderType sourcingDeliveries- >sourcingDelivery- >freightOrderType keep empty standardCarrierAlphaCode sourcingDeliveries- >sourcingDelivery- >standardCarrierAlphaCode keep empty carrier sourcingDeliveries- >carrier keep empty location sourcingDeliveries- >carrier->location keep empty name1 sourcingDeliveries- >carrier->name1 keep empty name2 sourcingDeliveries- >carrier->name2 keep empty houseNumber sourcingDeliveries- >carrier->houseNumber keep empty street1 sourcingDeliveries- >carrier->street1 keep empty street2 sourcingDeliveries- >carrier->street2 keep empty postalCode sourcingDeliveries- >carrier->postalCode keep empty poBox sourcingDeliveries- >carrier->poBox keep empty city sourcingDeliveries- >carrier->city keep empty state sourcingDeliveries- >carrier->state keep empty country sourcingDeliveries- >carrier->country keep empty phone sourcingDeliveries- >carrier->phone keep empty globalLocationNumber sourcingDeliveries- >carrier->globalLocationNumber keep empty currentStatus sourcingDeliveries- >sourcingDelivery- >currentStatus keep empty currentStatusDate sourcingDeliveries- >sourcingDelivery- >currentStatusDate keep empty distance sourcingDeliveries- >sourcingDelivery- >distance keep empty distanceUom sourcingDeliveries- >sourcingDelivery- >distanceUom keep empty totalTravellingTime sourcingDeliveries- >sourcingDelivery- >totalTravellingTime keep empty unitTravellingTime sourcingDeliveries- >sourcingDelivery- >unitTravellingTime keep empty containerId sourcingDeliveries- >sourcingDelivery- >containerId keep empty sealNumber sourcingDeliveries- >sourcingDelivery- >sealNumber keep empty meanOfTransport sourcingDeliveries- >sourcingDelivery- >meanOfTransport keep empty shippingStrategy sourcingDeliveries- >sourcingDelivery- >shippingStrategy keep empty cargoWeight sourcingDeliveries- >sourcingDelivery- >cargoWeight keep empty cargoWeightUom sourcingDeliveries- >sourcingDelivery- >cargoWeightUom keep empty cargoVolume sourcingDeliveries- >sourcingDelivery- >cargoVolume keep empty cargoVolumeUom sourcingDeliveries- >sourcingDelivery- >cargoVolumeUom keep empty shippingInstructions sourcingDeliveries- >sourcingDelivery- >shippingInstructions stages sourcingDeliveries- >sourcingDelivery- >stages create one record in the stage array stage sourcingDeliveries- >sourcingDelivery- >stages->stage default value "1" number sourcingDeliveries- >sourcingDelivery- >stages->stage->number keep empty standardCarrierAlphaCode sourcingDeliveries- >sourcingDelivery- >stages->stage->standardCarrierAlphaCode keep empty carrierId sourcingDeliveries- >sourcingDelivery- >stages->stage->carrierId keep empty source sourcingDeliveries- >sourcingDelivery- >stages->stage->source keep empty location sourcingDeliveries- >sourcingDelivery- >stages->stage->source->location keep empty name1 sourcingDeliveries- >sourcingDelivery- >stages->stage->source->name1 keep empty name2 sourcingDeliveries- >sourcingDelivery- >stages->stage->source->name2 keep empty houseNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->source->houseNumber keep empty street1 sourcingDeliveries- >sourcingDelivery- >stages->stage->source->street1 keep empty street2 sourcingDeliveries- >sourcingDelivery- >stages->stage->source->street2 keep empty postalCode sourcingDeliveries- >sourcingDelivery- >stages->stage->source->postalCode keep empty poBox sourcingDeliveries- >sourcingDelivery- >stages->stage->source->poBox keep empty city sourcingDeliveries- >sourcingDelivery- >stages->stage->source->city keep empty state sourcingDeliveries- >sourcingDelivery- >stages->stage->source->state keep empty country sourcingDeliveries- >sourcingDelivery- >stages->stage->source->country keep empty phone sourcingDeliveries- >sourcingDelivery- >stages->stage->source->phone keep empty globalLocationNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->source->globalLocationNumber keep empty destination sourcingDeliveries- >sourcingDelivery- >stages->stage->destination keep empty location sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->location keep empty name1 sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->name1 keep empty name2 sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->name2 keep empty houseNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->houseNumber keep empty street1 sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->street1 keep empty street2 sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->street2 keep empty postalCode sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->postalCode keep empty poBox sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->poBox keep empty city sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->city keep empty state sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->state keep empty country sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->country keep empty phone sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->phone keep empty globalLocationNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->destination->globalLocationNumber keep empty departureDateTime sourcingDeliveries- >sourcingDelivery- >stages->stage->departureDateTime keep empty arrivalDateTime sourcingDeliveries- >sourcingDelivery- >stages->stage->arrivalDateTime keep empty distance sourcingDeliveries- >sourcingDelivery- >stages->stage->distance keep empty distanceUom sourcingDeliveries- >sourcingDelivery- >stages->stage->distanceUom keep empty totalTravellingTime sourcingDeliveries- >sourcingDelivery- >stages->stage->totalTravellingTime keep empty unitTravellingTime sourcingDeliveries- >sourcingDelivery- >stages->stage->unitTravellingTime stageDeliveries sourcingDeliveries- >sourcingDelivery- >stages->stage->stageDeliveries create one record in the stageDelivery array stageDelivery sourcingDeliveries- >sourcingDelivery- >stages->stage->stageDelivery->stageDelivery default value "1" sequenceNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->stageDeliveries->stageDelivery->sequenceNumber <DocumentNo> <PurchaseHeader> PO Number 20 passthrough sourcingDeliveryId sourcingDeliveries- >sourcingDelivery- >stages->stage->stageDeliveries->stageDelivery->sourcingDeliveryId sourcingDeliveries sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries sourcingDelivery sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery <DocumentNo> <PurchaseHeader> PO Number 20 passthrough sourcingDeliveryId sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->sourcingDeliveryId Default value "Sourcing" sourcingDeliveryType sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->sourcingDeliveryType keep empty salesOrganisation sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->salesOrganisation keep empty distributionChannel sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->distributionChannel keep empty division sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->division keep empty warehouseNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->warehouseNumber keep empty purchasingOrganization sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->purchasingOrganization keep empty purchasingGroup sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->purchasingGroup keep empty companyCode sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->companyCode keep empty documentDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->documentDate keep empty plannedMatAvailabilityDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->plannedMatAvailabilityDate keep empty transportationPlanningDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->transportationPlanningDate keep empty plannedLoadingDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->plannedLoadingDate keep empty plannedGoodsIssueDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->plannedGoodsIssueDate keep empty plannedDeliveryDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->plannedDeliveryDate <ExpectedReceiptDate> <PurchaseHeader> Purchase Order Expected receipt date YYYY-MM-DD how to identify timezone?Concatenate with Time and Adapt to the expected format requestedDeliveryDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->requestedDeliveryDate <ExpectedReceiptTime> <PurchaseHeader> Purchase Order Expected receipt Time HH:MM:SS NH : Decision is to concatenate<ExpectedReceiptDate> with <ExpectedReceiptTime> with this logic if <ExpectedReceiptDate> is provided then IF <ExpectedReceiptTime> is provided then "YYYY-MM-DDThh:mm:ssUTC+00:00" Else "YYYY-MM-DDT00:00:00UTC+00:00" Else "0000-00-00T00:00:00UTC+00:00" keep empty postingDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->postingDate keep empty actualGoodsIssueDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->actualGoodsIssueDate keep empty customerDeliveryAppointment sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->customerDeliveryAppointment keep empty documentReference sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->documentReference keep empty billOfLading sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billOfLading keep empty meanOfTransport sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->meanOfTransport keep empty shippingStrategy sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->shippingStrategy Default value 'Vendor' sourceType sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->sourceType Default value 'Plant' destinationType sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destinationType keep empty priority sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->priority soldToParty sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty keep empty location sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->location keep empty name1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->name1 keep empty name2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->name2 keep empty houseNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->houseNumber keep empty street1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->street1 keep empty street2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->street2 keep empty postalCode sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->postalCode keep empty poBox sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->poBox keep empty city sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->city keep empty state sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->state <BuyFromVendorNo> <PurchaseHeader> Vendor Number from which the good is purchased 20 keep empty country sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->country <Buy-fromName> <PurchaseHeader> Vendor Name from which the good is purchased 50 keep empty phone sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->phone keep empty globalLocationNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->soldToParty->globalLocationNumber source sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source <Buy-fromAddress> <PurchaseHeader> Vendor Adress from which the good is purchased 50 passthrough location sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->location <Buy-fromAddress2> <PurchaseHeader> Vendor Adress2 from which the good is purchased 50 passthrough name1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->name1 <Buy-fromPostCode> <PurchaseHeader> Vendor Post Code from which the good is purchased 20 keep empty name2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->name2 keep empty houseNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->houseNumber <Buy-fromCity> <PurchaseHeader> Vendor City from which the good is purchased 30 passthrough street1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->street1 <Buy-fromCounty> <PurchaseHeader> Vendor County from which the good is purchased 10 passthrough street2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->street2 <Buy-fromCountry_RegionCode> <PurchaseHeader> Vendor Country/Region from which the good is purchased 10 passthrough postalCode sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->postalCode keep empty poBox sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->poBox <EDIBuyFromVendorNo> <PurchaseHeader> Vendor Country/Region from which the good is purchased 35 passthrough city sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->city passthrough state sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->state <LocationCode> <PurchaseHeader> Location code of the destination 10 passthrough country sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->country keep empty phone sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->phone passthrough globalLocationNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->source->globalLocationNumber destination sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination passthrough location sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->location keep empty name1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->name1 keep empty name2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->name2 keep empty houseNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->houseNumber keep empty street1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->street1 keep empty street2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->street2 keep empty postalCode sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->postalCode keep empty poBox sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->poBox <EDILocationCode> <PurchaseHeader> EDI Code of the destination Location 35 keep empty city sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->city keep empty state sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->state keep empty country sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->country keep empty phone sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->phone passthrough globalLocationNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->destination->globalLocationNumber billToParty sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty keep empty location sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->location keep empty name1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->name1 keep empty name2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->name2 keep empty houseNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->houseNumber keep empty street1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->street1 keep empty street2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->street2 keep empty postalCode sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->postalCode keep empty poBox sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->poBox keep empty city sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->city keep empty state sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->state <MainCarrierNo> <PurchaseHeader> Main carrier Code 20 keep empty country sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->country keep empty phone sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->phone keep empty globalLocationNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->billToParty->globalLocationNumber carrier sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier passthrough location sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->location keep empty name1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->name1 keep empty name2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->name2 keep empty houseNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->houseNumber keep empty street1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->street1 keep empty street2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->street2 keep empty postalCode sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->postalCode keep empty poBox sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->poBox <EDIMainCarrierNo> <PurchaseHeader> Main carrier EDI Code 35 keep empty city sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->city keep empty state sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->state keep empty country sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->country keep empty phone sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->phone passthrough globalLocationNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->carrier->globalLocationNumber keep empty incotermPart1 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->incotermPart1 keep empty incotermPart2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->incotermPart2 keep empty specialProcessIndicator sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->specialProcessIndicator keep empty specialProcessIndicatorText sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->specialProcessIndicatorText keep empty grossWeight sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->grossWeight keep empty weightUom sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->weightUom keep empty volume sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->volume keep empty volumeUom sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->volumeUom keep empty palletSpace sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->palletSpace keep empty palletBase sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->palletBase keep empty shippingInstructionText sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->shippingInstructionText keep empty pickingInstructionText sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->pickingInstructionText keep empty commentText sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->commentText keep empty goodsReceiptStatus sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->goodsReceiptStatus keep empty goodsReceiptStatusText sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->goodsReceiptStatusText <TNOPAL> <ReservationEntry> SSCC Number 18 keep empty putawaytStatus sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->putawaytStatus keep empty putawaytStatusText sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->putawaytStatusText <ManufacturingDate> <ReservationEntry> Manufacturing date YYYY-MM-DD items sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items <ManufacturingDate> <ReservationEntry> Manufacturing date YYYY-MM-DD Create one new item array per existing ReservationEntry section item sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item passthrough ssccNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->ssccNumber keep empty packagingMaterial sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->packagingMaterial Retreive earliest manufacturing date attached to the same TNOPAL in all ReservationEntries array startProductionDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->startProductionDate <ItemNo> <PurchaseLine> RC Material Number 20 Retreive latest manufacturing date attached to the same TNOPAL in all ReservationEntries array endProductionDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->endProductionDate <Description> <PurchaseLine> RC Material Description 50 keep empty externalHU2 sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->externalHU2 Create and increment item position for each reservation entry line containing above TNOPAL itemPosition sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->itemPosition keep empty higherItemPosition sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->higherItemPosition passthrough materialReference sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->materialReference passthrough materialDescription sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->materialDescription <LotNo> <ReservationEntry> Lot Number 20 keep empty customerMaterialReference sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->customerMaterialReference keep empty eanOrUpcReference sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->eanOrUpcReference keep empty itemCategory sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->itemCategory <Quantity> <ReservationEntry> Quantity in purchase Line UoM XXXXXX.XX keep empty materialType sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->materialType passthrough batch sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->batch <UnitofMeasureCode> <PurchaseLine> Unit of measure 10 keep empty lotNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->lotNumber <QuantityBase> <ReservationEntry> Quantity in base UoM XXXXXX.XX keep empty vendorBatch sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->vendorBatch passthrough plannedReceiptQuantityInSuom sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->plannedReceiptQuantityInSuom keep empty goodsReceiptQuantityInSuom sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->goodsReceiptQuantityInSuom access the reference table of the given transformation to find the API value uomCode sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->uomCode passthrough plannedReceiptQuantityInBuom sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->plannedReceiptQuantityInBuom <LocationCode> <PurchaseHeader> Location on which materials will be received on 10 keep empty goodsReceiptQuantityInBuom sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->goodsReceiptQuantityInBuom keep empty baseUom sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->baseUom <ExpirationDate> <ReservationEntry> Expiration date YYYY-MM-DD if both <ReservationEntry><Quantity> and <ReservationEntry><Quantity Base> fulfilled, <ReservationEntry><Quantity Base>divided by <ReservationEntry><Quantity>, else keep empty conversionFactorToBuom sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->conversionFactorToBuom <ManufacturingDate> <ReservationEntry> Manufacturing date YYYY-MM-DD keep empty transportationGroup sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->transportationGroup <TNOPAL> <ReservationEntry> Quality status 50 passthrough plant sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->plant keep empty storageLocation sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->storageLocation <PHRStatus> <ReservationEntry> PHR Status of the pallet 20 Adapt to the expected format bestBeforeDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->bestBeforeDate <RDD> <ReservationEntry> Release Due Date YYYY-MM-DD Adapt to the expected format (format) productionDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->productionDate passthrough wmsQualityStatus sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->wmsQualityStatus keep empty qualityStatus sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->qualityStatus passthrough positiveRelease sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->positiveRelease Adapt to the expected format positiveReleaseDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->positiveReleaseDate keep empty preceedingDocumentNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->preceedingDocumentNumber keep empty preceedingDocumentPosition sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->preceedingDocumentPosition keep empty preceedingDocumentCategory sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->preceedingDocumentCategory keep empty preceedingDocumentType sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->preceedingDocumentType keep empty preceedingDocumentTypeDesc sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->preceedingDocumentTypeDesc keep empty customerPurchaseOrderNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->customerPurchaseOrderNumber keep empty customerPurchaseOrderDate sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->customerPurchaseOrderDate keep empty shipToPurchaseOrderNumber sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->shipToPurchaseOrderNumber keep empty grossWeight sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->grossWeight keep empty weightUom sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->weightUom keep empty volume sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->volume keep empty volumeUom sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->volumeUom keep empty stockType sourcingDeliveries- >sourcingDelivery- >stages->stage->sourcingDeliveries->sourcingDelivery->items->item->stockType
----------------
<?xml version="1.0" encoding="utf-8"?>
<ns0:PurchaseHeaders xmlns:ns0="http://schemas.royalcanin.com/BizTalk/2012/Pub/PurchaseOrder">
<PurchaseHeader>
<ns0:BuyFromVendorNo>IC11027</ns0:BuyFromVendorNo>
<ns0:EDIBuyFromVendorNo>3011825500207</ns0:EDIBuyFromVendorNo>
<ns0:DocumentNo>BOND0108</ns0:DocumentNo>
<ns0:OrderDate>2018-11-22</ns0:OrderDate>
<ns0:ExpectedReceiptDate>2019-12-31</ns0:ExpectedReceiptDate>
<ns0:ExpectedReceiptTime/>
<ns0:Buy-fromName>Royal Canin S.A.S (Cambrai)</ns0:Buy-fromName>
<ns0:Buy-fromAddress>Rue Basse, France</ns0:Buy-fromAddress>
<ns0:Buy-fromAddress2>Les Rues les Vignes</ns0:Buy-fromAddress2>
<ns0:Buy-fromCity>International</ns0:Buy-fromCity>
<ns0:Buy-fromPostCode>999-999</ns0:Buy-fromPostCode>
<ns0:Buy-fromCountry_RegionCode>FR</ns0:Buy-fromCountry_RegionCode>
<ns0:CustomerNo/>
<ns0:EDILocationCode>3011825541019</ns0:EDILocationCode>
<ns0:LocationCode>RSE</ns0:LocationCode>
<ns0:MainCarrierNo>ABC</ns0:MainCarrierNo>
<ns0:EDICustomerNo/>
<ns0:CustomerNo/>
<ns0:DESADVRefNo/>
<PurchaseLines>
<PurchaseLine>
<ns0:LineNo>10000</ns0:LineNo>
<ns0:ItemNo>3006100001</ns0:ItemNo>
<ns0:Description>SHN MAXI PUPPY 10KG</ns0:Description>
<ns0:UnitOfMeasureCode>PALLET</ns0:UnitOfMeasureCode>
<ns0:Quantity>11.00</ns0:Quantity>
<ns0:QuantityBase>352.00</ns0:QuantityBase>
<ns0:EANCode>3182559318687</ns0:EANCode>
<ns0:VLCode>12</ns0:VLCode>
<ReservationEntries>
<ReservationEntry>
<ns0:QtyperUnitOfMeasure>32.00</ns0:QtyperUnitOfMeasure>
<ns0:Quantity>2.00</ns0:Quantity>
<ns0:QuantityBase>32.00</ns0:QuantityBase>
<ns0:ExpirationDate>2020-06-05</ns0:ExpirationDate>
<ns0:LotNo>18340028RCC</ns0:LotNo>
<ns0:QualityStatus>PHR</ns0:QualityStatus>
<ns0:PHRStatus>N</ns0:PHRStatus>
<ns0:RDD>2018-12-09</ns0:RDD>
<ns0:ManufacturingDate>2011-12-06</ns0:ManufacturingDate>
<ns0:TNOPAL>031825520050031823</ns0:TNOPAL>
</ReservationEntry>
<ReservationEntry>
<ns0:QtyperUnitOfMeasure>32.00</ns0:QtyperUnitOfMeasure>
<ns0:Quantity>1.00</ns0:Quantity>
<ns0:QuantityBase>32.00</ns0:QuantityBase>
<ns0:ExpirationDate>2020-06-05</ns0:ExpirationDate>
<ns0:LotNo>18340028RCC</ns0:LotNo>
<ns0:QualityStatus>PHR</ns0:QualityStatus>
<ns0:PHRStatus>N</ns0:PHRStatus>
<ns0:RDD>2000-12-09</ns0:RDD>
<ns0:ManufacturingDate>2018-12-06</ns0:ManufacturingDate>
<ns0:TNOPAL>031825520050031830</ns0:TNOPAL>
</ReservationEntry>
</ReservationEntries>
</PurchaseLine>
<PurchaseLine>
<ns0:LineNo>20000</ns0:LineNo>
<ns0:ItemNo>2524100002</ns0:ItemNo>
<ns0:Description>FCN LIGHT WEIGHT CARE 10KG</ns0:Description>
<ns0:UnitOfMeasureCode>PALLET</ns0:UnitOfMeasureCode>
<ns0:Quantity>12.00</ns0:Quantity>
<ns0:QuantityBase>384.00</ns0:QuantityBase>
<ns0:EANCode>3182559308961</ns0:EANCode>
<ns0:VLCode>12</ns0:VLCode>
<ReservationEntries>
<ReservationEntry>
<ns0:QtyperUnitOfMeasure>32.00</ns0:QtyperUnitOfMeasure>
<ns0:Quantity>1.00</ns0:Quantity>
<ns0:QuantityBase>32.00</ns0:QuantityBase>
<ns0:ExpirationDate>2020-06-02</ns0:ExpirationDate>
<ns0:LotNo>18337041RCC</ns0:LotNo>
<ns0:QualityStatus>PHR</ns0:QualityStatus>
<ns0:PHRStatus>N</ns0:PHRStatus>
<ns0:RDD>2018-12-06</ns0:RDD>
<ns0:ManufacturingDate>2018-12-03</ns0:ManufacturingDate>
<ns0:TNOPAL>031825520049973837</ns0:TNOPAL>
</ReservationEntry>
<ReservationEntry>
<ns0:QtyperUnitOfMeasure>32.00</ns0:QtyperUnitOfMeasure>
<ns0:Quantity>1.00</ns0:Quantity>
<ns0:QuantityBase>32.00</ns0:QuantityBase>
<ns0:ExpirationDate>2020-06-02</ns0:ExpirationDate>
<ns0:LotNo>18337041RCC</ns0:LotNo>
<ns0:QualityStatus>PHR</ns0:QualityStatus>
<ns0:PHRStatus>N</ns0:PHRStatus>
<ns0:RDD>2018-12-06</ns0:RDD>
<ns0:ManufacturingDate>2018-12-03</ns0:ManufacturingDate>
<ns0:TNOPAL>031825520049973844</ns0:TNOPAL>
</ReservationEntry>
</ReservationEntries>
</PurchaseLine>
</PurchaseLines>
</PurchaseHeader>
</ns0:PurchaseHeaders>
------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://schemas.royalcanin.com/BizTalk/2012/Pub/PurchaseOrder">
<xsl:output method="xml"
indent="yes"/>
<xsl:template match="/">
<sourcingDeliveries>
<xsl:for-each select="ns0:PurchaseHeaders/PurchaseHeader">
<sourcingDelivery>
<sourcingDeliveryId>
<xsl:value-of select="ns0:DocumentNo"/>
</sourcingDeliveryId>
<freightOrderID/>
<freightOrderDescription/>
<freightOrderType>PROCURE</freightOrderType>
<standardCarrierAlphaCode/>
<carrier>
<location/>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber/>
</carrier>
<currentStatus/>
<currentStatusDate/>
<distance/>
<distanceUom/>
<totalTravellingTime/>
<unitTravellingTime/>
<containerId/>
<sealNumber/>
<meanOfTransport/>
<shippingStrategy/>
<cargoWeight/>
<cargoWeightUom/>
<cargoVolume/>
<cargoVolumeUom/>
<shippingInstructions/>
<stages>
<stage>
<number>1</number>
<standardCarrierAlphaCode/>
<carrierId/>
<source>
<location/>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber/>
</source>
<destination>
<location/>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber/>
</destination>
<departureDateTime/>
<arrivalDateTime/>
<distance/>
<distanceUom/>
<totalTravellingTime/>
<unitTravellingTime/>
<stageDeliveries>
<stageDelivery>
<sequenceNumber>1</sequenceNumber>
<sourcingDeliveryId><xsl:value-of select="ns0:DocumentNo"/>
</sourcingDeliveryId>
<sourcingDeliveries>
<sourcingDelivery>
<sourcingDeliveryId>
<xsl:value-of select="ns0:DocumentNo"/>
</sourcingDeliveryId>
<sourcingDeliveryType>Sourcing</sourcingDeliveryType>
<salesOrganisation/>
<distributionChannel/>
<division/>
<warehouseNumber/>
<purchasingOrganization/>
<purchasingGroup/>
<companyCode/>
<documentDate/>
<plannedMatAvailabilityDate/>
<transportationPlanningDate/>
<plannedLoadingDate/>
<plannedGoodsIssueDate/>
<plannedDeliveryDate/>
<requestedDeliveryDate>
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptDate">
<xsl:choose>
<xsl:when test="ns0:ExpectedReceiptTime">
<xsl:value-of select="concat(ns0:ExpectedReceiptDate, 'T', ns0:ExpectedReceiptTime, 'UTC+00:00')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(ns0:ExpectedReceiptDate, 'T00:00:00UTC+00:00')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'0000-00-00T00:00:00UTC+00:00'"/>
</xsl:otherwise>
</xsl:choose>
</requestedDeliveryDate>
<postingDate/>
<actualGoodsIssueDate/>
<customerDeliveryAppointment/>
<documentReference/>
<billOfLading/>
<meanOfTransport/>
<shippingStrategy/>
<sourceType>Vendor</sourceType>
<destinationType>Plant</destinationType>
<priority/>
<soldToParty>
<location/>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber/>
</soldToParty>
<source>
<location>
<xsl:value-of select="ns0:BuyFromVendorNo"/>
</location>
<name1>
<xsl:value-of select="ns0:Buy-fromName"/>
</name1>
<name2/>
<houseNumber/>
<street1>
<xsl:value-of select="ns0:Buy-fromAddress"/>
</street1>
<street2>
<xsl:value-of select="ns0:Buy-fromAddress2"/>
</street2>
<postalCode>
<xsl:value-of select="ns0:Buy-fromPostCode"/>
</postalCode>
<poBox/>
<city>
<xsl:value-of select="ns0:Buy-fromCity"/>
</city>
<state> <xsl:value-of select="ns0:Buy-fromCounty"/> </state>
<country>
<xsl:value-of select="ns0:Buy-fromCountry_RegionCode"/>
</country>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDIBuyFromVendorNo"/>
</globalLocationNumber>
</source>
<destination>
<location>
<xsl:value-of select="ns0:LocationCode"/>
</location>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDILocationCode"/>
</globalLocationNumber>
</destination>
<billToParty>
<location/>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber/>
</billToParty>
<carrier>
<location>
<xsl:value-of select="ns0:MainCarrierNo"/>
</location>
<name1/>
<name2/>
<houseNumber/>
<street1/>
<street2/>
<postalCode/>
<poBox/>
<city/>
<state/>
<country/>
<phone/>
<globalLocationNumber>
<xsl:value-of select="ns0:EDIMainCarrierNo"/>
</globalLocationNumber>
</carrier>
<incotermPart1/>
<incotermPart2/>
<specialProcessIndicator/>
<specialProcessIndicatorText/>
<grossWeight/>
<weightUom/>
<volume/>
<volumeUom/>
<palletSpace/>
<palletBase/>
<shippingInstructionText/>
<pickingInstructionText/>
<commentText/>
<goodsReceiptStatus/>
<goodsReceiptStatusText/>
<putawaytStatus/>
<putawaytStatusText/>
<items>
<xsl:for-each select="PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry">
<xsl:variable name="itemPosition"
select="position()"/>
<item>
<ssccNumber>
<xsl:value-of select="ns0:TNOPAL"/>
</ssccNumber>
<packagingMaterial/>
<startProductionDate>
<!-- <xsl:value-of select="min(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/>
<xsl:value-of select="min(ReservationEntry[TNOPAL = ../TNOPAL]/ManufacturingDate)"/>
<xsl:value-of select="PurchaseLine/ReservationEntries/ReservationEntry[min(ns0:ManufacturingDate)]/ns0:ManufacturingDate"/>>
<xsl:value-of select="max(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/>-->
<xsl:variable name="xyz"
select="ns0:TNOPAL"/>
<xsl:for-each select="//PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry[ns0:TNOPAL=$xyz]">
<xsl:sort select="ns0:ManufacturingDate"
data-type="text"
order="ascending"/>
<xsl:if test="position() = 1">
<xsl:value-of select="ns0:ManufacturingDate"/>
</xsl:if>
</xsl:for-each>
</startProductionDate>
<endProductionDate>
<xsl:variable name="xyz1"
select="ns0:TNOPAL"/>
<xsl:for-each select="//PurchaseLines/PurchaseLine/ReservationEntries/ReservationEntry[ns0:TNOPAL=$xyz1]">
<xsl:sort select="ns0:ManufacturingDate"
data-type="text"
order="descending"/>
<xsl:if test="position() = 1">
<xsl:value-of select="ns0:ManufacturingDate"/>
</xsl:if>
</xsl:for-each>
<!-- <xsl:value-of select="max(//ns0:ReservationEntry[ns0:TNOPAL = current()/ns0:TNOPAL]/ns0:ManufacturingDate)"/> -->
</endProductionDate>
<externalHU2/>
<itemPosition>
<xsl:value-of select="$itemPosition"/>
</itemPosition>
<higherItemPosition/>
<materialReference>
<xsl:value-of select="../../ns0:ItemNo"/>
</materialReference>
<materialDescription>
<xsl:value-of select="../../ns0:Description"/>
</materialDescription>
<customerMaterialReference/>
<eanOrUpcReference/>
<itemCategory/>
<materialType/>
<batch>
<xsl:value-of select="ns0:LotNo"/>
</batch>
<lotNumber/>
<vendorBatch/>
<plannedReceiptQuantityInSuom>
<xsl:value-of select="ns0:Quantity"/>
</plannedReceiptQuantityInSuom>
<goodsReceiptQuantityInSuom/>
<uomCode>
<xsl:value-of select="../../ns0:UnitOfMeasureCode"/>
</uomCode>
<plannedReceiptQuantityInBuom>
<xsl:value-of select="ns0:QuantityBase"/>
</plannedReceiptQuantityInBuom>
<goodsReceiptQuantityInBuom/>
<baseUom/>
<conversionFactorToBuom>
<xsl:if test="ns0:Quantity != 0 and ns0:QuantityBase != 0">
<xsl:value-of select="ns0:QuantityBase div ns0:Quantity"/>
</xsl:if>
</conversionFactorToBuom>
<transportationGroup/>
<plant>
<xsl:value-of select="../../../../ns0:LocationCode"/>
</plant>
<storageLocation/>
<bestBeforeDate>
<xsl:value-of select="concat(ns0:ExpirationDate, 'T00:00:00UTC+00:00')"/>
</bestBeforeDate>
<productionDate>
<xsl:value-of select="concat(ns0:ManufacturingDate, 'T00:00:00UTC+00:00')"/>
</productionDate>
<wmsQualityStatus><xsl:value-of select="ns0:TNOPAL"/>
</wmsQualityStatus>
<qualityStatus/>
<positiveRelease>
<xsl:value-of select="ns0:PHRStatus"/>
</positiveRelease>
<positiveReleaseDate>
<xsl:value-of select="concat(ns0:RDD, 'T00:00:00UTC+00:00')"/>
</positiveReleaseDate>
<preceedingDocumentNumber/>
<preceedingDocumentPosition/>
<preceedingDocumentCategory/>
<preceedingDocumentType/>
<preceedingDocumentTypeDesc/>
<customerPurchaseOrderNumber/>
<customerPurchaseOrderDate/>
<shipToPurchaseOrderNumber/>
<grossWeight/>
<weightUom/>
<volume/>
<volumeUom/>
<stockType/>
</item>
</xsl:for-each>
</items>
</sourcingDelivery>
</sourcingDeliveries>
</stageDelivery>
</stageDeliveries>
</stage>
</stages>
</sourcingDelivery>
</xsl:for-each>
</sourcingDeliveries>
</xsl:template>
</xsl:stylesheet>
--------------------
input sample payload and xslt logic give above. validate xslt logic against , excel sheet requirement, if any missed. display.
response.