<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Set Handler for Protected Event in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-for-protected-event/m-p/3042325#M720073</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;       I have a requirement to use a protected event of a class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do so i declared an event handler class which inherits the main class. The event to be handled is a protected event of the main class. So i declared the method to handle the event in the protected section of the hander class ( which as mentioned before inherits the main class ). &lt;/P&gt;&lt;P&gt;When i go for set handler it says event is unknonwn / protected / private. Its true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how to set handler for protected events of main class in handler class which inherits the main class.&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the code here with.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;  Include           ZMM208_CLS                                       *
*&amp;amp;---------------------------------------------------------------------*


*----------------------------------------------------------------------*
*       CLASS lcl_event_receiver_maingrid DEFINITION
*----------------------------------------------------------------------*
*   Event Handler Class for Events of Main Grid ( CL_GUI_ALV_GRID )    *
*----------------------------------------------------------------------*
CLASS lcl_event_receiver_maingrid DEFINITION INHERITING FROM cl_gui_alv_grid.

  PUBLIC SECTION.

    METHODS
        handle_butn_click
             FOR EVENT button_click OF cl_gui_alv_grid
                IMPORTING es_row_no.
    METHODS
        handle_data_changed
           FOR EVENT data_changed OF cl_gui_alv_grid
              IMPORTING er_data_changed.
    METHODS
       lcl_event_receiver_maingrid .


*  PRIVATE SECTION.

  PROTECTED SECTION.
    METHODS
     handle_click
        FOR EVENT click_row_col OF cl_gui_alv_grid
            IMPORTING row_id.

ENDCLASS.                    "lcl_event_receiver_maingrid DEFINITION

DATA: event_recvr_maingrid TYPE REF TO lcl_event_receiver_maingrid.

*----------------------------------------------------------------------*
*       CLASS lcl_event_receiver_top_left IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_event_receiver_maingrid IMPLEMENTATION.
  METHOD lcl_event_receiver_maingrid.
*    set HANDLER event_recvr_maingrid-&amp;gt;click_row_col
*                                                FOR main_grid.
  ENDMETHOD.                    "lcl_event_receiver_maingrid
  METHOD handle_butn_click.
    PERFORM set_arrow USING es_row_no-row_id.
    PERFORM set_header.

  ENDMETHOD.                    "handle_butn_click

  METHOD handle_data_changed.
    PERFORM handle_data_changed USING er_data_changed.
    PERFORM set_arrow USING ls_mod_cell-row_id.
  ENDMETHOD.                    "handle_data_changed

* method handle_data_changed_finished.
* ENDMETHOD.

  METHOD handle_click.
    PERFORM set_arrow USING row_id.
  ENDMETHOD.                    "handle_click
ENDCLASS.                  "handle_btn_click
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Narayanan K N&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Oct 2007 06:40:50 GMT</pubDate>
    <dc:creator>KN-Nampoothiry</dc:creator>
    <dc:date>2007-10-26T06:40:50Z</dc:date>
    <item>
      <title>Set Handler for Protected Event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-for-protected-event/m-p/3042325#M720073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;       I have a requirement to use a protected event of a class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do so i declared an event handler class which inherits the main class. The event to be handled is a protected event of the main class. So i declared the method to handle the event in the protected section of the hander class ( which as mentioned before inherits the main class ). &lt;/P&gt;&lt;P&gt;When i go for set handler it says event is unknonwn / protected / private. Its true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how to set handler for protected events of main class in handler class which inherits the main class.&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the code here with.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;  Include           ZMM208_CLS                                       *
*&amp;amp;---------------------------------------------------------------------*


*----------------------------------------------------------------------*
*       CLASS lcl_event_receiver_maingrid DEFINITION
*----------------------------------------------------------------------*
*   Event Handler Class for Events of Main Grid ( CL_GUI_ALV_GRID )    *
*----------------------------------------------------------------------*
CLASS lcl_event_receiver_maingrid DEFINITION INHERITING FROM cl_gui_alv_grid.

  PUBLIC SECTION.

    METHODS
        handle_butn_click
             FOR EVENT button_click OF cl_gui_alv_grid
                IMPORTING es_row_no.
    METHODS
        handle_data_changed
           FOR EVENT data_changed OF cl_gui_alv_grid
              IMPORTING er_data_changed.
    METHODS
       lcl_event_receiver_maingrid .


*  PRIVATE SECTION.

  PROTECTED SECTION.
    METHODS
     handle_click
        FOR EVENT click_row_col OF cl_gui_alv_grid
            IMPORTING row_id.

ENDCLASS.                    "lcl_event_receiver_maingrid DEFINITION

DATA: event_recvr_maingrid TYPE REF TO lcl_event_receiver_maingrid.

*----------------------------------------------------------------------*
*       CLASS lcl_event_receiver_top_left IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_event_receiver_maingrid IMPLEMENTATION.
  METHOD lcl_event_receiver_maingrid.
*    set HANDLER event_recvr_maingrid-&amp;gt;click_row_col
*                                                FOR main_grid.
  ENDMETHOD.                    "lcl_event_receiver_maingrid
  METHOD handle_butn_click.
    PERFORM set_arrow USING es_row_no-row_id.
    PERFORM set_header.

  ENDMETHOD.                    "handle_butn_click

  METHOD handle_data_changed.
    PERFORM handle_data_changed USING er_data_changed.
    PERFORM set_arrow USING ls_mod_cell-row_id.
  ENDMETHOD.                    "handle_data_changed

* method handle_data_changed_finished.
* ENDMETHOD.

  METHOD handle_click.
    PERFORM set_arrow USING row_id.
  ENDMETHOD.                    "handle_click
ENDCLASS.                  "handle_btn_click
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Narayanan K N&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2007 06:40:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-for-protected-event/m-p/3042325#M720073</guid>
      <dc:creator>KN-Nampoothiry</dc:creator>
      <dc:date>2007-10-26T06:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set Handler for Protected Event</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-for-protected-event/m-p/3042326#M720074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think there is some problem with the ques, tats Y no attempts to answer.&lt;/P&gt;&lt;P&gt;The requirement was addressed in another way.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Mar 2009 03:29:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-for-protected-event/m-p/3042326#M720074</guid>
      <dc:creator>KN-Nampoothiry</dc:creator>
      <dc:date>2009-03-01T03:29:50Z</dc:date>
    </item>
  </channel>
</rss>

