RE: Flat file map with detail and header
- From: Martin Bring (Sogeti Sverige AB) <MartinBringSogetiSverigeAB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 16 Dec 2008 23:56:00 -0800
Funny, that there is always system doing things "backwards"...
I have never come across this scenario, but I think I would have written a
receive pipeline that reorganized the document structure (to a header first
structure).
Kind Regards
Martin Bring
"Kvitepus" wrote:
I want to map a flat file to a structured xml file..
My problem is that the flat file contains detailrecords and then a
headerrecord
connected to the detailrecords. Like this:
<InvoiceDetail No="1">123</InvoiceDetail>
<InvoiceDetail No="1">345</InvoiceDetail>
<InvoiceDetail No="1">456</InvoiceDetail>
<InvoiceHeader No="1">999</InvoiceHeader>
<InvoiceDetail No="2">222</InvoiceDetail>
<InvoiceDetail No="2">33</InvoiceDetail>
<InvoiceDetail No="2">44</InvoiceDetail>
<InvoiceHeader No="2">88</InvoiceHeader>
The "No"-field connects details and header records.
The structured destination file have the header area first
and then details area. Like this:
<Invoice>
<InvoiceHeader No="1">999</InvoiceHeader>
<Details>
<InvoiceDetail No="1">123</InvoiceDetail>
<InvoiceDetail No="1">345</InvoiceDetail>
<InvoiceDetail No="1">456</InvoiceDetail>
</Details>
</Invoice>
<Invoice>
<InvoiceHeader No="2">222</InvoiceHeader>
<Details>
<InvoiceDetail No="2">23</InvoiceDetail>
<InvoiceDetail No="2">44</InvoiceDetail>
<InvoiceDetail No="2">88</InvoiceDetail>
</Details>
</Invoice>
How can i make this structure in the map ?
Now I get as many InvoiceHeaders as there are InvoiceLines.
Thanks in advance.
Kvitepus
- References:
- Flat file map with detail and header
- From: Kvitepus
- Flat file map with detail and header
- Prev by Date: Re: Receive location consuming web service to receive messages
- Next by Date: Re: Type is not declared
- Previous by thread: Flat file map with detail and header
- Next by thread: Type is not declared
- Index(es):
Relevant Pages
|