Skip to Content
avatar image
Former Member

Delete leading zeroes


Does anyone know how to delete leading zeroes in a mapping ?

I don't think there is a standard function for this, or am I wrong ?



Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 20, 2006 at 04:14 PM

    hi Marco,

    create a simple function that will use the code below:

    String stringWithZeros = "0000123490";

    String stringWithoutZeros = stringWithZeros.replaceFirst("^0+", "");




    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi anand,

      I am doing lsmw conversion for mm01. The problem is when i am converting 18 char matnr, it is carry 6 more characters for matnr. I tried to use conversion function module. Again it is showing 24 matnr. How can we restrict leading zeros right side of the matnr? I tried to use SHIFT right deleting trailing spaces..but again showing same error... how can i restrict the zeros?

      Thanks and Regards,

      Partha SArathi