Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

regarding radio button in oops alv

Former Member
0 Kudos

hi friends,

i need to place a radiobutton in front of each record of an alv grid which is displayed using oops

thank u

urmila

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

did you check this

5 REPLIES 5

Former Member
0 Kudos

Check this , this is for checkbox just try for radiobutton

Hi,

I hope the below link can help you.

For checkbox.

You can also use the below code for buttons.

*----

-


form change_toolbar.

§1.Get toolbar instance of your ALV Tree.

When you instantiate an instance of CL_GUI_ALV_TREE the constructor

of the base class (CL_ALV_TREE_BASE) creates a toolbar.

Fetch its reference with the following method if you want to

modify it:

call method g_alv_tree->get_toolbar_object

importing

er_toolbar = g_toolbar.

check not g_toolbar is initial. "could happen if you do not use the

"standard toolbar

§2.Modify toolbar with methods of CL_GUI_TOOLBAR:

add seperator to toolbar

call method g_toolbar->add_button

exporting

fcode = ''

icon = ''

butn_type = cntb_btype_sep.

add Standard Button to toolbar (for Delete Subtree)

call method g_toolbar->add_button

exporting

fcode = 'DELETE'

icon = '@11@'

butn_type = cntb_btype_button

text = ''

quickinfo = text-901. "Delete subtree

endform.

********************************************************************

Please check the Sample demo program to Handle the events

SALV_DEMO_TABLE_EVENTS

Regards,

Midhun Abraham

Edited by: Midhun Abraham on Oct 8, 2008 7:02 AM

former_member188685
Active Contributor
0 Kudos

did you check this

0 Kudos

hi vijay,

i checked that document ...but its adding 3 radiobuttons for single record i need like this.....

( ) Yes, my question has been answered.

( ) No, my question has not been answered yet.

i need to select any one of them

0 Kudos

yes you can do this. Radiobutton functionality we can bring here, at a time you can select only one. if a radio button selected of a row then other rows radiobutton will be unselected. that we need to code inside the USER_COMMAND. that is possible.

you start with the post mentioned above, and proceed.

uwe_schieferstein
Active Contributor
0 Kudos

Hello Urmila

You may have a look at my Wiki posting [ALV Grid List Using Radio Buttons |https://wiki.sdn.sap.com/wiki/display/Snippets/ALVGridListUsingRadio+Buttons]

However, why do you need a SINGLE radiobutton at all?

Because this means the user is allowed to select a single row only and not multiple rows.

In this case you should just set GS_LAYOUT-SEL_MODE = space to suppress the MARK column at the left border of the ALV grid.

Regards

Uwe