08-17-2007 4:43 PM
Hi guys,
I have to delete leading zeros from a set of fields.
please help with an example.
thanx in advance
08-17-2007 4:45 PM
08-17-2007 4:45 PM
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
08-17-2007 4:54 PM
08-18-2007 4:16 AM
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.