on 12-07-2009 4:14 PM
Dear experts,
I have a rpoblem mapping my data.
my input-xml looks like this:
. orderheader
...orderdetail (1..n)
.....delivery header (1..n)
.......delivery detail (1..n)
.........invoice header (always max 1 per delivery detail)
...........invoice detail (always max 1 per invoiceheader)
.......delivery detail
etc
I have a flat file as output which looks like this
. RECORD
...ORDERNR
...ORDERPOSITION
...DELIVERYNUMBER
...DELIVERYPOSITION
...INVOICENUMBER
...INVOICEPOSITION
If there are 2 invoicelines in the input xml, the outputfile should contain 2 records with all same data except invoiceposition. For each delivery-detail line a line in the outputfile must be created. So I mapped "deliverydetail" to RECORD. No problems here.
Further I mapped invoicenumber (within the invoice header tag) to INVOICENUMBER.
But when for instance deliverydetail 1 and 2 don't have an invoice, and deliverydetail 3 does, I see this invoicenumber not in record 3 but in record 1. Record 2 and 3 contain no invoicenumber.
What am I doing wrong here?
Thanks in advance,
William
Hi William,
One header has multiple items, so here you have to use the oneAsMany node function.
first input for oneasmany node function is Invoice number and 2nd and 3rd input is InvoiceDetail node.
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the context on the InvoiceNumber field, keep it at the level of the node not at higher level.
regards
Mustafa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.