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: 

Supression leading zeros

Former Member
0 Kudos

Hi guys,

I have to delete leading zeros from a set of fields.

please help with an example.

thanx in advance

4 REPLIES 4

Pawan_Kesari
Active Contributor
0 Kudos

use fm CONVERSION_EXIT_ALPHA_OUTPUT

Former Member
0 Kudos

U can either use this function module also

CONVERSION_EXIT_ALPHA_OUTPUT

or

SHIFT <yourField> LEFT DELETING LEADING '0'

or

try NO-ZERO option of WRITE statement

or

Another way is to create another variable of type I and assign the value into it

example:

DATA: L_NUMC(08) TYPE N.

DATA: L_INT TYPE I.

L_NUMC = '00000018'.

L_INT = L_NUMC.

Result will be = 18.

Regards,

Santosh

former_member194669
Active Contributor
0 Kudos

Hi,

Use


pack mara-matnr to v_matnr.

kesavadas_thekkillath
Active Contributor
0 Kudos

hi if an field has leading zeros like 0000000001.

wk_equno = 0000000001.

remove this using the following method.

data: wk_var like qmel-equnr.

write wk_equno to wk_var using edit mask '==ALPHA'.

Reward points if usefull.