程序:
REPORT z_barry_test .
DATA: itab(40) TYPE c OCCURS 0 WITH HEADER LINE ,
output(40) TYPE c.
CALL FUNCTION 'Z_TEST_PARA'
EXPORTING
input = 'ABC'
IMPORTING
output = output
TABLES
return = itab.
LOOP AT itab.
WRITE / itab .
ENDLOOP.
函数:
FUNCTION z_test_para.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(INPUT) TYPE C DEFAULT 'AB'
*" EXPORTING
*" REFERENCE(OUTPUT) TYPE C
*" TABLES
*" RETURN
*"----------------------------------------------------------------------
IF input IS SUPPLIED.
APPEND 'INPUT SUPPLIED' TO return.
ENDIF.
IF output IS REQUESTED. "SUPPLIED
APPEND 'OUTPUT REQUESTED' TO return.
ENDIF.
ENDFUNCTION.
注:4.6版本后统一使用SUPPLIED,不再使用REQUESTED
阅读(2649) | 评论(3) | 转发(0) |