cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding the Elimination of leading Zeroes .

Former Member
0 Kudos

Hi Experts,

Iam new to XI.

Iam doing a File to Idoc scenario (PO Response) ,

I want to remove the leading zeroes from one of the field from file and map it to the corresponding Idoc field.

Is there any Standard functions to do this ? If not , Can anyone pls post the code for UDF to execute this Logic.

waiting for ur response.

Thanks in Advance.

Regards

Krupa.

Accepted Solutions (0)

Answers (3)

Answers (3)

agasthuri_doss
Active Contributor
0 Kudos

Hi,

The Function Round ( under Arithmetic ) might help you, Check it out

Regards

Agasthuri Doss

Former Member
0 Kudos

you donot need a UDF for this....

use the 'formatNum' function in the arithmetic functions....as a parameter to this function just put '#'...

This will suppress all the leading zeroes...

Thanks,

Renjith

prabhu_s2
Active Contributor
0 Kudos

say ur inptu to the udf is <b>inputVal</b> use the below code in UDF:

String output = <b>inputVal</b>.replaceFirst("^0+","");

return output;

or also

int Seq = Integer.parseInt(<b>inputVal</b>)