REPORT z_barry_test.
TABLES makt.
DATA: itab TYPE makt OCCURS 0 WITH HEADER LINE.
SELECT-OPTIONS: s_matnr FOR makt-matnr.
CALL FUNCTION 'Z_TEST'
EXPORTING
s_matnr = s_matnr[]
TABLES
it_makt = itab.
**********************
FUNCTION z_test.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(S_MATNR) TYPE ZZTTMATNR OPTIONAL
*" TABLES
*" IT_MAKT TYPE MAKT_UPL_TT OPTIONAL
*"----------------------------------------------------------------------
SELECT * INTO TABLE it_makt FROM makt WHERE matnr IN s_matnr.
ENDFUNCTION.
ZZTTMATNR为Table Type,结构为:
SIGN DDSIGN
OPTION DDOPTION
LOW MATNR
HIGH MATNR
如果不要求程序可以RFC,就不必定义Table Type,在Type group:Z****里面定义一下亦可:
TYPES: zdata_range_matnr TYPE RANGE OF mara-matnr INITIAL SIZE 0 .
然后在FG的TOP文件里面加上:
TYPE-POOLS: z****.
阅读(3397) | 评论(2) | 转发(0) |