cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion Help

Former Member
0 Kudos

Hi All,

I am having a problem trying to convert an XML file into a flat file structure with the file content conversion message protocol. I am using the file adapter type.

Here is an example of the XML I am converting,

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

<ns:Debmas_msg xmlns:ns="http://sap.com/xi/FiletoDebmas">

<kunnr>1000004982</kunnr>

<Name>Reynolds Harris</Name>

</ns:Debmas_msg>

I use the parameters...

Debmas_msg.fieldFixedLengths = 10,20

Debmas_msg.fixedLengthTooShortHandling = Cut

A file is created but contains 2 carrage returns and no data.

I've tried using a combination of all of the parameters and i'm not getting anywhere.

Any suggestions on how to go about getting this xml data converted to a flat file?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nathan,

To convert a XML file into a flat file you need to have a Stucture of the XML file like this one mentioned below:

<root>

<substructure>

<data>

</data>

</substructure>

<root>

now the parameters to be given in Content Conversion Tab and which are of utmost importance are:

substructure.fieldSeparator

root.fieldSeparator

substructure.endSeparator

you can also use the methods such as fieldFixedLengths etc.

Include these methods and test your scenario again.

I hope it helps,

Thanks & Regards,

Varun Joshi

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

Please have a look at this blog:

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

and

http://help.sap.com/saphelp_erp2004/helpdata/en/0b/9a50465ccf84479e39a6d50c90fb3f/frameset.htm

regards

Priyanka

Former Member
0 Kudos

Hi Nathan,

Be sure to use the following parameters -

NameA.endSeparator,

NameA.fieldNames,

NameA.fieldSeparator.

Also specify the KeyFieldName.

I think these parameters will suffice for the basic conversion.

Cheers,

Divya