Displaying text and radio button using WebDynpro for ABAP

...Previous    

  1. Switch to tab ACTIONS of view MAINVIEW and double-click method SELECTITEM. Enter the given coding.

method ONACTIONSELECTITEM .

  
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_MAINVIEW=>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'  ).

endmethod.

  1. Save your changes.

 Creating a Web Dynpro Application...  

  1. Click on the Web Dynpro component ZWD_RB_DEMO in the object tree and open the context menu to create a new application.

 

  1. Enter a name (or accept the proposed name) and press Continue (Enter).

 

  1. Save as local object

Activating and running your Application  

  1. Activate all objects.

Select all relevant objects and press Continue (Enter). 

 

  1. To start the application, right click on your WebDynpro application entry and select context menu entry Test

 

A browser will be started to run the WebDypro application. Log on using the same credentials as before.

The result page should look like this: 

 

SAP Online Help

More information on Web Dynpro for ABAP can be found at the SAP Help Portal.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image