cancel
Showing results for 
Search instead for 
Did you mean: 

File content conversion sender adapter

Former Member
0 Kudos

Hi Friends,

I am doing File to IDoc scenario.

I am using File Content Conversion for File Adapter.

My structure look like this

MT_File
HEADER1 1..1
 --header1
-- header2
HEADER2 1..1
  --header3
DETAILS 1..unbounded
 --details1
 --details2
 --details3
TRAILER1 1..1
  -- trailer1
   
TRAILER2 1..1
  -- trailer2
 ----trailer3
 

In File Content conversion parameeters..

Document Name :MT_File

Document Namespace :urn:test:FileFcctoIdoc

RecordSet name :

RecordsetStructure :HEADER1,1,HEADER2,1,DETAILS,*,TRAILER1,1,TRAILER2,1

RecordSet Structure: Ascending

RecordSet Per message : *

Key Field Name :header1,header3,details1,trailer1,trailer3

ignoreRecordsetName : true

HEADER1.fieldNames :header1,header2

HEADER1.keyFieldValue : H1

HEADER1.fieldFixedLengths :5,10

HEADER1.endSeparator :'nl'

HEADER2.fieldNames :header3

HEADER2.keyFieldValue : *D

HEADER2.fieldFixedLengths :5

HEADER2.endSeparator :'nl'

DETAILS.fieldNames :details1,details2,details3

DETAILS.keyFieldValue : 3

DETAILS.fieldFixedLengths :5,5,5

DETAILS.endSeparator :'nl'

TRAILER1.fieldNames :trailer1

TRAILER1.keyFieldValue : *S

TRAILER1.fieldFixedLengths :5

TRAILER1.endSeparator :'nl'

TRAILER2.fieldNames :trailer2,trailer3

TRAILER2.keyFieldValue :SE TRAILER2.fieldFixedLengths :5,5

TRAILER2.endSeparator :'nl'

File is :

H1hh1hhhhhhhhh2
*Ddd*
Xddd1dddd2dddd3
Xddd4dddd5dddd6
Xddd7dddd8dddd9
*Sss*
SEKss2

in RWB, Channel CC_FILE_Sender_FccDemo: Empty document found. Proceed without sending message

I think the problem is in FCC paramters..

Could please have a look and correct me

Regards

Ram

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Sarvesh,

Thanks for your reply..

infact i have gone thru the blog..but not able to correct the error..

regards

Ram

Former Member
0 Kudos

Ram,

The problem which i can see is your key field values in your test file. Remember you should have the key field value in each new line at the same place.

For example you have given your text file as shown below...

File Given By You is :

>H1hh1hhhhhhhhh2

>*Ddd *

>Xddd1dddd2dddd3

>Xddd4dddd5dddd6

>Xddd7dddd8dddd9

>*Sss *

>SEKss2

Compair the above file with the below one..

>H1hh1hhhhhhhhh2

>*Ddd *

>Xddd1dddd2dddd3

>Xddd4dddd5dddd3

>Xddd7dddd8dddd3

> *Sss *

>SEKss2

If you notice, for details I have given key field value 3 in each line & at same place.

One more thing just use the KeyFieldName only one ( just follow the same blog which I have given, to understand how to use the KeyFieldName )

e.g.

Document Name :MT_File

Document Namespace :urn:test:FileFcctoIdoc

RecordSet name :

RecordsetStructure :HEADER1,1,HEADER2,1,DETAILS,*,TRAILER1,1,TRAILER2,1

RecordSet Structure: Ascending

RecordSet Per message : *

Key Field Name : KF

Regards,

Sarvesh

Former Member
0 Kudos

Hi Ram,

from your test file it seems that there is no key fields present therefore you can not use the KeyField.

You can try with this blogs and think it will help you.

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

Pick all the data and then in mapping you can map whatever is required.

You can also try with this..

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

Regards,

Sarvesh

Former Member
0 Kudos

Hi Ram,

I think if you follow this blog properly then you can achiev your goal.

Content Conversion ( The Key Field Problem )

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

Regards,

Sarvesh

Former Member
0 Kudos

Sorry Gabriel

.I given correctly in FCC. as TRAILER2 .while typing here..i made mistake..

regards

Ram

Former Member
0 Kudos

Thanks Gabriel for your responses,..

I followed your suggestions..

Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR consistency check in recordset structure validation (line no. 7: missing structure(s) before type 'TRAILOR2'

could you please put light on it

regards

Ram

GabrielSagaya
Active Contributor
0 Kudos

This is not TRAILOR2

TRAILER2.fieldNames=

please note that all FCC parameters are case sensitive.

so please take care

GabrielSagaya
Active Contributor
0 Kudos

In your FCC, Give Only one Keyfield value

Document Name :MT_File

Document Namespace :urn:test:FileFcctoIdoc

RecordsetStructure :HEADER1,1,HEADER2,1,DETAILS,*,TRAILER1,1,TRAILER2,1

RecordSet Structure: Ascending

RecordSet Per message : *

Key Field Name :KF

Key Field Type:String

ignoreRecordsetName : true

HEADER1.fieldNames :KF,header1,header2

HEADER1.keyFieldValue : H1

HEADER1.fieldFixedLengths :2,3,10

HEADER1.keyFieldInStructure :ignore

HEADER1.endSeparator :'nl'

HEADER2.fieldNames :KF,header3

HEADER2.keyFieldValue : *D

HEADER2.keyFieldInStructure :ignore

HEADER2.fieldFixedLengths :2,3

HEADER2.endSeparator :'nl'

DETAILS.fieldNames :KF,details1,details2,details3

DETAILS.keyFieldValue : 3

DETAILS.keyFieldInStructure :ignore

DETAILS.fieldFixedLengths :1,4,5,5

DETAILS.endSeparator :'nl'

TRAILER1.fieldNames :KF,trailer1

TRAILER1.keyFieldValue : *S

TRAILER1.fieldFixedLengths :2,3

TRAILER1.keyFieldInStructure :ignore

TRAILER1.endSeparator :'nl'

TRAILER2.fieldNames :KF,trailer2,trailer3

TRAILER2.keyFieldValue :SE

TRAILER2.fieldFixedLengths :2,3,5

TRAILER1.keyFieldInStructure :ignore

TRAILER2.endSeparator :'nl'