Skip to Content
avatar image
Former Member

file content conversion issue

in a i/b scenaio my file has the following csv structure

Cer,101,12,100,5,500

i need this to be converted in to the form

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

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

- <Record>

<BranchCode>Cer</BranchCode>

<ItemCode>101</ItemCode>

<TransactionDate>12</TransactionDate>

<Quantity>100</Quantity>

<UnitRate>5</UnitRate>

<Amount>500</Amount>

</Record>

</ns0:Input_MT>

so in the content conversion tab i have given the following values

doc name Output_MT

doc name space http://www.xxx.com

doc offset

recordset name Record

recordset namespace

recordset structure *

recordset sequence ascending

record sets per message

key field name

key field type

and

Record.fieldSeperator ,

Record.endSeperator 'nl'

Record.fieldNames BranchCode,ItemCode,TransactionDate,Quantity,UnitRate,Amount

Record.processFieldNames fromConfiguration

i get an error in file sender adaptor as

Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Format error in 'xml.recordset' argument: incomplete structure (name,number) pair

can u pls suggest if the procedure followed is correct

Edited by: vivek on Aug 12, 2008 1:24 PM

Edited by: vivek on Aug 12, 2008 1:28 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 12, 2008 at 11:30 AM

    HI,

    At sender end we need to configure below configuration

    Document name, Document Namespace, RecordsetName, RecordSetstructure

    based on Recordsetstrucutre(ROW) configure below FCC parameters

    RECORD.fieldFixedlengths 3,3,2,3,1,3

    RECORD.fieldNames X,X,X,X,X,X

    RECORD.feildSeparator ,

    RECORD.endSeparator 'nl'

    ignoreRecordsetName 'true'

    above configuration will pick source data after that receiver side use file adapter we can get xml format automatically.

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

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

    • <Record>

    <BranchCode>Cer</BranchCode>

    <ItemCode>101</ItemCode>

    <TransactionDate>12</TransactionDate>

    <Quantity>100</Quantity>

    <UnitRate>5</UnitRate>

    <Amount>500</Amount>

    </Record>

    </ns0:Input_MT>

    If we use filedfixedlength statement in FCC, we should define field names also else will give error

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 12, 2008 at 11:35 AM

    Ok first and foremost are you doing this for the sender adapter?

    If so you need to change your structure to include one more node above Record like below.

    <?xml version="1.0" encoding="UTF-8" ?> 
    
    <ns0:Input_MT xmlns:ns0="http://www.xxx.com"> 
    <Recordset>
    <Record> 
    <BranchCode>Cer</BranchCode> 
    <ItemCode>101</ItemCode> 
    <TransactionDate>12</TransactionDate> 
    <Quantity>100</Quantity> 
    <UnitRate>5</UnitRate> 
    <Amount>500</Amount> 
    </Record>
    </Recordset>
    </ns0:Input_MT>

    Then use the following parameters

    doc name Input_MT

    doc name space http://www.xxx.com

    doc offset

    recordset name Recordset

    recordset namespace

    recordset structure Record,*

    recordset sequence ascending

    record sets per message

    key field name

    key field type

    and

    Record.fieldSeperator ,

    Record.endSeperator 'nl'

    Record.fieldNames BranchCode,ItemCode,TransactionDate,Quantity,UnitRate,Amount

    If this is for the receiver then I suggest that you use a receiver comm channel 😊 and some of these parameters will not be necessary!

    Also you will not have to edit your structure as I suggested above.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 12, 2008 at 11:31 AM

    Do not write recordset Name

    recordset structure = Record,*

    ignoreRecordsetName = true,

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

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 12, 2008 at 11:32 AM

    Hi,

    Your recordset structure should be

    fieldname,*.
    i.e. is Record,* and not * alone

    Thanks

    SaNv...

    Add comment
    10|10000 characters needed characters exceeded