on 10-13-2014 7:30 AM
Hi..
I m new to web dynpro..
In Radio Button Group By Index, three button are coming, In my requirement i need 4 buttons... so any one can tell me how to make it
Thanks
Hi,
By default it shows 3 radio buttons in group in the layout. But it actually depends on how many texts you have added and binded in WDDOINT method, it can be 1,4 5 or any.
Let say, you have created a node 'RADIO' with cardinality 0..n and an attribute (say value) in it. And binded the texts property of radio button group to the attribute Value
Now write the below code in WDDOINT method:
DATA lo_nd_radio TYPE REF TO if_wd_context_node.
DATA lt_radio TYPE wd_this->elements_radio.
DATA ls_radio TYPE wd_this->element_radio.
* navigate from <CONTEXT> to <RADIO> via lead selection
lo_nd_radio = wd_context->get_child_node( name = wd_this->wdctx_radio ).
* Fill Radio Button Texts
ls_radio-value = 'Value1'.
APPEND ls_radio TO lt_radio.
ls_radio-value = 'Value2'.
APPEND ls_radio TO lt_radio.
ls_radio-value = 'Value3'.
APPEND ls_radio TO lt_radio.
ls_radio-value = 'Value4'.
APPEND ls_radio TO lt_radio.
lo_nd_radio->bind_table( new_items = lt_radio set_initial_elements = abap_true ).
Now you need to fill the lt_radio with the number of radio button you need as shown int he above code.
hope this helps
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks kiran
Its worked for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.