cancel
Showing results for 
Search instead for 
Did you mean: 

Content Conversion Problem

Former Member
0 Kudos

Hi Experts,

I have a problem in File Content Conversion(CSV).

Input file structure is:

H,0,9900&CRTLF;0,2695,15,20&CRTLF;1,29,1&CRTLF;

H,0,9911&CRTLF;0,25,17,28&CRTLF;1,49,65&CRTLF;

I have created Message Type like below....

Root

-RecType_H

--RecType

--Version

--Store

-RecType_0

--RecType

--Transno

--Tillno

--Gross

-RecType_1

--RecType

--Transno

--Net

The file should split like below...

Root

-RecType_H

--H

--0

--9900

-RecType_0

--0

--2695

--15

--20

-RecType_1

--1

--29

--1

I have mentioned RecType is key filed and key values are H,0,1.

Now I have used &CRTLF; as endseparator but Content Conversion throwing an error stating that....

Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'Root':java.lang.Exception: ERROR in configuration / structure 'Root.': More elements in file csv structure than field names specified!

Please suggest....

Regards,

Ramesh.

Accepted Solutions (0)

Answers (3)

Answers (3)

naveen_chichili
Active Contributor
0 Kudos

Hi Ramesh,

 Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'Root':java.lang.Exception: ERROR in configuration / structure 'Root.': More elements in file csv structure than field names specified!

In log it clearly says that there are more elements in CSV structure then field names specified.Could you please crosscheck the field names in the content conversion and the input structure.

this solves the issue.

Cheers!!!!

Naveen.

Former Member
0 Kudos

Hi Ramesh,

Are you using fixed length conversion or delimiter based conversion?

This problem with is your FCC definition itself, where when you declare the record structure of the different records: the number of fields you specify in the sequence is not matching the number of values available in the actual file recrod (one row). It has to do with the endseparator.

Use the FCC parameter:

RecType_H.endSeparator=&CRTLF;

Hope this will work. If still not, additionally try the combinations of the following parameters in conjuction with the above:

FieldName.missingLastfields

FieldName.additionalLastFields

Let us know the resutls.

Regards,

Suddhasatta

Former Member
0 Kudos

Hi Suddhasatta,

Thanks for your reply. I have tried with combination of endseparator and additional last fields = ignore but it is taking only first segment values (i.e RecType_H values). It is missing the other values....

Please suggest...

Regards,

Ramesh.

Former Member
0 Kudos

Hi Ramesh,

That's a good sign that it's working for the first segment. Please use the similar parameters with similar values for the other segments.

RecType_1.endSeparator= <string value>

RecType_2.endSeparator= <String Value>

Hope this will yeild the desired result for you.

Regards,

Suddhasatta

Former Member
0 Kudos

Hi Ramesh,

Check the link : you would be able to identify the issue. http://www.saptechnical .com/Tutorials/XI/Contentconversion/page1.htm

I think the structure does not have Record node in the data type. Check it.

Thanks,