By default, a new transport order will be created for each new EDI order during an order import. However, with order imports it is also possible to send updates on previously sent shipments.
To ensure that the original shipment is updated, set the Update Shipments field to Yes on the appropriate EDI provider. As long as a shipment has the same EDI reference and client, the original shipment will be overwritten with the data from the most recent update, provided that Update Shipments is set to Yes.
The update method determines which fields may be updated. With the Standard update method, the shipment will be completely updated. The update will overwrite all fields from the original shipment.
This is often not desirable. To prevent certain important data within an accepted order from being updated, it is therefore possible to apply a custom update method. This can be your own query, but this requires the necessary knowledge of the Transpas data model. Preferably use the Update XML below. This makes setting and then adjusting the fields that need to be updated simple and clear.
If not all fields should be updated, it is preferable to use the Update XML below with the accompanying procedure. An example of a complete update XML is shown below.
Only fields with the update="true" property will be updated. It is therefore also possible to omit certain elements.
Before a field is updated, the parent element must also be set to update="true".
For example; to update the pickupaddress reference, both the pickupaddress and the underlying reference field must be set to update="true".
DECLARE @updateInstructionXml xml
SET @updateInstructionXml = '
<shipment>
<edireference update="true"/>
<reference update="true"/>
<ediproviderstatus update="true"/>
<editimestamp update="true"/>
<edichecksum update="true"/>
<ediprovideruser update="true"/>
<contactperson update="true"/>
<shipmentkind update="true"/>
<plangroup update="false"/>
<plangrouptype update="false"/>
<allinprice update="false"/>
<fixedprice update="false"/>
<unitprice update="false"/>
<fuelsurchargepercentage update="false"/>
<fuelsurchargekmsprice update="false"/>
<fuelsurchargeunitprice update="false"/>
<fuelsurchargefixedprice update="false"/>
<mautsurchargepercentage update="false"/>
<mautsurchargekmsprice update="false"/>
<mautsurchargeunitamount update="false"/>
<mautsurchargeunit update="false"/>
<mautsurchargeunitprice update="false"/>
<mautsurchargefixedprice update="false"/>
<mautsurchargedistance update="false"/>
<distance update="false"/>
<tolldistance update="false"/>
<debtor update="true"/>
<transportkind update="false"/>
<planningnote update="false"/>
<invoicemethod update="false"/>
<invoicecode update="false"/>
<noinvoice update="false"/>
<blockplanning update="false"/>
<returnshipment update="false"/>
<sender update="true">
<address update="true"/>
<contact update="true"/>
<email update="true"/>
<phone update="true"/>
<mobile update="true"/>
<fax update="true"/>
<language update="true"/>
</sender>
<receiver update="true">
<address update="true"/>
<contact update="true"/>
<email update="true"/>
<phone update="true"/>
<mobile update="true"/>
<fax update="true"/>
<language update="true"/>
</receiver>
<pickupaddress update="true">
<reference update="true"/>
<date update="true"/>
<time update="true"/>
<datetill update="true"/>
<timetill update="true"/>
<fixeddate update="true"/>
<address update="true"/>
<dock update="true"/>
<contact update="true"/>
<language update="true"/>
<email update="true"/>
<phone update="true"/>
<mobile update="true"/>
<fax update="true"/>
<driverinfo update="true"/>
<remarks update="true"/>
<neutraladdress update="true"/>
<preferreddate update="true"/>
<preferredtime update="true"/>
<preferreddatetill update="true"/>
<preferredtimetill update="true"/>
<duration update="false"/>
<capabilities insert="true" update="true" delete="false">
<item>
<capability update="true"/>
<capabilitylink update="true"/>
<strict update="true"/>
</item>
</capabilities>
</pickupaddress>
<deliveryaddress update="true">
<reference update="true"/>
<date update="true"/>
<time update="true"/>
<datetill update="true"/>
<timetill update="true"/>
<fixeddate update="true"/>
<address update="true"/>
<dock update="true"/>
<contact update="true"/>
<language update="true"/>
<email update="true"/>
<phone update="true"/>
<mobile update="true"/>
<fax update="true"/>
<driverinfo update="true"/>
<remarks update="true"/>
<neutraladdress update="true"/>
<preferreddate update="true"/>
<preferredtime update="true"/>
<preferreddatetill update="true"/>
<preferredtimetill update="true"/>
<duration update="false"/>
<capabilities insert="true" update="true" delete="false">
<item>
<capability update="true"/>
<capabilitylink update="true"/>
<strict update="true"/>
</item>
</capabilities>
</deliveryaddress>
<cod update="true">
<amount update="true"/>
<currency update="true"/>
<paymentmethod update="true"/>
</cod>
<extracosts insert="true" update="true" delete="false">
<extracostsline>
<extracostskind update="true"/>
<description update="true"/>
<unitamount update="true"/>
<unit update="true"/>
<unitprice update="true"/>
<amount update="true"/>
<unitkind update="true"/>
<debtor update="true"/>
<vat update="true"/>
</extracostsline>
</extracosts>
<references insert="true" update="true" delete="false">
<reference>
<referencekind update="true"/>
<description update="true"/>
</reference>
</references>
<parties insert="true" update="true" delete="true">
<party>
<no update="true"/>
<address update="true"/>
<contact update="true"/>
<phone update="true"/>
<mobile update="true"/>
<fax update="true"/>
<email update="true"/>
<language update="true"/>
</party>
</parties>
<cargo update="true">
<unitamount update="true"/>
<unit update="true"/>
<article update="true"/>
<articlenumber update="true"/>
<product update="true"/>
<productdescription update="true"/>
<adrclass update="true"/>
<hazardousmaterial update="true"/>
<weight update="true"/>
<loadingmeter update="true"/>
<volume update="true"/>
<palletplaces update="true"/>
<containers update="true"/>
<shelves update="false"/>
<extentions update="false"/>
<colli update="true"/>
<qty1 update="false"/>
<qty2 update="false"/>
<qty3 update="false"/>
<qty4 update="false"/>
<length update="true"/>
<width update="true"/>
<height update="true"/>
<mintemperature update="true"/>
<maxtemperature update="true"/>
<temperaturesetpoint update="true"/>
<cargovalue update="false"/>
<numberofstickers update="false"/>
<bool1 update="false"/>
<bool2 update="false"/>
<bool3 update="false"/>
<bool4 update="false"/>
<bool5 update="false"/>
<bool6 update="false"/>
<bool7 update="false"/>
<bool8 update="false"/>
<lookup1 update="false"/>
<lookup2 update="false"/>
<money1 update="false"/>
<money2 update="false"/>
<money3 update="false"/>
<money4 update="false"/>
<tariffunit update="false"/>
<documentnumbers update="false"/>
<externalcustomerid update="false"/>
<externalshipmentid update="false"/>
<barcode update="true"/>
<cmrnumber update="true"/>
<incoterm update="false"/>
<gmpclass update="false"/>
<followup update="false"/>
<capabilities insert="true" update="true" delete="false">
<item>
<capability update="true"/>
<capabilitylink update="true"/>
<strict update="true"/>
</item>
</capabilities>
<dangerousgoods insert="true" update="true" delete="true">
<item>
<edireference update="true"/>
<number update="true"/>
<description update="true"/>
<adrclass update="true"/>
<class update="true"/>
<classificationcode update="true"/>
<packagegroup update="true"/>
<symbols update="true"/>
<labelcodes update="true"/>
<specialprovisions update="true"/>
<transportcategory update="true"/>
<tunnelcode update="true"/>
<unitamount update="true"/>
<unitdescription update="true"/>
<weight update="true"/>
<volume update="true"/>
<limitedquantity update="true"/>
<chemicalname update="true"/>
<environmentalhazard update="true"/>
<waste update="true"/>
<hazardousmaterial update="true"/>
</item>
</dangerousgoods>
<goodslines insert="true" update="true" delete="true">
<goodsline>
<edireference update="true"/>
<ediproviderstatus update="false"/>
<unitamount update="true"/>
<unit update="true"/>
<article update="true"/>
<product update="true"/>
<productdescription update="true"/>
<adrclass update="true"/>
<adrremarks update="true"/>
<hazardousmaterial update="true"/>
<articlenumber update="true"/>
<articlegroup update="true"/>
<weight update="true"/>
<loadingmeter update="true"/>
<volume update="true"/>
<palletplaces update="true"/>
<containers update="true"/>
<colli update="true"/>
<qty1 update="false"/>
<qty2 update="false"/>
<qty3 update="false"/>
<qty4 update="false"/>
<length update="true"/>
<width update="true"/>
<height update="true"/>
<mintemperature update="true"/>
<maxtemperature update="true"/>
<temperaturesetpoint update="true"/>
<reference update="true"/>
<reference2 update="true"/>
<externalcustomerid update="true"/>
<externalshipmentid update="true"/>
<ean update="true"/>
<barcode update="true"/>
<remarks update="true"/>
<gmpclass update="false"/>
<references insert="true" update="true" delete="false">
<reference>
<referencekind update="true"/>
<description update="true"/>
</reference>
</references>
<dangerousgoods insert="true" update="true" delete="true">
<item>
<edireference update="true"/>
<number update="true"/>
<description update="true"/>
<adrclass update="true"/>
<class update="true"/>
<classificationcode update="true"/>
<packagegroup update="true"/>
<symbols update="true"/>
<labelcodes update="true"/>
<specialprovisions update="true"/>
<transportcategory update="true"/>
<tunnelcode update="true"/>
<unitamount update="true"/>
<unitdescription update="true"/>
<weight update="true"/>
<volume update="true"/>
<limitedquantity update="true"/>
<chemicalname update="true"/>
<environmentalhazard update="true"/>
<waste update="true"/>
<hazardousmaterial update="true"/>
</item>
</dangerousgoods>
<goodsitems insert="true" update="true" delete="true">
<goodsitem>
<edireference update="true"/>
<unitamount update="true"/>
<unit update="true"/>
<description update="true"/>
<articlenumber update="true"/>
<article update="true"/>
<weight update="true"/>
<volume update="true"/>
<length update="true"/>
<width update="true"/>
<height update="true"/>
<adrclass update="true"/>
<adrremarks update="true"/>
<hazardousmaterial update="true"/>
<ean update="true"/>
<barcode update="true"/>
<remarks update="true"/>
<lot update="true"/>
<type update="true"/>
<type2 update="true"/>
<type3 update="true"/>
<palletid update="true"/>
<expiredate update="true"/>
<productiondate update="true"/>
<dangerousgoods insert="true" update="true" delete="true">
<item>
<edireference update="true"/>
<number update="true"/>
<description update="true"/>
<adrclass update="true"/>
<class update="true"/>
<classificationcode update="true"/>
<packagegroup update="true"/>
<symbols update="true"/>
<labelcodes update="true"/>
<specialprovisions update="true"/>
<transportcategory update="true"/>
<tunnelcode update="true"/>
<unitamount update="true"/>
<unitdescription update="true"/>
<weight update="true"/>
<volume update="true"/>
<limitedquantity update="true"/>
<chemicalname update="true"/>
<environmentalhazard update="true"/>
<waste update="true"/>
<hazardousmaterial update="true"/>
</item>
</dangerousgoods>
</goodsitem>
</goodsitems>
</goodsline>
</goodslines>
</cargo>
<customstransits>
<customstransit>
<customsprocedure update="false"/>
<customsstatus update="false"/>
<mrn update="false"/>
<declarationdate update="false"/>
<expirydate update="false"/>
<exportcountry update="false"/>
<destinationcountry update="false"/>
<customsbroker update="false"/>
</customstransit>
</customstransits>
</shipment>
'
EXEC dbo.sp_SO_UpdateLegFromTemplate
@TemplateLegNr = @TemplateLeg,
@LegNr = @Leg,
@UpdateInstructionXml = @UpdateInstructionXml