TYPE-POOLS: vrm. DATA: it_val1 TYPE vrm_values, it_val2 TYPE vrm_values, w_line LIKE LINE OF it_val1. PARAMETERS: p_bukrs LIKE t001-bukrs AS LISTBOX VISIBLE LENGTH 25 OBLIGATORY, p_month LIKE t247-mnr AS LISTBOX VISIBLE LENGTH 12 OBLIGATORY.
INITIALIZATION. SELECT bukrs butxt FROM t001 INTO (w_line-key, w_line-text). APPEND w_line TO it_val1. CHECK p_bukrs IS INITIAL. p_bukrs = w_line-key. ENDSELECT. SELECT mnr ltx FROM t247 INTO (w_line-key, w_line-text) WHERE spras = sy-langu. APPEND w_line TO it_val2. CHECK p_month IS INITIAL. p_month = w_line-key. ENDSELECT.
AT SELECTION-SCREEN OUTPUT. CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = 'P_BUKRS' values = it_val1. CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = 'P_MONTH' values = it_val2.