*&---------------------------------------------------------------------* *& Include ZMM_GETDATA *&---------------------------------------------------------------------* REPORT zmm_getdata. TABLES: eina,eine. DATA: gs_infnr TYPE eina-infnr. DATA gt_infnr LIKE TABLE OF gs_infnr. DATA r_infnr TYPE RANGE OF eina-infnr. DATA wa_infnr LIKE LINE OF r_infnr . DATA:rspar_tab TYPE TABLE OF rsparams, rspar_line LIKE LINE OF rspar_tab. SELECT DISTINCT eina~infnr INTO TABLE gt_infnr FROM eina INNER JOIN eine ON eina~infnr = eine~infnr. * WHERE eina~loekz = '' * AND eine~loekz = '' * AND eine~werks <> '' * AND eine~prdat < sy-datum. SORT gt_infnr ASCENDING. LOOP AT gt_infnr INTO gs_infnr FROM 1 TO 2. rspar_line-selname = 'S_INFNR'. rspar_line-kind = 'S'. rspar_line-sign = 'I'. rspar_line-option = 'EQ'. rspar_line-low = gs_infnr. APPEND rspar_line TO rspar_tab. CLEAR: gs_infnr, rspar_line. ENDLOOP. LOOP AT gt_infnr INTO gs_infnr FROM 3 TO 3. rspar_line-selname = 'S_INFNR1'. rspar_line-kind = 'S'. rspar_line-sign = 'I'. rspar_line-option = 'EQ'. rspar_line-low = gs_infnr. APPEND rspar_line TO rspar_tab. CLEAR: gs_infnr, rspar_line. ENDLOOP. * *export r_infnr to MEMORY id 'T_OUT'. *submit ZMM_TEST and RETURN. BREAK-POINT. SUBMIT zmm_test WITH SELECTION-TABLE rspar_tab. "AND RETURN.
被调用的程序:
*&---------------------------------------------------------------------* *& Report ZMM_TEST *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT ZMM_TEST. tables:eina. *SELECTION-SCREEN BEGIN OF BLOCK blk2. select-options: s_infnr for eina-infnr . select-options: s_infnr1 for eina-infnr . *SELECTION-SCREEN END OF BLOCK blk2. *DATA r_infnr TYPE RANGE OF eina-infnr. *import r_infnr from MEMORY id 'T_OUT'. start-of-selection. IF s_infnr IS NOT INITIAL. WRITE / s_infnr-LOW. WRITE / s_infnr1-LOW. ENDIF. break-point.