| Home • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Radio Buttons in the output of an ALVBy 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
Radio button) Below are the steps to display Radio Buttons in
the output of an ALV. a)
Include ICONS.
INCLUDE <icons>. b)
Declare an internal
table with the required fields and additional field called ‘RADIO’ of type CHAR of size ‘4’. c)
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.
OF cl_gui_alv_grid d)
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
follows. *&--------------------------------------------------------------*
WITH KEY radio = icon_radiobutton.
TRANSPORTING radio. e)
Update the RADIO button with empty radio button in
the internal table. Code as follows. f)
While preparing the
field catalogue, Prepare
field catalogue for that additional field ‘RADIO’ as coded below. ls_fieldcat-reptext = 'Radio Button'. g)
Refresh the grid, Perform REFRESH action when
the radio button is selected. * Define local data h)
Please click here for the demo program Output of the Program:
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
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 |
||