Will the trading partner send the same ship-to on multiple
items but the items are not together in the edifact.  If so do the items for 
the same ship-to  need to be combined into
the same XML header?
If this is the case then you will have to build a temp
looping structure on the input side of the map.  On each item check if the 
ship-to has been written previously.  If so then add a new detail under that
header.  
If the ship-to to has not been found then create a new
header and detail under the new header.
Temp header occurs xxxx times
       Temp Detail
(under header) occurs xxxx times
Stanley Pool
Spool Consulting L.L.C.
 

________________________________
 From: Dave Records <[email protected]>
To: Vijay Chandra <[email protected]> 
Cc: "[email protected]" <[email protected]> 
Sent: Thursday, November 8, 2012 9:35 AM
Subject: Re: [EDI-L] Split EDIFACT Orders based on Line Item details
  
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



[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/

Reply via email to