on 11-02-2010 8:40 PM
In my web dynpro component I have created a drop down value list for a particular field based on a check table in the data dictionary. Is there a way to have the key value and description both displayed in the drop down list at the same time?
For example, the field has valid values of
AA American Airlines
AB Air Berlin
AC Air Canada
etc....
But when I click on the drop list I only see
American Airlines
Air Berlin
Air Canada
etc...
The business users have asked to see the list display both values, not just the decription.
Is this possible? If so, how?
Thanks,
Brad,
Unfortunately you have to build this yourself. So when you are populating the drop down list you'll need to concatenate the Key and Description into the description field.
Cheers,
Neil.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately you have to build this yourself. So when you are populating the drop down list you'll need to concatenate the Key and Description into the description field.
which means either populating the value list held against the attribute info (if you are using a dropdown by key) or building a node to store the list (if using dropdown by list).
Chris
Thanks for the feedback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
May be this will help you. U can also use an internal table to fetch the values from respective table then use loop to populate the list from internal table
DATA lo_nd_abcdTYPE REF TO if_wd_context_node.
DATA NODE_abcd TYPE REF TO if_wd_context_node_info.
DATA ls_abcd TYPE wd_this->element_bkpf.
DATA wd_node_info TYPE REF TO if_wd_context_node_info.
DATA value_set TYPE wdr_context_attr_value_list.
DATA wa_value_set TYPE wdr_context_attr_value.
DATA lv_text TYPE String.
lo_nd_abcd= wd_Context->get_child_node( Name = IG_COMPONENTCONTROLLER=>wdctx_abcd ).
NODE_abcd = lo_nd_abcd->get_node_info( ).
*LOOP AT itab INTO wa_tab.
CONCATENATE wa_tab-element ' your text' INTO lv_text.
wa_value_set-value = wa_tab-element.
wa_value_set-text = lv_text.
*insert wa_value_set into table value_set.
*endloop.
wa_value_set-value = '1234'.
CONCATENATE wa_value_set-value 'your text ' INTO lv_text.
wa_value_set-text = lv_text
insert wa_value_set into table value_set.
wa_value_set-value = '12'.
CONCATENATE wa_value_set-value 'your text ' INTO lv_text.
wa_value_set-text = lv_text.
insert wa_value_set into table value_set.
wa_value_set-value = '34'.
CONCATENATE wa_value_set-value 'your text ' INTO lv_text.
wa_value_set-text = lv_text.
insert wa_value_set into table value_set.
NODE_abcd->set_attribute_value_set( name = ELEMENT value_set = value_set ).
Vishesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.