<?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 Re: Class Event Error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085021#M432864</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is my local class&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Apr 2007 08:08:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-09T08:08:47Z</dc:date>
    <item>
      <title>Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085018#M432861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;*----------------------------------------------------------------------*
***INCLUDE MZTEST_CLASS .
*----------------------------------------------------------------------*

DATA gr_event_handler TYPE REF TO lcl_event_handler .
.. ..
*--Creating an instance for the event handler
CREATE OBJECT gr_event_handler .
*--Registering handler methods to handle ALV Grid events
SET HANDLER gr_event_handler-&amp;gt;handle_double_click FOR gr_alvgrid .

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;       Class LCL_EVENT_HANDLER
*&amp;amp;---------------------------------------------------------------------*
*        Text
*----------------------------------------------------------------------*
CLASS lcl_event_handler DEFINITION.
  PUBLIC SECTION .
    METHODS:
*--Double-click control
      handle_double_click
      FOR EVENT double_click OF cl_gui_alv_grid
      IMPORTING e_row e_column.
ENDCLASS.               "LCL_EVENT_HANDLER
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;       Class (Implementation)  lcl_event_handler
*&amp;amp;---------------------------------------------------------------------*
*        Text
*----------------------------------------------------------------------*
CLASS lcl_event_handler IMPLEMENTATION.
--Handle Double Click
  METHOD handle_double_click .
    PERFORM handle_double_click USING e_row es_row_no .
  ENDMETHOD .                    "handle_double_click
ENDCLASS.               "lcl_event_handler&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the below error for the above code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;The type "LCL_EVENT_HANDLER" is unknown.&amp;lt;/b&amp;gt;	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u guys help me out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 07:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085018#M432861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T07:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085019#M432862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Check whether the handler LCL_EVENT_HANDLER was declared as PUBLIC or not?May be it declared as Private or protected..that's why it says here that it is not known.&lt;/P&gt;&lt;P&gt;change it to PUBLIC and see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;ANJI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 07:55:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085019#M432862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T07:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085020#M432863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear anji&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you tell me in detail where it has to be declared Public is there any error in the given code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 08:02:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085020#M432863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T08:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085021#M432864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is my local class&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 08:08:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085021#M432864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T08:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085022#M432865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 08:58:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085022#M432865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T08:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085023#M432866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have these statements at last instead of first:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA gr_event_handler TYPE REF TO lcl_event_handler .&lt;/P&gt;&lt;P&gt;.. ..&lt;/P&gt;&lt;P&gt;*--Creating an instance for the event handler&lt;/P&gt;&lt;P&gt;CREATE OBJECT gr_event_handler .&lt;/P&gt;&lt;P&gt;*--Registering handler methods to handle ALV Grid events&lt;/P&gt;&lt;P&gt;SET HANDLER gr_event_handler-&amp;gt;handle_double_click FOR gr_alvgrid .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;use this statement at first:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Predefine a local class for event handling to allow the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;declaration of a reference variable before the class is defined.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLASS lcl_event_receiver DEFINITION DEFERRED.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Ravi Kanth Talagana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 09:01:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085023#M432866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T09:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085024#M432867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have put those lines in the last now i got this error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Statement is not accessible.		&lt;/P&gt;&lt;P&gt; at line CREATE OBJECT gr_event_handler .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*----------------------------------------------------------------------*
***INCLUDE MZVENDOR_CLASS .
*----------------------------------------------------------------------*

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;       Class LCL_EVENT_HANDLER
*&amp;amp;---------------------------------------------------------------------*
*        Text
*----------------------------------------------------------------------*
CLASS lcl_event_handler DEFINITION .
  PUBLIC SECTION .
    METHODS:
*--Double-click control
      handle_double_click
      FOR EVENT double_click OF cl_gui_alv_grid
      IMPORTING e_row e_column.
  PRIVATE SECTION.
ENDCLASS.               "LCL_EVENT_HANDLER
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;       Class (Implementation)  lcl_event_handler
*&amp;amp;---------------------------------------------------------------------*
*        Text
*----------------------------------------------------------------------*
CLASS lcl_event_handler IMPLEMENTATION.
*--handle double click
  METHOD handle_double_click .
    PERFORM handle_double_click USING e_row e_column .
  ENDMETHOD .                    "handle_double_click
ENDCLASS.               "lcl_event_handler

DATA gr_event_handler TYPE REF TO lcl_event_handler .
CREATE OBJECT gr_event_handler .
SET HANDLER gr_event_handler-&amp;gt;handle_double_click FOR gr_alvgrid .


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 10:10:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085024#M432867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T10:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085025#M432868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try my second suggestion?&lt;/P&gt;&lt;P&gt;Follow the code in BCALV_GRID_05 program.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 10:13:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085025#M432868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T10:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085026#M432869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The error is occuring at the declaration&lt;/P&gt;&lt;P&gt;DATA gr_event_handler TYPE REF TO lcl_event_handler &lt;/P&gt;&lt;P&gt;this is the include program, So in this include you are creating a object &lt;/P&gt;&lt;P&gt;gr_event_handler with reference to &amp;lt;b&amp;gt;lcl_event_handler&amp;lt;/b&amp;gt; which wasmight have declared in the main program. check for the definition of that.&lt;/P&gt;&lt;P&gt;in which class/interface it was defined?&lt;/P&gt;&lt;P&gt;Since you are using in this include, for this include it is unknown, so the error is occuring. check the main program..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;ANJI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 10:20:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085026#M432869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T10:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085027#M432870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***INCLUDE MZTEST_CLASS .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CLASS lcl_event_handler DEFINITION DEFERRED.  &amp;lt;&amp;lt;---- Add this line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA gr_event_handler TYPE REF TO lcl_event_handler .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, go on and declare the class. You can instantiate the class only once you have declared it. So, "Create Object " should come after the class definition and implementation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 10:50:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085027#M432870</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T10:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Class Event Error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085028#M432871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2007 11:31:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-event-error/m-p/2085028#M432871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-09T11:31:18Z</dc:date>
    </item>
  </channel>
</rss>

