cancel
Showing results for 
Search instead for 
Did you mean: 

File Adapter with Content Conversion

Former Member
0 Kudos

Hi -

I am trying to convert a Flat file which has data as

firstnamelastnamecompanyName

Now i have created a message type which has a root name as Contact and its children are FirstName,LastName,Company.

And in the configurator i have created a file adapter with the content conversion, but being very new to XI i have never used a file adapter with content conversion. This is what i have in my Content Conversion Parameters.Please correct my code.

Document Name :: MT_Contact

Document Namespace :: http://venkat

Document Offset :: <i>i did not enter anything here</i>

Recordset Name :: RootNode(i gave this name just like that,,, Should it be something from the IR??

Recordset NameSpace:: <i>i did not enter anything here</i>

Recordset Structure:: Contact (this is the name in my IR

Recordset Sequence :: Ascending

Recordsets per Message :: Contact,* (Can someone explain what should be given here)

Then in the bottom in the name value pairs i have given

Contact.fieldNames = FirstName,LastName,Company

Contact.fieldSeparator = #

When i am using the above configuration the error i am getting in RWB is Error: Conversion initialization failed: Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:

Format error in 'xml.recordset' argument: incomplete structure (name,number) pairInvalid 'xml.recordsetsPerMessage' value 'Contact,*' found

I am very new to XI and i am unable to understand what exactly each field means in the file adapter when the content coversion is used. Can someone take the pain of explaining them.

Thank you

Venkat

Accepted Solutions (0)

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Use the following to create an XML strucutre like this,

<MT_CONTACT>

<CONTACT>

<FirstName> </FirstName>

<LastName> </LastName>

<CompanyName> </CompanyName>

</CONTACT>

<MT_CONTACT>

DocumentName : MT_TEST
DocumentNamespace : Yournamespace
RecordserName : record
RecordsetStructure : CONTACT,1


In the table,
ignoreRecordsetName  : true
CONTACT.fieldNames : FirstName,LastName,CompanyName
CONTACT.fieldSeparator : #

Go through the links suggested by moorthy and also these blogs to understand content conversion better,

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter

Regards,

Bhavesh

moorthy
Active Contributor
0 Kudos

Hi,

First try out like this-

<i>Recordset Structure:: Contact,1

Recordsets per Message :: *</i> ( Don't give anything ..take by default)

If it works for one record in your file, then your configuration is correct. To play around on this go thru this-

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bf...

http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/contact.htm

Hope this helps,

Regards,

Moorthy