on 07-25-2008 8:43 AM
Hi all,
I have a drop-down in a table.......
The values to be filled in it are fetched from a Z-table consisting of two fields.
viz. Id (P.K) and its corresponding description.
I dont want to put a search help since the number of values to be inserted are less,so havepreferred having drop down instead.
My requirements are :-
1.) In drop-down i should see only the description.
2.)Whenever i select any particular value its id should be displayed in my table layout.
(since the description are too lengthy.......i dont want ot display them)
My first requirement is completed wherein i need help on second.
The code i have used to fill in the drop-down programatically is as follows :
Data declaration
DATA i_tab TYPE TABLE OF Z_table.
DATA wa_tab TYPE Z_table.
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.
Filling values in drop-down
SELECT * FROM Z_table INTO TABLE i_tab.
LOOP AT i_tab INTO wa_tab.
MOVE wa_tab-catid TO wa_value_set-text.
MOVE wa_tab_catdesc TO wa_value_set-value.
APPEND wa_value_set TO value_set.
CLEAR wa_value_set.
ENDLOOP.
Setting value in context attribute.
wd_node_info = wd_context->get_node_info( ).
wd_node_info->set_attribute_value_set(
exporting
name = 'DROP_DOWN'
value_set = value_set ).
Any help would be highly appreciated and rewarded.
Thanks in Advance,
Sheetal.
I'm not sure I understand your requirement. You want a DropDown, but you don't want the description to display once selected? That isn't really the way DropDowns work. They are always going to display the description. Perhaps a better fit would be to use an input field with a value help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.