cancel
Showing results for 
Search instead for 
Did you mean: 

reg:radiobutton group by index

Former Member
0 Kudos

hi all

i have used radiobutton group by index in my layout .

Data : v_Element type ref to If_Wd_Context_Element,
         Items_node type ref to If_Wd_Context_node,
         v_Index type i,
         v_Text type string,
         itemList type STANDARD TABLE OF IF_MAIN=>ELEMENT_radiogroup,
         w_list LIKE LINE OF itemList.

* Appending elements to "itemList"
w_list-ebeln = 'Blue'.
     append w_list to itemList.
w_list-ebeln = 'Yellow'.
     append w_list to itemList.
w_list-ebeln = 'Red'.
     append w_list to itemList.
*w_list-ebeln = 'Magenta'.
*     append w_list to itemList.
*w_list-ebeln = 'White'.
*     append w_list to itemList.
*w_list-ebeln = 'Black'.
*     append w_list to itemList.

Items_node = wd_Context->get_Child_Node( Name = `RADIOGROUP` ).
Items_node->bind_table( itemList ).
Items_node->SET_LEAD_SELECTION_INDEX( 1 ).
v_Index = Items_node->GET_LEAD_SELECTION_INDEX( ).
clear w_list.
read table itemList into w_list index v_Index.
v_Text = w_list-ebeln.
wd_Context->set_Attribute( exporting value = v_Text  NAME = 'VIEWTEXT'  ).

this is the code what i have written WDDOINT().

and iam able to get radio button with text specified.

but onselect action of radio button i have used below code,the problem the select radio button id is captured in lV_text go to next fireplug step but in my out put iam not bale to see the view of that particular plug,i used 3Viewcontainer by embedding views int it but still i am not getting required out put.

can any one please share their exp on this.

Data : v_Element type ref to If_Wd_Context_Element,
         Items_node type ref to If_Wd_Context_node,
         v_Index type i,
         v_Text type string,
         itemList type STANDARD TABLE OF IF_MAIN=>ELEMENT_radiogroup,
         w_list LIKE LINE OF itemList.

Items_node = wd_Context->get_Child_Node( Name = `RADIOGROUP` ).
items_node->GET_STATIC_ATTRIBUTES_TABLE( importing table = itemList ).
v_Index = Items_node->GET_LEAD_SELECTION_INDEX( ).
clear w_list.
read table itemList into w_list index v_Index.
v_Text = w_list-ebeln.
wd_Context->set_Attribute( exporting value = v_Text  NAME = 'VIEWTEXT'  ).


if v_Text = 'Blue'.
  WD_THIS->FIRE_OUT1TOVIEW1_PLG(
  ).

elseif v_Text = 'Yellow'.

  WD_THIS->FIRE_OUT1TOVIEW2_PLG(
  ).
else.
  WD_THIS->FIRE_OUT1TOVIEW3_PLG(
  ).
endif.

Thanks in advance

Deepika

Accepted Solutions (0)

Answers (1)

Answers (1)

gill367
Active Contributor
0 Kudos
if v_Text = 'Blue'.
  WD_THIS->FIRE_OUT1TOVIEW1_PLG(
  ).
 
elseif v_Text = 'Yellow'.
 
  WD_THIS->FIRE_OUT1TOVIEW2_PLG(
  ).
else.
  WD_THIS->FIRE_OUT1TOVIEW3_PLG(
  ).
endif.

are the out1toview1 and all other plugs mentioned here linked to inbound plugs of respective views.

means have you created the navigation linking of these plugs to the inbound plugs.

thanks

sarbjeet singh

Former Member
0 Kudos

hi

Thanks for ur quick response the issue is resolved by myself.

Thanks and Regards

Deepika