cancel
Showing results for 
Search instead for 
Did you mean: 

to CSV conversion problem

nikhil_bose
Active Contributor
0 Kudos

hi all,

could you fix this problem in the File Adapter :-

Initialization error: Conversion initialization failed with java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:

Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing

while trying to write XML to a CSV file.

i've configured the FCC as:


Structure = structs ( with 6 columns)
struct.fieldFixedLengths 20,10,10,10,10,10
struct.fieldSeparator ,
struct.endSeparator 'nl'

thanks in advance

nikhil

null

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI

do the following

struct.fieldSeparator ,

struct.endSeparator 'nl'

Thanks

sudhir sharma

Answers (5)

Answers (5)

Former Member
0 Kudos

hi nikhil,

Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing

give only one parameter

*.fieldFixedLengths' or *.fieldSeparator'

one is sufficient thts why this eror is comin

hope this will help.

regards

HONEY

nikhil_bose
Active Contributor
0 Kudos

hi Gyanani,

i tried both way but it is showing the same error in the File Adapter. in the FCC parameters, i have put


structs.addHeader 0
structs.fieldSeparator ,
structs.processFieldNames fromConfiguration

what else i have to mention, or anything i added incorrectly ?

prabhu_s2
Active Contributor
0 Kudos

could u post the input payload

nikhil_bose
Active Contributor
0 Kudos

hi prabhu,


<?xml version="1.0" encoding="UTF-8"?>
<ns:EmpHR xmlns:ns="http://www.dff03">
<structs>
<Name>Roger F                       </Name>
<ID>02        </ID>
<DOB>09/14/1984          </DOB>
<Level>NEW  </Level>
<Salary>50000</Salary>
<CreationDate>2007/11/14</CreationDate>
</structs>
</ns:EmpHR> 

this is the payload. i want the FCC parameters. i have tried


structs.addHeader 0
structs.fieldSeparator ,

Message was edited by:

Nikhil Bos

Former Member
0 Kudos

Nikhil,

The Content Conversion Parameters are they all you have ..or you have not written them here?

I mean you have *.fieldNames parameter ..right!!!

prabhu_s2
Active Contributor
0 Kudos

just try this DT:

<?xml version="1.0" encoding="UTF-8"?>

<ns:EmpHR xmlns:ns="http://www.dff03">

<root>

<structs>

<Name>Roger F </Name>

<ID>02 </ID>

<DOB>09/14/1984 </DOB>

<Level>NEW </Level>

<Salary>50000</Salary>

<CreationDate>2007/11/14</CreationDate>

</structs>

</root>

</ns:EmpHR>

<u>CCP</u>

recordset name : root

recordset strucutre: structs,*

<b>structs</b>.fieldFixedLengths : 20,10,10,10,10,10

<b>structs</b>.fieldNames : name,id,dob,level,salary,creationdate

<b>structs</b>.processFieldnames : fromConfiguration

Message was edited by:

Prabhu S

prabhu_s2
Active Contributor
0 Kudos

also u can check this link:

http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Parameters for Recordset Structures

&#9679;      NameA.fieldFixedLengths

If you make an entry here, the system expects a character string that contains the lengths of the structure columns as arguments separated by commas. 

If you also specify a separator for the columns, you must not add its length to the length of the columns

This entry is mandatory if you have not made an entry for NameA.fieldSeparator. 

nikhil_bose
Active Contributor
0 Kudos

hi,

i got the problem solved when i specified the FCC parameters in the order


*.fieldNames Name,id,dob,level,salary,creationdate
*.fieldSeparator ,

and one more adapter error, that is with the fieldFixedLengths (that should be greater than or equal to the incoming string.

thanks prabhu, manjusha and all others.

cheers

Former Member
0 Kudos

I think the problem is a spelling error: you named your structure "structs" and then you refer to it as "struct".

You have to choose one between the two (or a better one if you can find it).

About File content conversion I suggest you to see the following links:

Content Conversion (Pattern/Random content in input file)

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

File Content Conversion for Unequal Number of Columns

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

How to send a flat file with fixed lengths to XI 3.0 using a Central File Adapter

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

Content Conversion ( The Key Field Problem )

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

Solution to the problem encountered using Variable Substitution with XI-SP12

/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12

I hope this will be helpfull.

Regards,

Salvatore

Former Member
0 Kudos

Nikhil,

As far as I know If you want a CSV File,U need to have just the fieldSeparator parameter and not the fieldFixedLength.

Just try deleting fieldFixedLength parameter.

If it still doesn't work just check out if you have left some space after typing the parameter fieldSeparator.In the change mode you should have the cursor just after 'Separator'.

Your structure name is not matching with the others.U have'struct<b>s</b>' written.

Regards,

Manju.

Message was edited by:

Manjusha Nair

nikhil_bose
Active Contributor
0 Kudos

hi manjusha,

i tried with fieldFixedLength and fieldSeparator, and after that only used both one together. And what error i am getting is :


Initialization error: Conversion initialization failed with java.lang.Exception:
java.lang.Exception: Error(s) in XML conversion parameters found: 
Parameter '*.fieldFixedLengths' or '*.fieldSeparator' is missing 

Does the structure name make any sense on this ?

thanks for reply

Former Member
0 Kudos

hi nikhil,

cud u plz post vat params u have defined for document name and recordset structure.

make sure they are correct.

regards,

latika.

prabhu_s2
Active Contributor
0 Kudos

posting ur payload would help us to validate ur FCC for troubleshooting.

Former Member
0 Kudos

Nikhil,

I am pretty sure that both the parameters are not required for a CSV file.

So just keep the parameter field.Separator.

If you could paste the xml payload....

Former Member
0 Kudos

hi nikhil,

this shud wrk:

structs.addHeaderLine -- 0 (make sure it is HeaderLine and not Header as mentioned above in ur post)

structs.fieldSeparator -- '

structs.endSeparator -- 'nl'

also make sure u have written 'structs' in recordset structure

a tip: pay special attention to all cases and spellings.

[reward if helpful]

regards,

latika.

Former Member
0 Kudos

hi,

just check out your document name once again..

regards

madhu

udo_martens
Active Contributor
0 Kudos

Hi Nikhil,

did you define "struct"?

Regards,

Udo

Former Member
0 Kudos

struct or structs?