on 06-26-2008 5:38 AM
Hi All.
In my screen i have a drop down field .to this i have to give the hard coded values .and selected value is the input for me to get the data from the backend.
How can i give the hard coded values to that field & how can i get the selected value into that.........
Plz help me to resolve this.......
Regards,
ravi
DATA: lr_node type ref to if_wd_context_node.
data: lr_info type ref to if_wd_context_node_info.
data: lt_valueset type WDR_CONTEXT_ATTR_VALUE_LISTGEN.
data: ls_valueset type line of WDR_CONTEXT_ATTR_VALUE_LISTGEN.
ls_valueset-value = '1'.
ls_valueset-text = 'first option'.
append ls_valueset to lt_valueset.
ls_valueset-value = '2'.
ls_valueset-text = 'second option'.
append ls_valueset to lt_valueset.
lr_node = wd_context->get_child_node( '<Attribute node which is binded to Dropdown' ).
lr_info = lr_node->get_node_info( ).
lr_info->SET_ATTRIBUTE_VALUE_SET( name = '<attribute name binded to dropdown>'
value_set = lt_valueset ).
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wouldn't use WDR_CONTEXT_ATTR_VALUE_LISTGEN. Use wdr_context_attr_value_list instead:
data l_topics type zpm_main_topic_tbl.
l_topics = wd_assist->read_all_topics( ).
data lt_valueset type wdr_context_attr_value_list.
field-symbols <wa_topic> like line of l_topics.
field-symbols <wa_vs> like line of lt_valueset.
loop at l_topics assigning <wa_topic>.
append initial line to lt_valueset assigning <wa_vs>.
<wa_vs>-value = <wa_topic>-main_topic.
<wa_vs>-text = <wa_topic>-main_topic_desc.
endloop.
data lo_nd_meeting type ref to if_wd_context_node.
* navigate from <CONTEXT> to <MEETING> via lead selection
lo_nd_meeting = wd_context->get_child_node( name = wd_this->wdctx_meeting ).
data lo_node_info type ref to if_wd_context_node_info.
lo_node_info = lo_nd_meeting->get_node_info( ).
lo_node_info->set_attribute_value_set(
name = 'MAIN_TOPIC'
value_set = lt_valueset ).
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
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.