cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown displays value not text

Former Member
0 Kudos

Hi

Is there a way to see the text of the dropdown (by key) not the value in my alv?

BR

Andreas

Accepted Solutions (0)

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

When you use dropdownbykey you see only text not the key.

I think while setting the ValueSet you have given both keys for value and Text columns, check it

Abhi

Former Member
0 Kudos

I believe i have done this. For selection i see the text. But if it is selected i only see the value.


...
data lr_dropdown type ref to cl_salv_wd_uie_dropdown_by_key.
create object lr_dropdown exporting selected_key_fieldname = column-id.
column-r_column->set_cell_editor( lr_dropdown ).

data: lt_valueset type table of wdr_context_attr_value,
ls_valueset type wdr_context_attr_value,
lr_node type ref to if_wd_context_node,
lr_nodeinfo type ref to if_wd_context_node_info.

lr_node = wd_context->get_child_node( 'DATA' ).
lr_nodeinfo = lr_node->get_node_info( ).

ls_valueset-value = '1'.
ls_valueset-text  = 'TESTO'.
append ls_valueset to lt_valueset.
lr_nodeinfo->set_attribute_value_set(
exporting
name = column-id
value_set = lt_valueset ).
...

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Strange, Looks ok for me.

check other standard component's dropdownbykey ( WDR_TEST_EVENTS )

I am working on SP10 it is doing good

Abhi

Former Member
0 Kudos

strange indeed.

how can i get the class of an ui elment in the layout?

drop down in general behave like i want. like in demo_uiel_dropdown_by_key

maybe it's because of the alv?

Edited by: Andreas Gschwendt on Jul 23, 2008 3:22 PM

Edited by: Andreas Gschwendt on Jul 23, 2008 3:23 PM

Former Member
0 Kudos

i have tested my code on another machine. SP13 and it's ok.

The other one is SP14. Maybe i have to check the oss.

Former Member
0 Kudos

no solution in oss

Former Member
0 Kudos

ok i found a solution.

my attribute for the node had a type (the type for the value), i have changed the attribute type to string and now it is behaving like it should.

a bug?