Me solicitaron mostrar por un parámetro de entrada, unos valores fijos (30, 60, 90, 120), así que tomé un Parameter, y con una función (VRM_SET_VALUES) cargamos los datos que queremos que seleccione el usuario.
*TOP:
PARAMETERS P_FXDT AS LISTBOX LENGTH 3 VISIBLE LENGTH 10 OBLIGATORY .
AT SELECTION-SCREEN OUTPUT.
DATA:
lv_name TYPE vrm_id,
lt_list TYPE vrm_values,
lv_value TYPE vrm_value.
lv_name = 'P_FXDT'. " Respetar mayúsculas
lv_value-key = '30'.
lv_value-text = 'Días'.
APPEND lv_value TO lt_list.
lv_value-key = '60'.
APPEND lv_value TO lt_list.
lv_value-key = '90'.
APPEND lv_value TO lt_list.
lv_value-key = '120'.
APPEND lv_value TO lt_list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = lv_name
values = lt_list
EXCEPTIONS
id_illegal_name = 0
OTHERS = 0.
"Fuente: https://answers.sap.com/questions/3608701/parameter-as-list-box.html
*TOP:
PARAMETERS P_FXDT AS LISTBOX LENGTH 3 VISIBLE LENGTH 10 OBLIGATORY .
AT SELECTION-SCREEN OUTPUT.
DATA:
lv_name TYPE vrm_id,
lt_list TYPE vrm_values,
lv_value TYPE vrm_value.
lv_name = 'P_FXDT'. " Respetar mayúsculas
lv_value-key = '30'.
lv_value-text = 'Días'.
APPEND lv_value TO lt_list.
lv_value-key = '60'.
APPEND lv_value TO lt_list.
lv_value-key = '90'.
APPEND lv_value TO lt_list.
lv_value-key = '120'.
APPEND lv_value TO lt_list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = lv_name
values = lt_list
EXCEPTIONS
id_illegal_name = 0
OTHERS = 0.
"Fuente: https://answers.sap.com/questions/3608701/parameter-as-list-box.html
Comentarios
Publicar un comentario