Code: Alles auswählen.
CLASS lcl_event_receiver DEFINITION DEFERRED.
DATA: z_event_receiver TYPE REF TO lcl_event_receiver.
*---------------------------------------------------------------------*
* CLASS lcl_event_receiver DEFINITION
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
* Ereignis Datenänderung
METHODS z_handle_data_changed FOR EVENT data_changed
OF cl_gui_alv_grid
IMPORTING er_data_changed.
ENDCLASS.
*---------------------------------------------------------------------*
* CLASS lcl_event_receiver IMPLEMENTATION
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
CLASS lcl_event_receiver IMPLEMENTATION.
* Ereignis Datenänderung
METHOD z_handle_data_changed.
DATA: l_cells TYPE lvc_t_modi ,
wa_cells TYPE lvc_s_modi .
l_cells = er_data_changed->mt_mod_cells .
LOOP AT l_cells INTO wa_cells.
IF wa_cells-fieldname EQ 'dein Feld' .
IF wa_cells-value GT 5 .
"PopUp aufrufen
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
Code: Alles auswählen.
* Edit-Event registrieren
CALL METHOD z_grid->register_edit_event
EXPORTING i_event_id = 18 .
* Behandler registrieren
CREATE OBJECT z_event_receiver.
SET HANDLER z_event_receiver->z_handle_data_changed
FOR z_grid.