10-15-2008 3:56 PM
I am using OO-based ALV (CL_GUI_ALV_GRID) and defining the event handler method for DATA_CHANGED. Added the optional parameter SENDER to the definition of the event handler:
public section.
methods:
handle_data_changed
for event data_changed of cl_gui_alv_grid
importing
er_data_changed
SENDER. " control that raised the event !!!
Within the event handler method I am using to distinguish between grids
METHOD handle_data_changed.
CASE sender.
WHEN go_grid1.
WHEN go_grid2.
ENDCASE.
ENDMETHOD.
Now when i see in debugging for sender the value i am get as 217<CL_GUI_ALV_GRID> ..as such...
i.e., i am getting three digit number followed by <CL_GUI_ALV_GRID>..
can any one guide me how to intrepret this or proper apporach
on this?
My aim to find the grid clicked on..
Edited by: ksiva on Oct 15, 2008 8:41 PM
10-15-2008 4:18 PM
CASE sender. "Sender hold the current Grid object reference
WHEN go_grid1. "<--- go_grid1 is object pointing to grid1
WHEN go_grid2. "<--go_grid2 is object pointing to grid1
ENDCASE.
at the time of checking when you are editing grid1 then sender will hold the same object as go_grid1.
so what is the problem you are facing now..? the approach you are using is correct one only,
10-15-2008 4:18 PM
CASE sender. "Sender hold the current Grid object reference
WHEN go_grid1. "<--- go_grid1 is object pointing to grid1
WHEN go_grid2. "<--go_grid2 is object pointing to grid1
ENDCASE.
at the time of checking when you are editing grid1 then sender will hold the same object as go_grid1.
so what is the problem you are facing now..? the approach you are using is correct one only,
10-15-2008 4:26 PM