I have been asked to create an XLM file in a specific format for Purchase orders to be sent to suppliers.
I have read about EDI XLM XSLT and have a general idea of how it all fits together so now need to knuckle down and make it happen
I will need some new fields in my P Order which is the easy bit -and I know I can change the field names etc in an XSLT and make it in the format that is required - (I aim to try and work it out myself as think it will serve me well for other uses)
What I am struggling with (probably blindingly obvious) is this.
I will be exporting from the P Order Line items and Purchase Oder tables but I only want the P Order header details once and the P Order lines will be the Product Lines in the suppliers XML file.
Do I have to create a variable and set each Purchase Order Item and then add the lines by looping or can the XSLT strip out the superfluous data?
Would SQL an alternative to this by using DISTINCT for the what are effectively header details IE Purchase Order and then the detail for the Lines.
Any help much appreciated. Thank you.
My end result needs to be something like this
<?xml version="1.0" encoding="utf-8"?>
<name>Ealing Camera Studio</name>
<addressline1>243 The Broadway</addressline1>
<contactphone> 020 8745 2514</contactphone>
<instructions>Please ask Anne to sign</instructions>
<description>Black Toner </description>