on 01-20-2008 11:05 AM
Hi All,
My requirement is:
i have a dropdown in table ui element . before i do a bind_table with context , my dropdown should be loaded.
how to do this ??
pls help me with sample code.
thanks,
Hema.
Hi Hema Sundar,
You just need to create an Attribute in your context node and bind it to the
SelectedKey property of the dropdown.
Populate the value of the attribute when you are fetching data to fill in
your internal table.
Also If you want to populate data into the dropdown on your own
you can refer to the below code
data:
lr_node type ref to if_wd_context_node,
lr_node_info type ref to if_wd_context_node_info,
lt_nv type wdr_context_attr_value_list,
ls_nv type wdr_context_attr_value.
lr_node = wd_context->get_child_node( if_componentcontroller=>wdctx_element ).
lr_node_info = lr_node->get_node_info( ).
build lt_nv ...
lr_node_info->set_attribute_value_set(
name = 'ATTRIBUTE'
value_set = lt_nv ).
Hope this helps.
Regards,
Ismail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
completed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hema.
You can do it 2 ways: DropDownByKey and DropDownByIndex.
For this first one, you can bind the values to the context node's attribute in the Component Controller Init method, or View Init method as follows:
lo_nd_info->set_attribute_value_set( name = <att_name>
value_set = lt_value ).
where lt_value is of type wdy_key_value_table.
Eg:
lo_nd_info = wd_context->get_node_info( ).
lo_nd_info = lo_nd_info->get_child_node( 'N0' ).
lo_nd_info->set_attribute_value_set( name = 'ATT1_DDBYKEY'
value_set = lt_value ).
If you use DropDownByIndex, you need to bind values using bind_table only in the INIT method.
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.