cancel
Showing results for 
Search instead for 
Did you mean: 

PI removing blank spaces at the end of the lines in a plain text file

Former Member
0 Kudos

Hi -

I have an interface that transfers a file via FTP. I defined both the sender and receiver to transfer either Text or Binary but the interface removes every blank space I have after the last character. The file is a fixed lenght file.

Example:

Original file:

Hello world(space)(space)(space)(space)(space)(space)(space)(space)(eol)

where (space) is the space character and (eol) is the end of line char.

File after it is received.

Hello world(eol)

I already defined the parameter Row.fieldFixedLenghts with 10164 which is the lenght of the lines of the file.

Any ideas why it may be happening?

Thanks,

Carlos.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Finally I got to the solution reusing the comment to remove the trim. Seems that as we are using an XML structure to contain the text file, we got an auto-trim for that field and that remove the ending spaces.

The right parameter was not xml.fieldContentFormatting or

structure.fieldContentFormatting. You have to qualify your XML structure. In my case it was Row.fieldContentFormatting.

Thanks !!!

Former Member
0 Kudos

Hi Carlos,

M also facing the same problem.

Can u please elaborate the solution u applied?

Regards,

Nidhi

Former Member
0 Kudos

Hi Vijay -

I read the article but I don't like the idea of implementing a solution that leaves error messages. That will be confusing for our users. Do we have an option to fix current interface?

Thanks,

Carlos.

Shabarish_Nair
Active Contributor
0 Kudos

it really isnt an error. it is more like an info pop up that says the content is not XML but text. This comes only when you are trying to view the payload in SXMB_MONI but the message status will be in success.

Shabarish_Nair
Active Contributor
0 Kudos

is this a file transfer? i.e are you doing any modifications on the input file?

if not then use /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository

Former Member
0 Kudos

Hi -

I tried both the parameters:

xml.fieldContentFormatting

structure.fieldContentFormatting

The received file still has the problem. All the blank spaces are cleared out.

The file is a plain text file not an XML file. May this be the issue?

Thanks,

Carlos.

Former Member
0 Kudos

Try to use structure.fieldContentFormatting = nothing option to retain the blanks.

http://help.sap.com/saphelp_nwpi71/helpdata/EN/0d/00453c91f37151e10000000a11402f/frameset.htm

Pooja

Former Member
0 Kudos

Hi Carlos,

Pooja is right .....try it.....it will work with xml.fieldContentFormatting= nothing

Cheers

Dhwani