Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 12, 2008 at 08:25 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 12, 2008 at 08:40 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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 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