<?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: ALV using OOPS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573099#M1271248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA :  w_eventrec TYPE REF TO lcl_event_receiver "lcl_event_receiver is your class where hot spot methods are define.

"IN PBO of the first grid before displaying alv write the below code

CREATE OBJECT w_eventrec.

      SET HANDLER w_eventrec-&amp;gt;handle_hotspot_click FOR w_alvgrid.
      SET HANDLER w_eventrec-&amp;gt;handle_double_click FOR w_alvgrid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 May 2009 05:30:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-20T05:30:12Z</dc:date>
    <item>
      <title>ALV using OOPS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573097#M1271246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are having two ALV GRIDS on a single screen. When a particular field (say date) is clicked in GRID 1, the second grid (GRID2) should appear on the same screen with flight details for that particular date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. We are creating a OOPS ALV program , we have our output in the ALV grid with a date display in that with a HOTSPOT link. Clicking on the hotspot link should display other output in the same screen in a ALV grid. For this we are using grid Container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To catch that hotspot click, we are using a custom methods as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD handle_user_command&lt;/P&gt;&lt;P&gt;FOR EVENT user_command OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;IMPORTING e_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD handle_hotspot_click&lt;/P&gt;&lt;P&gt;FOR EVENT hotspot_click OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;IMPORTING e_row_id e_column_id es_row_no .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. We are calling this method in the PAI event of the 1st grid output screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. While debugging the code we identified that the module in PAI event is not getting called. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Request you to suggest a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The classes we use for this program are&lt;/P&gt;&lt;P&gt;CL_GUI_ALV_GRID.&lt;/P&gt;&lt;P&gt;CL_GUI_CUSTOM_CONTAINER.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 05:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573097#M1271246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-20T05:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: ALV using OOPS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573098#M1271247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this std program...BCALV_GRID_05&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it has the same requirment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 05:25:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573098#M1271247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-20T05:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: ALV using OOPS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573099#M1271248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA :  w_eventrec TYPE REF TO lcl_event_receiver "lcl_event_receiver is your class where hot spot methods are define.

"IN PBO of the first grid before displaying alv write the below code

CREATE OBJECT w_eventrec.

      SET HANDLER w_eventrec-&amp;gt;handle_hotspot_click FOR w_alvgrid.
      SET HANDLER w_eventrec-&amp;gt;handle_double_click FOR w_alvgrid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 05:30:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573099#M1271248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-20T05:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: ALV using OOPS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573100#M1271249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For handling events in ALv using OOP, you need to follow the below steps,&lt;/P&gt;&lt;P&gt;1) create a local class for event handling.&lt;/P&gt;&lt;P&gt;2) define the method for event handling in the class.&lt;/P&gt;&lt;P&gt;3) Implement the method.&lt;/P&gt;&lt;P&gt;4) create an instance of enevt handler.&lt;/P&gt;&lt;P&gt;5) using this instance link the event handling methods to the ALV grid instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS &amp;lt;lcl_event_handler&amp;gt; DEFINITION .&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION .&lt;/P&gt;&lt;P&gt;    METHODS:&lt;/P&gt;&lt;P&gt;*Hotspot click control&lt;/P&gt;&lt;P&gt;      &amp;lt;handle_hotspot_click&amp;gt;&lt;/P&gt;&lt;P&gt;       FOR EVENT hotspot_click OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;       IMPORTING e_row_id e_column_id es_row_no .&lt;/P&gt;&lt;P&gt;  PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS &amp;lt;lcl_event_handler&amp;gt; IMPLEMENTATION .&lt;/P&gt;&lt;P&gt;*Handle Hotspot Click&lt;/P&gt;&lt;P&gt;  METHOD &amp;lt;handle_hotspot_click&amp;gt; .&lt;/P&gt;&lt;P&gt;    PERFORM &amp;lt;handle_hotspot_click&amp;gt; USING e_row_id e_column_id es_row_no .&lt;/P&gt;&lt;P&gt;"   Implement this subroutine.&lt;/P&gt;&lt;P&gt;  ENDMETHOD .&lt;/P&gt;&lt;P&gt;ENDCLASS .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA &amp;lt;gr_event_handler&amp;gt; TYPE REF TO &amp;lt;lcl_event_handler&amp;gt; .&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 &amp;lt;gr_event_handler&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Registering handler methods to handle ALV Grid events&lt;/P&gt;&lt;P&gt;SET HANDLER &amp;lt;gr_event_handler&amp;gt; -&amp;gt; &amp;lt;handle_hotspot_click&amp;gt; FOR &amp;lt;gr_alvgrid&amp;gt; .&lt;/P&gt;&lt;P&gt;          "&amp;lt;gr_alvgrid&amp;gt; is ALV grid Instance used to call the method for diplay ALV.&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now once you click the hotspot in ALV grid,&lt;/P&gt;&lt;P&gt;the PERFORM &amp;lt;handle_hotspot_click&amp;gt;  will be callled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can write your reqd code to display the other grid in the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Sachinkumar Mehta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 05:32:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573100#M1271249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-20T05:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: ALV using OOPS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573101#M1271250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the standard report &lt;STRONG&gt;BCALV_GRID_02&lt;/STRONG&gt; and  &lt;STRONG&gt;BCALV_GRID_03&lt;/STRONG&gt;  u double click on any column it will open second window booking window&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 05:50:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-using-oops/m-p/5573101#M1271250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-20T05:50:28Z</dc:date>
    </item>
  </channel>
</rss>

