on 04-06-2009 6:23 AM
Hi Experts,
I am using dropdown as a table field. For this dropdown I want to display the value as well as description.
In ALV table when we create a dropdown dynamically in table field, there is a method SET_KEY_VISIBLE in class CL_SALV_WD_UIE_DROPDOWN_BY_KEY.
But I think we cannot use similar method for normal dropdown field in table.
Is there any way we can display both value and description in dropdown value set ?
Please help.
Regards,
Anand
Hi,
I think there is no such option. You need to consider one variable type string and while populating the
valueset fill this variable by concatenating the value and description and assign it the key and value
pair of the valueset.
DATA:
lt_value_set_ctry type table of wdr_context_attr_value, " Country/Service Location
lv_str type string.
loop at lit_country into ls_country.
concatenate ls_country-value ls_country-text into lv_str separated by space.
ls_value_set-value = lv_str.
ls_value_set-text = lv_str.
append ls_value_set to lt_value_set_ctry.
clear ls_value_set.
endloop.
lr_node_info->set_attribute_value_set( name = 'COUNTRY'
value_set = lt_value_set_ctry ).
Consider this lit_country is a text table for countries.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.