Skip to Content
Former Member
Apr 02, 2015 at 03:35 PM

how to remove leading spaces SAP PI between negative sign and values


HI Team ,

I have a scenario where the input is coming as


After doing the mapping of removing the negative sign from suffix and putting in profix using the code

if(a.indexOf("-") > 0)


return ("-" + a.substring(0,a.indexOf("-")) );



{return a;}

I am getting this output in the mapping as


But when I am checking in MONI i am seeing a space between negative sign and value

<Value>- 2.00</Value>

And while coming in the file it is coming like

- 2.00

because of this it is failing in the target system , can anyone help in how to overcome this issue ?