Skip to Content
author's profile photo Former Member
Former Member

file content conversion

hi ,

in an o/b scenario the o/p is of type xml with the following structure

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

- http://www.xxx.com">

- <Record>

<BranchCode>001</BranchCode>

<ItemCode>45</ItemCode>

<TransactionDate>002</TransactionDate>

<Quantity>3</Quantity>

<UnitRate>1</UnitRate>

<Amount>2121</Amount>

</Record>

</ns0:Output_MT>

i need this to be in a CSV format ... so the following values are given

Record set structure Record

Record.fieldFixedLengths 10

Record.fieldSeparator ,

the transaction is shown as successful in moni but file is not getting formed

the following error log is found in the receiver adapter monitoring

"Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value '45')', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value '45')', probably configuration error in file adapter (XML parser error)'"

can you please identify the problem & is this following value to be given for this case ? Record.endSeparator 'nl'

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on Aug 12, 2008 at 08:19 AM

    HI,

    According your source structure you have more then one fields but target ur mentioned only one variable, i think it is problem.

    follow below conversion

    Source Strucutre:

    <BranchCode>001</BranchCode>

    <ItemCode>45</ItemCode>

    <TransactionDate>002</TransactionDate>

    <Quantity>3</Quantity>

    <UnitRate>1</UnitRate>

    <Amount>2121</Amount>

    Target FCC Conversion

    RECORD.fieldFixedLengths 3,2,3,1,1,4

    RECORD.fieldNames branchcode,itemcode,transactiondate,quality,unitrate,amount

    RECORD.endSeparator 'nl'

    ignoreRecordsetName 'true'

    Above one will work

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 08:25 AM

    Field Seperator is not required . as yours is Fixed Field Lengh.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 08:30 AM

    As per ur structure

    Recorset structure - Record

    u r right.

    But when FieldfixedLengths is specified field separator is not needed.Further u have to specify length for all the fields.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 08:40 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 08:54 AM

    Hi,

    u want the out put as CSV file,so there is no need to give Record.fieldFixedLengths 10.

    remove that and add Recor.fieldSeparator 'nl'.

    Regards,

    Sreedhar Goud

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 09:04 AM

    Hi Vivek,

    Yes, you have to give the Record.endSeparator 'nl'

    Along with that, Record.fieldSeparator 'nl' and Record.addHeaderLine 0

    This will work.

    Yuga

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      >> Record.addHeaderLine 0 says that whether your text file has a header line or not.

      >> Record.endSeparator 'nl' - after the end of each record it adds the new line character.Suppose if you have two or three sets of record after the end of each record set it will add an newline character.There should be an end separater to differentiate the record sets.

      Yuga

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.