Skip to Content
0
Jul 15, 2008 at 03:24 PM

CL_SALV_TABLE - raising ALV reference in events

1193 Views

Hi!

I would like to have the reference to the raising CL_SALV_TABLE object in implementation of the event-handling method ON_ADDED_FUNCTIONS (or any other).

If I want to handle events with CL_SALV_TABLE, I go like this:

DATA: r_events TYPE REF TO cl_salv_events_table,
      r_alv    TYPE REF TO cl_salv_table.
...
r_events = r_alv->get_event( ).
SET HANDLER lcl_handler=>on_added_functions FOR r_events.
...
CLASS lcl_handler DEFINITION.
  METHODS on_added_functions FOR EVENT added_functions OF cl_salv_events_table IMPORTING e_salv_function_sender sender.
...

With CL_GUI_ALV_GRID events, I would use the inherent SENDER event parameter as reference to the raising object. However, here the SENDER contains reference to the useless R_EVENTS object, not R_ALV. I am not sure, but it seems to me that connection to R_ALV is lost here.

Does anyone know better?

Thanks in advance!

Regards,

Igor