cancel
Showing results for 
Search instead for 
Did you mean: 

Spaces getting trimmed in file content conversion

Former Member
0 Kudos

Hi all,

I am converting a flat file to an XML file by XI. The problem which i am facing in file content conversion is that the spaces in flat file data are getting trimmed to one space in the XML in SXMB_MONI.

The data in flat file is like SOUTHSEA and HANTS is having nearly 8 spaces.

But the data in XML is:

<b><u>SOUTHSEA HANTS PO5 2LZ PO5 2LZ020327</u></b> i.e. in XML, there is only 1 space between SOUTHSEA and HANTS.

The following parameters i have used in file content conversion:

.keyFieldValue '*'

.fieldSeparator 'nl'

.fieldNames RECORD_DATA

.ignoreRecordsetName true

I am taking each record of the flat-file in a single record RECORD_DATA in XML.

<b>So can anyone tell me why the big spaces are getting trimmed to a single space eg. between SOUTHSEA and HANTS etc.</b>

Thanks in advance.

Rajeev Gupta

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

try :

NameA.fieldContentFormatting = <b>nothing </b>

as the default is <b>trim </b>

refere:

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

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Hi Michal,

The .fieldContentFormatting = nothing is not working. After applying this also, the spaces in between the characters are getting trimmed in source XML.

Thanks,

Rajeev Gupta

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

if it's not working then you need to contact SAP

(OSS note) as this is the parameter used for such cases

unless you're not using this correctly

it should work so try doing it again

(activate, etc)

Regards,

michal

Former Member
0 Kudos

Hi Michal,

i am telling you the current configuration settings of file content conversion which i have:

RECORD.keyFieldValue '*'

RECORD.fieldSeparator 'nl'

RECORD.fieldNames RECORD_DATA

RECORD.ignoreRecordsetName true

RECORD.fieldContentFormatting nothing

Now tell me what to do for the spaces getting trimmed in source XML data.

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Hey,

if u dont wannoo trim spaces between the two fields

instead of fieldSeperator u can use fieldFixedLengths, and give the length of the entire record line as the paramter to the field, so that spaces wont be trimmed.

regards

jithesh