Code: Alles auswählen.
REPORT zscarrtest.
type-pools: vrm.
parameters: ld_carrid type scarr-carrid as 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.
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.
[...]
Code: Alles auswählen.
PARAMETERS p_name TYPE string MODIF ID dis.
[...]
AT SELECTION-SCREEN OUTPUT. "!!
LOOP AT SCREEN.
IF SCREEN-GROUP = 'DIS'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Mach VISIBLE-LENGTH 30, dann siehst du automatisch auch den Namen.Accetron hat geschrieben: ↑01.02.2021 15:09Code: Alles auswählen.
parameters: ld_carrid type scarr-carrid as listbox visible length 8, "so lassen, sieht