on 02-02-2007 10:28 AM
Hi all,
I am new to ABAP Dynpro. I am working on object where two radio buttons needs to be clubbed in a radio button group by index. How do we assign a particular radio butto to a group? Can anyone help me with step by step code for the same requirement. Its urgent.
Thanks in advance.
Hi darshna,
also check out this blog.
/people/thomas.szcs/blog/2006/07/24/basic-concepts--selection-vs-leadselection
cheers!
Ashish.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Darshna,
Since its Dropbyindex, you need to populate the node and the attribute with all tha values that u want to display in the context, before the view is rendered..
some pointers:
- use UI Element RadioButtonGroupByIndex and bind the texts property of this UI element with a particular Context Attribute.
- the node should not have a ddic type, but ya' the attribute can be from a particular table.
-now u should populate the node with the values that you want to diaplay.
some code snippet:
DATA:
lr_node TYPE REF TO if_wd_context_node,
lt_value_set TYPE wdy_key_value_table.
lr_node = wd_context->get_child_node(
name = if_componentcontroller=>wdctx_<your_node_name>).
- now fetch the data you want to display into an internal table(lt_value_set.). it should have 2 fields, one as value and the other as text.
You would see the text in the drop down and whichever text you select the corrosponding values would be stored in the context.
-Populate the node with the data.
CALL METHOD lr_node->bind_table
EXPORTING
new_items = lt_value_set.
************************************************************************************************
dynamically assigning values to the attributes meta data (Type). ie binding the values to a particular attribute.
************************************************************************************************
DATA: lr_node_info TYPE REF TO if_wd_context_node_info.
CALL METHOD lr_node->get_node_info
RECEIVING
node_info = lr_node_info.
CALL METHOD lr_node_info->set_attribute_value_set
EXPORTING
name = '<your_context_attribute>'
value_set = lt_value_set.
This code should be written in the wddoinit of the view controller or the component controller.
Hope this helps.
Cheers!
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Need more info about this. Are you trying to do this dynamically???
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for giving your time. Actually I am not doing it dynamically. My requirement is I have two radio buttons and I need to select one radio button and then click on one push button, so that it should take you to another page. Now at a time only one radio button should be pressed. Also by default one radio button should be pressed. I hope I am clear now. Kindly answer this que.asap. Thanks alot.
User | Count |
---|---|
86 | |
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.