Code: Alles auswählen.
data: wert_alt type char10,
wert_neu type char10,
domname type domname.
wert_alt = '12345'.
domname = 'NUM10'.
perform nullen_auffuellen using wert_alt wert_neu domname.
write:/ 'ALT = ', wert_alt.
write:/ 'NEU = ', wert_neu.
form nullen_auffuellen using l_wert_alt type char10
l_wert_neu type char10
l_domname type domname.
data: laenge type i,
off type i value 0,
dd01v type dd01v,
dd07v type table of dd07v.
l_wert_neu = l_wert_alt.
laenge = strlen( l_wert_neu ).
call function 'DD_DOMA_GET'
exporting
domain_name = l_domname
importing
dd01v_wa_a = dd01v
tables
dd07v_tab_a = dd07v
dd07v_tab_n = dd07v.
if dd01v-datatype = 'NUMC'.
shift l_wert_neu right deleting trailing space.
do dd01v-leng times.
off = sy-index - 1.
if l_wert_neu+off(1) is initial.
l_wert_neu+off(1) = '0'.
else.
exit.
endif.
enddo.
endif.
endform.
Code: Alles auswählen.
IF dd01v-convexit IS NOT INITIAL.
CONCATENATE
'CONVERSION_EXIT_'
dd01v-convexit
'_INPUT'
INTO lv_conv_fb.
CONDENSE lv_conv_fb NO-GAPS.
CALL FUNCTION lv_conv_fb
EXPORTING
input = l_wert_alt
IMPORTING
output = l_wert_neu.
ENDIF.