Hi,
By default the first radio button will be selected. In WDDOINIT method after populating the radio button texts and binding, Use set_lead_selection_index method to set the default selection.
Try the below code:
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.
lo_nd_radio->bind_table( new_items = lt_radio set_initial_elements = abap_true ).
lo_nd_radio->set_lead_selection_index( 2 ). " Set default selected radio button
" Here I set 2nd radio button by default, you can pass the index which you want the default selecton
Hope this helps u.,
Regards,
Kiran