cancel
Showing results for 
Search instead for 
Did you mean: 

WDA ALV Dropdown by key - Value in Cell vs. Text

Head_CCC
Explorer
0 Kudos

Hello,

my dropdown is working correctly in the way when I drop it down it shows the value and the text

(1 hot

2 medium

3 cold)

but I want to show just the value 1 or 2 or 3 in the ALV and not hot, medium or cold

any ideas?

Thanks

Bernhard

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bernhard Fink,

Can you elaborate how your getting this value's

for example:- getting from a table (or) from Domain (or) hard coded.

anyway try this code.

data value_set type wdr_context_attr_value_list.

   data value     type wdr_context_attr_value.

   value-value = 'hot'.

   value-text  = '1'.

   insert value into table value_set.

   value-value = 'medium'.

   value-text  = '2'.

   insert value into table value_set.

   value-value = 'cold'.

   value-text  = '3'.

   insert value into table value_set.

   wd_context->get_node_info( )->set_attribute_value_set(

       name      = 'ATTRIBUTE_NAME'

       value_set = value_set

   ).

Head_CCC
Explorer
0 Kudos

Hi Madhu,

that's exactly my code - domain values but I have to exclude some so it's hardcoded and I want to use the dropdown functionality instead of the f4 help.

thanks for replying.

Bernhard

Former Member
0 Kudos

data value_set type wdr_context_attr_value_list.

   data value     type wdr_context_attr_value.

   value-value = 'hot'.

   value-text  = '1'.

   insert value into table value_set.

   value-value = 'medium'.

   value-text  = '2'.

   insert value into table value_set.

   value-value = 'cold'.

   value-text  = '3'.

   insert value into table value_set.

   wd_context->get_node_info( )->set_attribute_value_set(

       name      = 'ATTRIBUTE_NAME'

       value_set = value_set

   ).

if your using in this way in drop down you can see 1, 2, 3 instead of hot, medium and cold.

but i hope your using in this way

   value-value = '1'.

   value-text  = 'hot'.

   insert value into table value_set.

   value-value = '2'.

   value-text  = 'medium'.

   insert value into table value_set.

   value-value = '3'.

   value-text  = 'cold'.

   insert value into table value_set.

   wd_context->get_node_info( )->set_attribute_value_set(

       name      = 'ATTRIBUTE_NAME'

       value_set = value_set

   ).

Head_CCC
Explorer
0 Kudos

Hi Madhu,

as mentioned I have no problem with the drop down

as you can see I show the value and the text - my probem is that the text "this is H" is displayed in the ALV


wa_value_set-text = 'this is H'.

wa_value_set-value = 'H'.

append wa_value_set tO lt_value_set.

wa_value_set-text = 'this is B'.

wa_value_set-value = 'B'.

append wa_value_set tO lt_value_set.

thanks

Bernhard