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: 

ALV OO how to identify the grid edited in case of multiple grids.

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos
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,

2 REPLIES 2

former_member188685
Active Contributor
0 Kudos
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,

0 Kudos

Thanks Vijay..

I could now interpret properly..