cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion Error

Former Member
0 Kudos

Hi,

We have to develop a file to Idoc interface in our project. This interface should pick a semicolon separated file from the ftp server and post and idoc to the ECC system.

This file will have two nodes- Header and Records. Header will come only once and Records will repeat.

Please find the structure of the file below:

Header -- 1..1

Name1

Name2

Name3

Records---1..unbounded

Adress1

Adress2

Adress3

We have used File content conversion in sender communication channel. The parameters maintained in channel are :

Header. fieldnames : Name1, Name2,Name3

Header.fieldSeparator : ;

Header.endSeparator : nl

Records. fieldnames : Adress1,Adress2,Adress3

Records.fieldSeparator : ;

Records.endSeparator : nl

This interface is failing in file channel with the following error " Fehler bei der Konvertierungsinitialisierung: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Mandatory parameter 'xml.keyfieldName': no value found "

Can anyone please help us with this. Is the key field parameter mandatory. Since we donu2019t have any key field in the input file, is there any way to avoid it while defining FCC parameters.

Regards

Jagruthi

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Because you have two or more stuctures need to be converted (Header and Records), then you need to specify keyfield value, without it,how PI know to conver to Header structure or Records stucture.

In your header line, add "H" in frond of it

Records line, add "R" in frond of each line

You can achieve this by using a Java Mapping program

Regards

Liang

Former Member
0 Kudos

Hi,

Recordset Name = your sender message type.

RecorSet structure = Records,*

Recordsets Per message = *

ignoreRecordsetName=true

Just add this parameter also . It should work fine.

Thanks,

Sonalisa

Former Member
0 Kudos

hi,

there is typo in the parameters you have mentioned in your file channel.

you gave"Header. fieldnames : Name1, Name2,Name3" but should be Header. fieldNames : Name1, Name2,Name3.

fieldNames with N caps.

all File channel FCCs parameters are case sensitive while defining them.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi, take a look to this blog: How to process flat files with multiple documents like POs, SOs etc. in a File to IDoc scenario

/people/peter.jarunek2/blog/2008/02/25/how-to-process-flat-files-with-multiple-documents-like-pos-sos-etc-in-a-file-to-idoc-scenario

that is similar to your scenario. here explain why you have to define the parameter keyFieldValue.

Thanks

Former Member
0 Kudos

Hi Jagruthi Rao,

If you specified a variable number of substructures for Recordset Structure, in other words, at least one substructure has the value u2018*u2019, then the substructures must be identified by the parser from their content. This means that a key field must be set with different constants for the substructures. You must specify a key field and the field name must occur in all substructures.

As the structure is Header 1.1 and Records 1.unbounded, The recordset structure should be "Header,1,Records,* ". It is mandatory to have a keyfield for this sort of structures.

The only option you would have is to write a module, create keyfield for the file in the adapter and then using messagetransformbean create out the XML structure.

Also, check the below link:

/people/gabrielsagayaselvam.panneerselvam/blog/2009/08/31/solve-key-field-problem-using-structplain2xml-in-messagetransformationbean

Thanks,

Former Member
0 Kudos

Hi Hareen,

Can you please let me know if there is any such standard module available.

Regards

Jagruthi

Former Member
0 Kudos

Hi,

if we have a variable record set structure, like in your case HEADER, 1, RECORDS, * then this key field is mandatory i think. please check point 9 below

http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/6713ec3f914ddee10000000a1553f7/content.htm

regards,

francis