Store the header info in global variables - every time the ship to location changes, create a new header using the global variables, you would have to do that same for the LIN item also as you can't write that out until you have created the header with the ship to information, assuming the ship to is in the header and not in the item loop in the xml. Same principal we used to create a new file for each item in a document so any one item failure would not cause a completed doc failure load in our ERP.
Dave Records Records Consulting, LLC Email: [email protected] On Nov 8, 2012, at 10:14 AM, Vijay Chandra wrote: Hi All, I have a mapping requirement on EDIFACT to XML. For every EDIFACT Order, we have different ship-to locations(LOC) for each line item as shown below. Client's requirement is to split my EDIFACT order based on these ship-to locations and generate output XML orders for each ship-to location. I am using Gentran Server for Windows5.2. For example: Input EDIFACT Order is BGM+220::9+4700325331+9' LIN+3++EAN Number:EN' LOC+7+8903206002811::9' QTY+11:72' LOC+7+8903206002835::9' QTY+11:72' Resultant Output files should be: file1.xml <Root> <location>8903206002811</location> </Root> file2.xml <Root> <location>8903206002835</location> </Root> Can anyone please help me out on this? [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] ------------------------------------ ... Please use the following Message Identifiers as your subject prefix: <SALES>, <JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC> Job postings are welcome, but for job postings or requests for work: <JOBS> IS REQUIRED in the subject line as a prefix.Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/EDI-L/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/EDI-L/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
