Выпадающий список на экране выбора
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 |
DATA: it_cbval TYPE STANDARD TABLE OF vrm_value WITH DEFAULT KEY. PARAMETERS: p_l_lang TYPE char3 AS LISTBOX VISIBLE LENGTH 20 USER-COMMAND lb_cmd. INITIALIZATION. it_cbval = VALUE #( ( key = 'A_1' text = 'Значение 1' ) ( key = 'A_2' text = 'Значение 2' ) ). CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = 'P_L_LANG' values = it_cbval EXCEPTIONS id_illegal_name = 1 OTHERS = 2. IF sy-subrc = 0. IF lines( it_cbval ) > 0. p_l_lang = 'A_1'. ENDIF. ENDIF. START-OF-SELECTION. TRY. DATA(s) = it_cbval[ key = p_l_lang ]. WRITE: / s-text. CATCH cx_root. ENDTRY. |