cancel
Showing results for 
Search instead for 
Did you mean: 

Field Symbols

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kanakaray,

could you please give us a peace of coding. Is your field-symbol a table-type or a structure?

Greez,

Vincent

Former Member
0 Kudos

Hi Vincent,

I need help for both structure and table type.

FIELD-SYMBOLS: <fs_org_unit> TYPE zsrt_st_org_unit, -> Structure

<fs_bus_unit> TYPE zsrt_bus_unit, -> Table type

<fs_serv_type> TYPE zsrt_serv_type.

arjun_thakur
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Answers (0)