on 06-06-2008 1:19 PM
Hi experts,
I need insert a Drop Down By Key into a Table, in a WebDynpro application.
I have created a node (cardinality 0...1) which has all fields that I have to populate in the table. The table only must show one row.
I think that I must create a SubNode (cardinality 0...n) into the other Node to map this with my DropDown, but I'm not sure.
Could anybody tell me how can I add a Drop Down By Key into a Table?
Thanks in Advance!
Lucas
The process is no different than if the DDBK was used outside a table. You don't need another context node for the values. You would just set them into the Node Info of the node for your table using the IF_WD_CONTEXT_NODE_INFO=>SET_ATTRIBUTE_VALUE_SET method call. Something like the following:
data l_activities type zpm_activity_typ_tbl.
l_activities = wd_assist->read_all_activities( ).
data lt_valueset type wdr_context_attr_value_list.
field-symbols <wa_act> like line of l_activities.
field-symbols <wa_vs> like line of lt_valueset.
loop at l_activities assigning <wa_act>.
append initial line to lt_valueset assigning <wa_vs>.
<wa_vs>-value = <wa_act>-activity_type.
<wa_vs>-text = <wa_act>-activity_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 = 'ACTIVITY_TYPE'
value_set = lt_valueset ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Thomas,
Your response is very useful.
Kind Regards,
Lucas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.