cancel
Showing results for 
Search instead for 
Did you mean: 

FCC - No key field available

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

bhavesh_kantilal
Active Contributor
0 Kudos

Jai,

Create DT as,

<Root>
<Record>1.unbounded
<Line> 1..1
</Line>
</Record>
</Root>

Now Content Conversion parameters.

Recordset Structure : record,*

record.fieldNames : Line

record.fieldSeparator: 'nl'

record.endSeparatot: 'nl'.

Regards

Bhavesh

Former Member
0 Kudos

Bhavesh,

Interesting option. Will try this and let you know.

Regards,

Jai Shankar

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.