REPORT ZDYNAMIC_ITAB_04.
DATA: LT_CODE(72) OCCURS 10,
L_PROG(8).
APPEND 'PROGRAM SUBPOOL.' TO LT_CODE.
APPEND 'FORM DYN1.' TO LT_CODE.
APPEND 'WRITE / ''동적인 Subroutine 1''.' TO LT_CODE.
APPEND 'ENDFORM.' TO LT_CODE.
APPEND 'FORM DYN2.' TO LT_CODE.
APPEND 'WRITE / ''동적인 Subroutine 2''.' TO LT_CODE.
APPEND 'ENDFORM.' TO LT_CODE.
GENERATE SUBROUTINE POOL LT_CODE NAME L_PROG.
IF SY-SUBRC <> 0.
WRITE: / 'Subroutine POOL 생성에 실패 하였습니다.'.
ELSE.
WRITE: / 'Subroutine POOL 이름 : ', L_PROG.
SKIP 2.
PERFORM DYN1 IN PROGRAM (L_PROG).
SKIP 2.
PERFORM DYN2 IN PROGRAM (L_PROG).
ENDIF.