Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

To Remove Zeros from a field

Former Member
0 Kudos

Hi All,

I have Material Number in my screen which is displayed as tree node in the tree control.In the display Material number comes with zeros i.e. if material number 1111 is there it is displayed with 000000000000001111 .It is displayed with 14 zeros and then material number.I want to nullify the 0s and just need the number to be displayed .What should i do?

Vijay

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

There is a number of ways to do this.

report zrich_0001.


data: matnr type mara-matnr value '000000000000001111'.


*  This is one way
shift matnr left deleting leading '0'.


* Here is another
matnr = '000000000000001111'.
call function 'CONVERSION_EXIT_MATN1_OUTPUT'
     exporting
          input  = matnr
     importing
          output = matnr.



check sy-subrc = 0.

Regards,

Rich Heilman

0 Kudos

Thank You Rich.

Rgrds,

Viay

0 Kudos

If you problem is solved, please close the post. Thanks.

Regards,

Rich Heilman

Former Member
0 Kudos

i try the function but it doesn't work in my environment,

or try this:

shift matnr left deleting leading '0'.