Skip to Content
0
Former Member
Nov 24, 2009 at 10:18 AM

Enable/Disable custom button on Lead Selection of ALV

163 Views

Hi Experts,

I have a requrirement where I have made custom Buttons in ALV . By Default the buttons are set disabled and I want to enable buttons on Lead Selection of ALV.

I have used this code in WD Donit to make custom button and by default set it disable :

data:lr_function type ref to cl_salv_wd_function,

lr_toggle_button type ref to cl_salv_wd_fe_button.

lr_function = l_value->if_salv_wd_function_settings~create_function(

id = 'S' ).

create object lr_toggle_button.

lr_toggle_button->set_text( 'SAVE' ).

lr_toggle_button->SET_ENABLED( abap_false ).

lr_function->set_editor( value = lr_toggle_button ).

How to make this custom button enable only on Lead Selection ?