DATA: f1(25) VALUE 'abcdef_1234567890', f2(25) VALUE 'abc_1234567890', g(10) TYPE c.
PERFORM write_lastten USING f1. PERFORM write_lastten USING f2.
*&---------------------------------------------------------------------* *& Form write_lastten *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_F text *----------------------------------------------------------------------* FORM write_lastten USING value(p_f). DATA l_offsetforten TYPE i. l_offsetforten = strlen( p_f ) - 10. MOVE p_f+l_offsetforten(10) TO g. WRITE:/ g. ENDFORM. " write_lastten
DATA: f1(25) VALUE 'abcdef_1234567890',
f2(25) VALUE 'abc_1234567890',
g(10) TYPE c.
PERFORM write_lastten USING f1.
PERFORM write_lastten USING f2.
*&---------------------------------------------------------------------*
*& Form write_lastten
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_F text
*----------------------------------------------------------------------*
FORM write_lastten USING value(p_f).
DATA l_offsetforten TYPE i.
l_offsetforten = strlen( p_f ) - 10.
MOVE p_f+l_offsetforten(10) TO g.
WRITE:/ g.
ENDFORM. " write_lastten
Output.
1234567890
1234567890
참고 하세요