on 02-20-2009 7:41 PM
Hello!
I receive a file that has the following format:
HEADER (occurrence = 1)
INVOICES (occurrence = n)
HEAD (occurrence = 1)
DETAIL (occurrence = n)
TRAILER (occurrence = 1)
The file looks something like this:
1Field1Field2...Fieldn
2Field1Field2...Fieldn
3Field1Field2...Fieldn
3Field1Field2...Fieldn
:
:
3Field1Field2...Fieldn
2Field1Field2...Fieldn
3Field1Field2...Fieldn
3Field1Field2...Fieldn
:
:
3Field1Field2...Fieldn
4Field1
Where 1 is the keyfieldvalue for Header, 2 for the Invoice Header, 3 for the Invoice Detail and 4 for the Trailer.
Is it possible to manage this kind of file using the File Content Conversion. I'm haven't been able to get it to work. I don't wan't to split the file into separate msgs so I'm not using the option Recordsets per message.
I'll greatly appreciate any help, suggestions.
Kind Regards,
Carlos López
use this:
1Field1Field2...Fieldn
2Field1Field2...Fieldn
3Field1Field2...Fieldn
3Field1Field2...Fieldn
FCC:-
1(Header),1,2,(),3,(),Trailer,*,
chirag
PS: * is not displayed correctly
Edited by: Chirag Gohil on Feb 22, 2009 4:39 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all for you time and help!! I was able to solve the problem by following chirag's suggestion.
I defined my message to have this format:
<MESSAGE>
<RECORD> (1...unbounded)
<HEADER> (0...1)
<INVOICE_HEADER> (1)
<INVOICE_DETAIL> (1...unbounded)
<TRAILER> (0...1)
</RECORD>
</MESSAGE>
And the Recordset Structure:
HEADER,1,INVOICE_HEAD,1,INVOICE_DETAIL,*,TRAILER,*
so that the trailer is optional (thank's Koen)
Thanks again!!
Kind Regards,
Carlos López Hernández
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter:
Just tried, but still getting the same error.
Kind Regards,
Carlos López Hernández
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all for your replies.
Ramkiran, I tried your suggestion but I still get an error:
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR consistency check in recordset structure validation (line no. 5: missing structure(s) before type 'INVOICE_HEADER'
It seems as if it was expecting a file with the following structure:
HEADER
INVOICE_HEADER1
INVOICE_HEADER2
:
INVOICE_HEADERn
INVOICE_DETAIL1
INVOICE_DETAIL2
INVOICE_DETAILn
TRAILER
Instead of:
HEADER
INVOICE_HEADER1
INVOICE_DETAIL1_1
INVOICE_DETAIL1_2
INVOICE_HEADER2
INVOICE_DETAIL2_1
INVOICE_DETAIL2_2
:
INVOICE_DETAIL2_n
:
INVOICE_HEADERn
INVOICE_DETAILn_1
INVOICE_DETAILn_2
:
INVOICE_DETAILn_n
TRAILER
This is how my input file looks like: (line 5 is in BOLD):
A9166407 <---HEADER
11231200 <----INVOICE_HEADER1
20014014 <----INVOICE_DETAIL1_1
200231 <----INVOICE_DETAIL1_2
11231200 <----INVOICE_HEADER2
20014014 <----INVOICE_DETAIL2_1
20025077 <----INVOICE_DETAIL2_2
20014014 <----INVOICE_DETAIL2_3
20025077 <----INVOICE_DETAIL2_4
99999999 <----TRAILER
It's complaining about line 5 which is the Second Invoice Header.
I defined the Recordset Structure like this:
HEADER,1,INVOICE_HEADER,*,INVOICE_DETAIL,*,TRAILER,1
Kind Regards,
Carlos López Hernández
Edited by: Carlos Lopez Hernandez on Feb 23, 2009 2:26 PM
Edited by: Carlos Lopez Hernandez on Feb 23, 2009 2:32 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carlos,
You can create your structure specified below
HEADER ......(1...1)
Invoice_Header(0....*)
Invoice_Detail(0......*)
TRAILER ......(1.....1)
and spceify your parameters as
HEADER.fieldNames,
HEADER.keyFIeldValue,
HEADER.fieldFixedLengths
Invoice_Header.fieldNames,
Invoice_Header.keyFieldValue,
Invoice_Header.fieldFixedLengths,
Invoice_Detail.fieldNames,
Invoice_Detail.keyFieldValue,
Invoice_Detail.fieldFixedLengths,
TRAILER.fieldNames,
TRAILER.keyFIeldValue,
TRAILER.fieldFixedLengths
This will work.
Thanks,
Ramkiran.K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.