cancel
Showing results for 
Search instead for 
Did you mean: 

Trailing spaces problem during file content conversion

Former Member
0 Kudos

I have developed a proxy to file scenario.And am using file content conversion for creating the file. The file is to be a fixed length file.

File Structure

<Header>

<Item>

<Item Trailer>

<File Trailer>

Each tab in the file has the last character mapped to spaces.

Eg: Header00000001 2006011700000000020060<blank space>

Item00000001 2006011700000000020060<blank space>

The problem is that during file content conversion. XI does not preserve trailing spaces at the end of the line i.e.if a particular line in the file ends with space. It terminates the line at the last non-space character (in this case at 060).

However we are required to maintain these trailing spaces at the end of each line.

I have tried preserve white space in data type that does not work.

I know that xslt mapping may solve the problem but I am looking for a workaround with my current graphical mapping.

Looking for suggestions !!

Thanks,

Rashida

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

I have the problem quite opposite to this where we are getting the trailing spaces at end of each record which should not come.

File structure is

<Record>

- <Data>

<Content>11/09/2007@210@ZACSL007@GBB-56436@PS01@29@1044@19@646@0</Content>

</Data>

</Record>

......

............. n records

<Header>

<File_Name>UK01</File_Name>

</Header>

Record structure in communication channel used is

Header, Data

Data.fieldFixedLengths 1024

Data.addHeaderLine 0

Header.addHeaderLine 0

Header.fieldFixedLengths 0

Header.fixedLengthTooShortHandling Cut

Data.fixedLengthTooShortHandling Cut

Header.endSeparator '0'

Actually if the length of record is less than 1024, rest of the length is being filled with spaces which should not occur.

Many advanced thanks.

Jitender

Former Member
0 Kudos

Hi Rashida,

Try following FCC parameter.

xml.fieldContentFormatting = nothing

If you specify nothing, the value remains unchanged.

Regards,

Sushil.

Former Member
0 Kudos

Hi,

Just one question ie for your proxy which i assume is a report how the data is coming, is it coming with the necessary trailing space to xi?If yes then it may solve this.As it will keep that field unaltered,

Not sure but have a try,the default is trim so it trims i guess.

<b>NameA.fieldContentFormatting = nothing

</b>

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

Regards,

Anirban.

Former Member
0 Kudos

make use of the property "fieldFixedlengths" in the file content conversion.

here is the link to help.sap.com on this...

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm

Thanks,

Renjith

Welcome to SDN!

Message was edited by: Renjith Andrews

Former Member
0 Kudos

Hi,

I have used fieldFixedLengths and other file content conversion properties to convert the data.

The problem is only in case of trailing spaces at the end of each line.These are not appearing.

Thanks,

Rashida

Former Member
0 Kudos

Hi Rashida,

My feeling is work around for the trailing spaces in graphical mapping is difficult and even I have tried out the same but in vain.

If you know the total length of the string coming in,then its easier to go in for XSLT mapping.

Cheers,

Rashmi

Shabarish_Nair
Active Contributor
0 Kudos

Hi Rashida,

The file adapter does preserve the spaces.

Say your segment has field1,field2,field3,field4

where

field1 length = 3,

field2 length = 4,

field3 length = 3,

field4 length = 5 (spaces)

try,

xml.fieldFixedLengths --- 3,4,3,5

xml.endSeparator --- 'nl'

also try

xml.fixedLengthTooShortHandling --- ignore , if the above doesnt work.

Former Member
0 Kudos

Hi,

Can you please give your fcc parameters.

Regards,

Jithu