Skip to Content
avatar image
Former Member

Content Conversion Problem

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Apr 08, 2011 at 09:12 AM

    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,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 08, 2011 at 09:32 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Apr 09, 2011 at 12:17 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded