DATA: LV_FUNCNAME TYPE FUNCNAME .
LV_FUNCNAME = 'ZFM_TEST_TRANS_DATA' .
""" 检查函数是否存在
CALL FUNCTION 'FUNCTION_EXISTS'
EXPORTING
FUNCNAME = LV_FUNCNAME
EXCEPTIONS
FUNCTION_NOT_EXIST = 1
OTHERS = 2.
IF SY-SUBRC = 0 .
CALL FUNCTION LV_FUNCNAME
CHANGING
CS_BKPF = CS_BKPF
CS_BSEG = CS_BSEG.
ENDIF.