selection-screen begin of block b1 with frame title txt001.
PARAMETERS:L_TYPE type text10 as listbox user-command typ visible length 10 obligatory.
select-options:R_AUFNR for AFRU-AUFNR,
R_MATNR for AFKO-PLNBEZ.
select-options:R_BUDAT for AFRU-BUDAT MODIF ID BUD,
R_ERNAM for AFRU-ERNAM MODIF ID ERN,
R_KOSTL for CRCO-KOSTL."成本中心
selection-screen end of block b1.
at selection-screen output.
DATA: L_LIST TYPE VRM_VALUES ,
W_LIST LIKE LINE OF L_LIST,
fname(80) TYPE C.
refresh l_list.
fname = ‘L_TYPE‘.
w_list-key = ‘NO1‘.
w_list-text = ‘报工明细表‘.
append w_list to l_list.
clear w_list.
w_list-key = ‘NO2‘.
w_list-text = ‘报工汇总表‘.
append w_list to l_list.
clear w_list.
call function ‘VRM_SET_VALUES‘
EXPORTING
ID = fname
VALUES = L_LIST.
LOOP AT SCREEN.
CASE SCREEN-GROUP1.
WHEN ‘BUD‘.
IF L_TYPE = ‘NO2‘.
screen-active = ‘1‘.
ELSE.
SCREEN-active = ‘0‘.
ENDIF.
WHEN ‘ERN‘.
IF L_TYPE = ‘NO2‘.
SCREEN-active = ‘0‘.
ELSE.
SCREEN-active = ‘1‘.
ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.