SHIFT lw_char LEFT DELETING LEADING '0'.
Several synthax below to do the same thing :
(Notice that you have to work with a field type CHAR to remove the ZERO, will not work with a NUMC variable)
* ====================================================
MOVE lw_num TO lw_char.
" lw_char = '0000000123'
SHIFT lw_char LEFT DELETING LEADING '0'.
" lw_char = '123'
* ====================================================
MOVE lw_num TO lw_char.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = lw_char
IMPORTING
output = lw_char.
" lw_char = '123'
* ====================================================
WRITE lw_num TO lw_char NO-ZERO. " lw_char = ' 123'
CONDENSE lw_char. " lw_char = '123'
Search tag : remove, enlever, zéro non-significatifs
About the author