Code: Alles auswählen.
REPORT zscarrtest.
type-pools: vrm.
parameters: ld_carrid type scarr-carridas listbox visible length 8, "so lassen, sieht sonst doof aus
lv_carrname type string.
initialization.
perform build_user_drop_down_list.
start-of-selection.
write:/ ld_carrid.
Code: Alles auswählen.
form build_user_drop_down_list.
data: name type vrm_id,
list type vrm_values,
value like line of list.
data: lt_scarr type scarroccurs 0 with header line.
clear list. refresh list.
name = 'ld_carrid'.
select * into corresponding fields of table lt_scarr
from MyScarrView.
sort lt_scarr ascending by carrid.
loop at lt_scarr.
clear value.
value-key = lt_scarr-carrid.
value-text = lt_scarr-carrid.
append value to list.
endloop.
* Set the values
call function 'VRM_SET_VALUES'
exporting
id = name
values = list.
endform.
Code: Alles auswählen.
[...]
initialization.
LOOP AT SCREEN.
IF SCREEN-NAME = 'lv_carrname'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP.
[...]