Application Development and Automation 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: 
Read only

Leading Zeros

Former Member
0 Likes
927

Hi Friends,

I am displaying MATNR ( Program Field) in Table control. But o/p is coming with zeros, i don't want to print zeros. In attributes screen it is in disable status.

Now how to eliminat that leading zeros,

Thanks in Advance.

Reagards,

Murali Krishna K

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
876

I am curious as to where the value is being displayed with leading zeros, in a input/output field on a screen(dynpro), in a list display, in an ALV Grid? Usually, if all is well, this will be handled automatically, for example, if on a dynpro, all you need to do is set the conversion routine value to ALPHA, then the conversion will be automatic, nothing to code. If in a list display, the field should be TYPEed like MARA-MATNR, then the conversion will be automatic on the list display, as well as the ALV grid.

Regards,

Rich Heilman

Hi Friends,

I am displaying MATNR ( Program Field) in Table control. But o/p is coming with zeros, i don't want to print zeros. In attributes screen it is in disable status.

Now how to eliminat that leading zeros,

Thanks in Advance.

Reagards,

Murali Krishna K

6 REPLIES 6
Read only

Former Member
0 Likes
876

U can use this function module also

CONVERSION_EXIT_ALPHA_OUTPUT

Read only

dani_mn
Active Contributor
0 Likes
876

<b>data: a(10) value '0000333'.

SHIFT a LEFT DELETING LEADING '0'.</b>

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
876

Hi,

In PBo itself,before populating the values,just use a character variable(say data v1(18)).

v1 = value to be displayed.

pack v1 to v1.

Then use v1 to display the value.

Read only

Former Member
0 Likes
876

Hi,

N = '000088888'.

SHIFT N LEFT DELETING LEADING ZEROS.

or FM is CONVERSION_EXIT_ALFAN_INPUT

OR

X = '777770000000'.

SHIFT X RIGHT DELETING TRAILING ZEROS.

CONVERSION_EXIT_ALFAN_OUTPUT

Message was edited by:

Durga Vinta

Read only

0 Likes
876

hi,

use unpack.

l_matnr = '000000000123'.

unpack l_matnr to l_matnr.

Regards

CNU

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
877

I am curious as to where the value is being displayed with leading zeros, in a input/output field on a screen(dynpro), in a list display, in an ALV Grid? Usually, if all is well, this will be handled automatically, for example, if on a dynpro, all you need to do is set the conversion routine value to ALPHA, then the conversion will be automatic, nothing to code. If in a list display, the field should be TYPEed like MARA-MATNR, then the conversion will be automatic on the list display, as well as the ALV grid.

Regards,

Rich Heilman