How to Remove spaces in the value in sapui5 Odata

if value is coming in the ActQty field is "10.000" and you want to remove the spaces in this value then use following code in the Success of Odata res

success: function (oRes) {


for (var i in oRes.results) {

                                        var val1 = oRes.results[i].ActQty;

var value1 = parseFloat(val1).toFixed(0);

oRes.results[i].ActQty = value1;

var val2 = oRes.results[i].difference;

var value2 = parseFloat(val2).toFixed(0);

oRes.results[i].difference = value2;



then you get value of the ActQty is "10"

Post a Comment

Previous Post Next Post