cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting zeroes

Former Member
0 Kudos

Hi,

I am capturing coset center values from BAPI which is of type string.

i declared it as string and displaying value in webdynpro java.it is taking zeroes before the values of cost center if the cost center is number.for eg : if the cost center value is 88888 in the R/3, it is displaying as 00088888.if the cost center value is D30045 it is displaying as D30045, not taking any zeroes before the value.how to omit the zeroes before the cost center value.

pls guide me .

Regards,

Pavani

Accepted Solutions (0)

Answers (3)

Answers (3)

prashil
Advisor
Advisor
0 Kudos

Hi,

If you the option of perform capture that number in Java, you can easily use the String method of trimZeroes().

Hope it helps!!!

Regards,

Prashil

former_member40425
Contributor
0 Kudos

hi,

In Bapi only you can use FM CONVERSION_EXIT_ALPHA_OUTPUT and get the output without leading zeros.

I hope it helps.

Regards,

Rohit

Former Member
0 Kudos

Hi Pavani

Same problem is already disucssed in forums

Please go through this wiki.

https://www.sdn.sap.com/irj/scn/wiki?path=/display/java/remove%252bleading%252band%252btrailing%252b...