cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion Problem

siddhesh_pathak4
Contributor
0 Kudos

Hello all,

My file straycture is like

H123                                     abcd
I0001    1234         1234                pqrst   qwert      090
I0002    1234         1234                pqrst   qwert      090
H345                                        abcd
I0001    1234         1234                pqrst   qwert      090
I0002    1234         1234                pqrst   qwert      090

While reading the file i check that , for Header (H) line it is not picking the abcd field. I dont understand what is the problem . please help me.

FCC parameters,

FileInput.fieldFixedLengths 1,18,18,18,18,10,40,4,4,2,40

FileInput.endSeparator 'nl'

ignoreRecordsetName true

FileInput.fieldNames ID,code,code1,code2,code3,code4,code5,code6,code7,code8,code9

FileInput.lastFieldsOptional Yes

Edited by: Siddhesh Pathak on Apr 24, 2009 4:48 PM

Edited by: Siddhesh Pathak on Apr 24, 2009 4:48 PM

Edited by: Siddhesh Pathak on Apr 24, 2009 4:49 PM

Edited by: Siddhesh Pathak on Apr 24, 2009 4:49 PM

Edited by: Siddhesh Pathak on Apr 24, 2009 4:49 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

VijayKonam
Active Contributor
0 Kudos

May be you should remove this..!!

FileInput.lastFieldsOptional Yes

VJ

siddhesh_pathak4
Contributor
0 Kudos

Hey,

Thanks for the response but when i remove this it is giving me error

"ERROR converting document line no. 1 according to structure 'FileInput':java.lang.Exception: Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this"

VijayKonam
Active Contributor
0 Kudos

In that case you need to define two record strucutures. One for header and one for line. Mentione recordstrucuture as header,1,line*. Now mention for header only two field lengths and names.

VJ

siddhesh_pathak4
Contributor
0 Kudos

Thanks for quick response.

I have a single structure like

-->fileInput

identifier

code1

code2

code3

code4

code5

code6

Header and item contains all the fields (Same fields). I have multiple headers in one file. right now i cannot change the structure. Is there any other solution??

VijayKonam
Active Contributor
0 Kudos

You have to change them. You need to create them based on the xml coming from AE. Not the other way round.

VJ

siddhesh_pathak4
Contributor
0 Kudos

I am having the sender file to idoc. My idoc structure is same what i have mentioned in the previous bock.

siddhesh_pathak4
Contributor
0 Kudos

Hello

Issue is solved. Just use FileInput.keepIncompleteFields YES.

Thanks.

VijayKonam
Active Contributor
0 Kudos

Great. Close the thread.

VJ