on 03-09-2011 8:07 PM
I have an editable ALV.For a cell use set_cell_editor = dropdown and for the valueset use set_valueset_fieldname = col2.
Initially the alv is empty so the dropdown on cell is empty because valueset is an attribute of context of alv. Is it possible to use the method SET_VALUESET_FIELDNAME with reference to another attribute external to context node of alv ?
Thank you so much.
your requirement is not clear.
could you elaborate a bit.
First of all dropdownbykey will use the valueset to fill the dropdown.
dropdownbyindex will not use valueset.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
node1
-- col1 type char20,
-- col2 type char30,
-- col3 type char3,
--VALUESET_COL3 type WDR_CONTEXT_ATTR_VALUE_LIST.
................
......
data: lr_dropdown TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
lr_field_settings ?= l_value .
lt_columns = l_value->if_salv_wd_column_settings~get_columns( ).
LOOP AT lt_columns INTO ls_column.
lr_column = ls_column-r_column.
CASE ls_column-id.
WHEN 'COL3'.'
CREATE OBJECT lr_dropdown EXPORTING selected_key_fieldname = 'COL3''.
CALL METHOD lr_dropdown->set_read_only EXPORTING value = abap_false.
CALL METHOD lr_dropdown->set_valueset_fieldname EXPORTING value = 'VALUESET_COL3''.
CALL METHOD lr_dropdown->set_type EXPORTING value = if_salv_wd_c_uie_drdn_by_index=>type_key_value.
CALL METHOD lr_column->set_cell_editor EXPORTING value = lr_dropdown.
endcase.
So if i write records in table and bind node1, in the dropdownlist I'll find the value; but the alv is editable so first time I have no records to bind to node1 and the dropdown is empty; VALUESET_COL3 and COL3 are in the same context.
Is it possible to set valueset to an attribute VALUESET_NEW from an attribute of context so that the dropdown is full?
CONTEXT
-
VALUESET_NEW type WDR_CONTEXT_ATTR_VALUE_LIST
node1
-- col1 type char20,
-- col2 type char30,
-- col3 type char3,
--VALUESET_COL3 type WDR_CONTEXT_ATTR_VALUE_LIST.
I hope to been clear as possible, thank you
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.