|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Radio Buttons in the output of an ALV
By Khaja Moulali Shaik, Siemens IT Solutions
As per business need there was a scenario for an ALV
Report Output, It must have functionality selecting only one row at a time. It
is possible with Radio buttons.
NOTE: Here we have two types of Radio buttons Icons i.e. icon_wd_radio_button_empty (Empty Radio Button) and icon_radiobutton (Selected
Below are the steps to display Radio Buttons in
the output of an ALV.
Declare an internal
table with the required fields and additional field called ‘RADIO’ of type CHAR of size ‘4’.
Define a class to
handle an even ‘HOTSPOT_CLICK’ o trigger when we click on the radio button
icon. Definition as coded below.
* Handles the Even when user clicks on any row.
Do the implementation for the same class to handle
the event i.e. if we select a radio button, then the already selected radio
button should be deselect and new radio button should be selected. Code as
WITH KEY radio = icon_radiobutton.
Update the RADIO button with empty radio button in
the internal table. Code as follows.
While preparing the
field catalogue, Prepare
field catalogue for that additional field ‘RADIO’ as coded below.
ls_fieldcat-reptext = 'Radio Button'.
Refresh the grid, Perform REFRESH action when
the radio button is selected.
* Define local data
Output of the Program:
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards