Skip to Content
0
Former Member
Dec 19, 2006 at 01:48 PM

Toogle disabled\enabled for ALV OO toolbar pushbuttons

139 Views

Hello,

I have defined some custom pushbuttons for my ALV grid in this way:

METHOD handle_toolbar. " Event handler method for event toolbar.

CONSTANTS: " Constants for button type.

c_button_normal TYPE i VALUE 0,

c_separator TYPE i VALUE 3.

DATA:

ls_toolbar TYPE stb_button.

MOVE c_separator TO ls_toolbar-butn_type.

APPEND ls_toolbar TO e_object->mt_toolbar.

CLEAR ls_toolbar.

CLEAR ls_toolbar.

MOVE 'CHANGE' TO ls_toolbar-function.

MOVE icon_change TO ls_toolbar-icon.

MOVE 'Change' TO ls_toolbar-quickinfo.

MOVE 'Change' TO ls_toolbar-text.

MOVE ' ' TO ls_toolbar-disabled.

APPEND ls_toolbar TO e_object->mt_toolbar.

CLEAR ls_toolbar.

MOVE c_separator TO ls_toolbar-butn_type.

APPEND ls_toolbar TO e_object->mt_toolbar.

CLEAR ls_toolbar.

MOVE 'SAVE' TO ls_toolbar-function.

MOVE icon_system_save TO ls_toolbar-icon.

MOVE 'Save' TO ls_toolbar-quickinfo.

MOVE 'Save' TO ls_toolbar-text.

MOVE 'X' TO ls_toolbar-disabled.

APPEND ls_toolbar TO e_object->mt_toolbar.

ENDMETHOD. "handle_toolbar

I would like to enable the SAVE button when the CHANGE button is clicked and to disable the CHANGE button.

How can I do that?