cancel
Showing results for 
Search instead for 
Did you mean: 

Extra whitespace in string

markbernabe
Active Participant
0 Kudos

Hi,

I have some strange mapping issue. I have fields with String type. However, for some reason, some fields are having extra white space when converted to the file format. When I view the payload in sxi_monitor, it looks fine. But when I open the payload in notepad, the extra white space shows up. Is this a known issue?

SXI_MONITOR:

Notepad:

Hence, the output after file conversion contains the whitespace.

Appreciate your inputs.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mark :

   you cannot found whitespace with xml display tools like IE or SXMB_MONI. because such kind of xml tools trim whitespace when display xml document, the essential document content is like to the format of notepad displayed, so you need to take notepad display as reference.

you can trim the whitespace in mapping using UDF.

best regard!

markbernabe
Active Participant
0 Kudos

Hi Kevin,

Thanks for the reply. Yes I agree it can be fixed with trim. I'm just curious as to why extra whitespace is added to some values. Not sure if it's added in PI or if it's already coming to PI with the whitespace.

Former Member
0 Kudos

Hi , mark :

it's not add by PI , it's come from coming to PI with whitespace, please have a check with source system stakeholder.

markbernabe
Active Participant
0 Kudos

Got it, will check with the developers. Thanks!

Answers (1)

Answers (1)

ambrish_mishra
Active Contributor
0 Kudos

Hi Mark,

White spaces won't be visible in moni. You need to take this up from source system (mostly database systems create white spaces) or handle it in PI (trim).

Ambrish