PROGRAM ztest.
TYPE-POOLS : vrm.
DATA: p_temp TYPE vrm_id,
it_value TYPE vrm_values,
wa_value TYPE vrm_value.
PARAMETERS: p_cond(10) AS LISTBOX VISIBLE LENGTH 15.
AT SELECTION-SCREEN OUTPUT.
p_temp = 'P_COND'.
wa_value-key = '1'.
wa_value-text = 'YES'.
APPEND wa_value TO it_value.
wa_value-key = '2'.
wa_value-text = 'NO'.
APPEND wa_value TO it_value.
wa_value-key = '3'.
wa_value-text = 'NOT SURE'.
APPEND wa_value TO it_value.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = p_temp
values = it_value
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
TYPE-POOLS : vrm.
DATA: p_temp TYPE vrm_id,
it_value TYPE vrm_values,
wa_value TYPE vrm_value.
PARAMETERS: p_cond(10) AS LISTBOX VISIBLE LENGTH 15.
AT SELECTION-SCREEN OUTPUT.
p_temp = 'P_COND'.
wa_value-key = '1'.
wa_value-text = 'YES'.
APPEND wa_value TO it_value.
wa_value-key = '2'.
wa_value-text = 'NO'.
APPEND wa_value TO it_value.
wa_value-key = '3'.
wa_value-text = 'NOT SURE'.
APPEND wa_value TO it_value.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = p_temp
values = it_value
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.