Code: Alles auswählen.
REPORT ztest13.
DATA txt(20) VALUE 'Abc123'.
DATA i TYPE i.
DATA j TYPE i.
DATA t1(20).
DATA t2(20).
i = strlen( txt ).
IF txt CA '0123456789'.ENDIF.
j = sy-fdpos.
IF j < i.
t1 = txt(j).
t2 = txt+j.
ENDIF.
Code: Alles auswählen.
report.
parameters: p_string type string default 'ABC123'.
data: l_char type string.
data: l_numc type string.
move p_string to l_char.
translate l_char using '0 1 2 3 4 5 6 7 8 9 '.
shift l_char right deleting trailing space.
shift l_char left deleting leading space.
compute sy-fdpos = strlen( l_char ).
move p_string to l_numc.
shift l_numc left by sy-fdpos places.