<?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 hotspot functionality in OO ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475366#M1417963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my report, I am using set_table_for_first_display to display purchase order number, material docu. number. &lt;/P&gt;&lt;P&gt; I had used the splitter control to show two internal tables .&lt;/P&gt;&lt;P&gt;I had created hotspots for purchasing docu number in the first table . &lt;/P&gt;&lt;P&gt;If I click on purchasing docu number it has to call transaction ME23N for the purchase order number .&lt;/P&gt;&lt;P&gt;But while debugging I can not pass the row id and column id. I had used set handler methods and all properly. I doubt the problem with capturing column and row id for the hotspot field .Following is my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.
    METHODS on_hotspot_click
       FOR EVENT hotspot_click OF cl_gui_alv_grid
       IMPORTING
         !e_row_id
         !es_row_no .


ENDCLASS.                    "lcl_event_receiver DEFINITION
PERFORM display_data.
*----------------------------------------------------------------------*
*       CLASS lcl_event_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_event_receiver IMPLEMENTATION.


  METHOD  on_hotspot_click.
    DATA: ls_output LIKE LINE OF it_zadcstohdr_new .
    DATA : l_columnid TYPE lvc_s_col,
           l_roid TYPE lvc_s_roid.
    

    READ TABLE it_zadcstohdr_new INTO wa_zadcstohdr_new INDEX l_roid-row_id.
    IF sy-subrc = 0 AND l_columnid-fieldname = 'VBELN'.
*SELECT SINGLE * FROM LFB1 INTO LFB1 WHERE lifnr = ls_output-lifnr.

      SET PARAMETER ID 'VL' FIELD wa_zadcstohdr_new-vbeln.

      CALL TRANSACTION 'VL03N'.
    ENDIF.
  ENDMETHOD.                    "handle_double_clickENDCLASS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please use code tags to format your code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Jan 20, 2010 9:52 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jan 2010 14:44:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-20T14:44:54Z</dc:date>
    <item>
      <title>hotspot functionality in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475366#M1417963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my report, I am using set_table_for_first_display to display purchase order number, material docu. number. &lt;/P&gt;&lt;P&gt; I had used the splitter control to show two internal tables .&lt;/P&gt;&lt;P&gt;I had created hotspots for purchasing docu number in the first table . &lt;/P&gt;&lt;P&gt;If I click on purchasing docu number it has to call transaction ME23N for the purchase order number .&lt;/P&gt;&lt;P&gt;But while debugging I can not pass the row id and column id. I had used set handler methods and all properly. I doubt the problem with capturing column and row id for the hotspot field .Following is my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.
    METHODS on_hotspot_click
       FOR EVENT hotspot_click OF cl_gui_alv_grid
       IMPORTING
         !e_row_id
         !es_row_no .


ENDCLASS.                    "lcl_event_receiver DEFINITION
PERFORM display_data.
*----------------------------------------------------------------------*
*       CLASS lcl_event_receiver IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_event_receiver IMPLEMENTATION.


  METHOD  on_hotspot_click.
    DATA: ls_output LIKE LINE OF it_zadcstohdr_new .
    DATA : l_columnid TYPE lvc_s_col,
           l_roid TYPE lvc_s_roid.
    

    READ TABLE it_zadcstohdr_new INTO wa_zadcstohdr_new INDEX l_roid-row_id.
    IF sy-subrc = 0 AND l_columnid-fieldname = 'VBELN'.
*SELECT SINGLE * FROM LFB1 INTO LFB1 WHERE lifnr = ls_output-lifnr.

      SET PARAMETER ID 'VL' FIELD wa_zadcstohdr_new-vbeln.

      CALL TRANSACTION 'VL03N'.
    ENDIF.
  ENDMETHOD.                    "handle_double_clickENDCLASS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please use code tags to format your code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Jan 20, 2010 9:52 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2010 14:44:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475366#M1417963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-20T14:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot functionality in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475367#M1417964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;set the event handler after the grid has been called.&lt;/P&gt;&lt;P&gt;check this link for reference link:[http://wiki.sdn.sap.com/wiki/display/Snippets/Interactive&lt;EM&gt;ALV&lt;/EM&gt;Using&lt;EM&gt;ABAP&lt;/EM&gt;Objects]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Keshav.T on Jan 20, 2010 8:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2010 14:59:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475367#M1417964</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-01-20T14:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot functionality in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475368#M1417965</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;you should use e_row_id, don't need to declare l_roid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Frisoni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2010 15:02:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475368#M1417965</guid>
      <dc:creator>guilherme_frisoni</dc:creator>
      <dc:date>2010-01-20T15:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot functionality in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475369#M1417966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello gayathri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the link..Hope your issue will be resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/HOME/object" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/HOME/object&lt;/A&gt;&lt;EM&gt;oriented&lt;/EM&gt;Programming&lt;EM&gt;in&lt;/EM&gt;ALV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2010 15:07:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475369#M1417966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-20T15:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot functionality in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475370#M1417967</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;CLASS LCL_EVENT_RECEIVER DEFINITION .

  PUBLIC SECTION.
*---Method to handel hotspot
    METHODS :
    HANDEL_HOTSPOT_CLICK
      FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
      IMPORTING E_ROW_ID E_COLUMN_ID.

ENDCLASS .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.

*-----Logic to handle the HOTSPOT click
  METHOD HANDEL_HOTSPOT_CLICK.
*---To handel hotspot in the firstlist
    PERFORM HANDEL_HOTSPOT_CLICK USING E_ROW_ID E_COLUMN_ID.

  ENDMETHOD.                    "HANDEL_HOTSPOT_CLICK

ENDCLASS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM HANDEL_HOTSPOT_CLICK  USING    P_E_ROW_ID TYPE ANY
                                    P_E_COLUMN_ID TYPE ANY.

" logic
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 04:23:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475370#M1417967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-21T04:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot functionality in OO ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475371#M1417968</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;check this code for reference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS ZCL_EVENT_HANDLER DEFINITION.     " To handle events of first screen oops alv
  PUBLIC SECTION.
    METHODS:
    HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID IMPORTING E_ROW_ID E_COLUMN_ID,
"method to handle hotspot event
ENDCLASS.                    "Zcl_event_handler DEFINITION

CLASS ZCL_EVENT_HANDLER IMPLEMENTATION.
 METHOD HANDLE_HOTSPOT_CLICK.
    IF E_COLUMN_ID = 'KUNNR'.
      PERFORM HANDLE_HOTSPOT_ON_CUSTOMER_NUM USING E_ROW_ID.   " Subroutine to handle hotspot on customer number
    ENDIF.
  ENDMETHOD.                    "HANDLE_HOTSPOT_CLICK

FORM HANDLE_HOTSPOT_ON_CUSTOMER_NUM USING VALUE(P_E_ROW_ID).

*-------------------------------------------------------------Pass the customer number clicked
  SET PARAMETER ID 'KUN' FIELD WA_DISP1-KUNNR.
*-------------------------------------------------------------call transaction to display tghe vendor
  CALL TRANSACTION 'XD03'.
ENDFORM.                    " HANDLE_HOTSPOT_ON_CUSTOMER_NUM&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD MY_ALV1-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY

"now set the handler
*-------------------------------------------------------------set handler for hotspot click on oops alv
    SET HANDLER EVENT-&amp;gt;HANDLE_HOTSPOT_CLICK FOR MY_ALV1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Anshul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 04:47:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot-functionality-in-oo-alv/m-p/6475371#M1417968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-21T04:47:01Z</dc:date>
    </item>
  </channel>
</rss>

