on 02-18-2009 8:33 AM
Hi,
I have a data element "Field Symbol" and i added data in to it.
Now i need to bind the Data in Field Symbol to a drop-down list.
Can anybody help me out in doing the same????
Regards,
Kanakaraj V A
Hi Kanakaray,
could you please give us a peace of coding. Is your field-symbol a table-type or a structure?
Greez,
Vincent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can refer to the following code which I am using in my component:
data: node_info type ref to if_wd_context_node_info.
data it_T005T type table of T005T.
field-symbols: <TableT005T> type T005T.
data: value type wdy_key_value,
value_set type wdy_key_value_table.
clear value_set.
node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node( 'CN_COUNTRYCODE' ). " CN_COUNTRYCODE is the node name
call method cl_wd_dynamic_tool=>get_table_data
exporting
tab_name = 'T005T'
row_count = 0
importing
data = it_T005T.
loop at it_T005T assigning <TableT005T> .
value-key = <TableT005T>-LAND1.
value-value = <TableT005T>-LANDX.
insert value into table value_set.
endloop.
node_info->set_attribute_value_set( name = 'CA_COUNTRYCODE' value_set = value_set ). "'CA_COUNTRYCODE' is the name of my attribute which is binded with the drop down by key UI element
I hope it helps.
Regards
Arjun
Edited by: Arjun on Feb 18, 2009 2:27 PM
Okay, first you have to create a context node with your dropdown data. When you have filled your table with your dropdown-values you can bind it to this context-node
lo_your_context_node->bind_table( lt_yourtable[] ).
In your view you create a dropdown_by_index - element. Bind it to your context node and everything will be fine.
Hope it helps.
P.S.: okay, take a look at Arjuns example
Edited by: Vincent Merz on Feb 18, 2009 9:56 AM
User | Count |
---|---|
85 | |
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.