Quantcast
Channel: SCN : Unanswered Discussions - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 6719

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

$
0
0

HI Team ,

 

I have a scenario where the input is coming as

<IndividualRevenueForCRE>2.00-</IndividualRevenueForCRE>

 

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("-")) );

}

else

{return a;}

 

I am getting this output in the mapping as

 

<Value>-2.00</Value>

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 ?

 


Viewing all articles
Browse latest Browse all 6719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>