on 06-14-2007 7:25 AM
Hi SDN,
I have a flat file and I need to convert it into XML using FCC. The record set structure will be 1 header, multiple line items followed by 1 trailer record. The problem I am facing here is the header and trailer will have a field uniquely to identify them. But the item will not have any keyfield to uniquely identify it.
What are the possible soln to approach this scenario.
Your thoughts are highly appreciated.
Eg. of a sample input file
*HDR*E43S20070427162139000159CORDEV26
TESTING 3989971 20070422WW GRAINGER INC 143372 185057 +000001234.56USD00120070428STANDARD
TESTING 3989971 20070422WW GRAINGER INC 143372 185057 +000000061.73USD00220070428STANDARD
*TRL*E43S200704270000022
Here *HDR* is the header, *TRL* is the trailer and the rest are item records.
Thank You.
Regards,
Jai Shankar
Don't think so.
Write a script that inserts some key field for the Items before the file adapter polls it, or,
Read the entire file , line by line into a XML using simple Content Conversion and use a Module to create the needful XML structure.
regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bhavesh,
>>>Read the entire file , line by line into a XML using simple Content Conversion and use a Module to create the needful XML structure.
How can I do this? My input file is fixed length and header, trailer records have a different length compared to Item records.
Kindly advise.
Regards,
Jai Shankar
Hi,
Go trugh these blogs
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
Regards
Hemant
Award points if find helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi;
As you are having multiple lineitems therfore you will surely require a key associated with it.
It is not possible to process a data with FCC having multiple records without a key .
Mudit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jai,
Is there any way to apply our logic like this:
If a record that does not start with the key fields either HDR or TRL then treat it as item record.
This is just a vague idea I got after reading ur post. Wanted to share with you.
Regards,
Ravi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.