Выбор значений из списка
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
TYPES: BEGIN OF ty_sel_list, l TYPE char100, END OF ty_sel_list. TYPES: ty_it_sel_list TYPE STANDARD TABLE OF ty_sel_list WITH DEFAULT KEY. TYPES: ty_it_rsvbfidesc TYPE STANDARD TABLE OF rsvbfidesc WITH DEFAULT KEY. START-OF-SELECTION. DATA(lv_ln) = 0. DATA(it_sel_list) = VALUE ty_it_sel_list( ( l = 'Feld 1' ) ( l = 'Feld 2' ) ( l = 'Feld 3' ) ( l = 'Feld 4' ) ( l = 'Feld 5' ) ). DATA(it_rsvbfidesc) = VALUE ty_it_rsvbfidesc( ( fieldnum = 1 display = abap_true ) ). CALL FUNCTION 'RS_VALUES_BOX' EXPORTING cursor_field = 1 cursor_line = 1 left_upper_col = 10 left_upper_row = 5 title = 'Заголовок' IMPORTING linenumber = lv_ln TABLES field_desc = it_rsvbfidesc value_tab = it_sel_list EXCEPTIONS clear_contents = 1 invalid_coordinates = 2 invalid_field_number = 3 no_action = 4 no_fields = 5 no_markfield = 6 process_user_action = 7 value_tab_empty = 8 value_tab_too_long = 9 OTHERS = 10. |
Результат: