<?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: Double click event problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063430#M725799</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use hotspot only on po number. If you do so, there will be no hotspot on other fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_structure_name       = str_report&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      ct_fieldcat            = p_it_fieldcat&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inconsistent_interface = 1&lt;/P&gt;&lt;P&gt;      program_error          = 2&lt;/P&gt;&lt;P&gt;      OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE p_it_fieldcat ASSIGNING &amp;lt;fieldcat&amp;gt;&lt;/P&gt;&lt;P&gt;  WITH KEY fieldname = 'VBELN'.&lt;/P&gt;&lt;P&gt;  &amp;lt;fieldcat&amp;gt;-hotspot = c_on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Str_report will have the value of structure created in se11 for fieldcatalog. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_event_receiver DEFINITION DEFERRED. "for screen 100&lt;/P&gt;&lt;P&gt;DATA: event_receiver TYPE REF TO lcl_event_receiver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      CLASS lcl_event_receiver DEFINITION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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_receiver DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS:&lt;/P&gt;&lt;P&gt;        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;ENDCLASS.                    "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;implementaion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD handle_hotspot_click.&lt;/P&gt;&lt;P&gt;    IF e_column_id-fieldname = 'VBELN'.&lt;/P&gt;&lt;P&gt;      IF e_row_id CO c_int.&lt;/P&gt;&lt;P&gt;        READ TABLE it_final INTO wa_final INDEX e_row_id.&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          SET PARAMETER ID 'AUN' FIELD wa_final-vbeln.&lt;/P&gt;&lt;P&gt;          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "handle_double_click&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to give this after the Method first display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT event_receiver.&lt;/P&gt;&lt;P&gt;  SET HANDLER&lt;/P&gt;&lt;P&gt;  event_receiver-&amp;gt;handle_hotspot_click FOR gc_grid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Nov 2007 21:38:48 GMT</pubDate>
    <dc:creator>former_member191735</dc:creator>
    <dc:date>2007-11-28T21:38:48Z</dc:date>
    <item>
      <title>Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063419#M725788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
**********************************************************************
*       CLASS cl_event_receiver DEFINITION      Handles Double Click
***********************************************************************
CLASS CL_EVENT_RECEIVER DEFINITION.
  PUBLIC SECTION.
    METHODS HANDLE_DOUBLE_CLICK
      FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
      IMPORTING E_ROW E_COLUMN.
  PRIVATE SECTION.
ENDCLASS.

***********************************************************************
*       CLASS CL_EVENT_RECEIVER IMPLEMENTATION    Handles Double Click
***********************************************************************
CLASS CL_EVENT_RECEIVER IMPLEMENTATION.
  METHOD HANDLE_DOUBLE_CLICK.
    PERFORM DRILL_DOWN USING E_ROW-INDEX.
  ENDMETHOD.
ENDCLASS.

FORM drill_down USING index.

  CLEAR wa_output.
  TABLES: mepo_topline.
  READ TABLE it_output INDEX index INTO wa_output.
  IF sy-subrc = 0.
    mepo_topline-ebeln = wa_output-ebeln.
    SET PARAMETER ID 'BES' FIELD mepo_topline-ebeln.
    CALL TRANSACTION 'ME23N'." AND SKIP FIRST SCREEN.

  ENDIF.

ENDFORM.                    "DRILL_DOWN

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my code for double click event on lines of ALV report. Its working fine with exception, that is.&lt;/P&gt;&lt;P&gt;I have subtoal the $ amount on top of each po line item. In some cases when i click on subtotal line of PO, then in index variable, system is populating the wrong index and hence it' opens a wrong PO, which is not reqruied.&lt;/P&gt;&lt;P&gt;In most of the cases it's working fine even with subtotal field. &lt;/P&gt;&lt;P&gt;Please suggest me to resolve this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Sal Khan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 15:27:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063419#M725788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T15:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063420#M725789</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;
implementation.

double_click_200
         for event double_click
         of cl_gui_alv_grid
         importing e_row e_column es_row_no,

method double_click_200.
    v_dclick = c_y.
    move e_row to wa_dblclk_rows.
    append wa_dblclk_rows to i_dblclk_rows.
    " Check here wa_dblclk_rows-rowtype some values like T 0100 0000000001 if you double click on TOTAL row 
    " others shows it blank. using this you can control the call transaction


    endif.
    clear : v_dclick.
endmethod.                             

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:08:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063420#M725789</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-11-28T16:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063421#M725790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi a®s,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you pls tell me in detail, how to fix it. what is c_y and with what field i have to check. Pls explain...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Sal Khan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 16:28:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063421#M725790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T16:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063422#M725791</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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM drill_down USING index.
types : begin of t_row_b.
        include structure lvc_s_row.     
types : end of t_row_b.

data :   wa_dblclk_rows     type t_row_b.

    move e_row to wa_dblclk_rows.
    " Check here wa_dblclk_rows-rowtype some values like T 0100 0000000001 if you double click on TOTAL row 
    " others shows it blank. using this you can control the call transaction
     
  CLEAR wa_output.
  TABLES: mepo_topline.
  READ TABLE it_output INDEX index INTO wa_output.
  IF sy-subrc = 0.
    mepo_topline-ebeln = wa_output-ebeln.
    SET PARAMETER ID 'BES' FIELD mepo_topline-ebeln.
    CALL TRANSACTION 'ME23N'." AND SKIP FIRST SCREEN.
 
  ENDIF.
 
ENDFORM.      
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 17:02:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063422#M725791</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-11-28T17:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063423#M725792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My problem is e.g if i click on total row which is one,,,i get the index 2, and hence it's calling the PO which is at index 2 in my internal table. &lt;/P&gt;&lt;P&gt;Using ur check condition, i'm not understanding, how can i get the correct line index. e.g in this case, index = 1.&lt;/P&gt;&lt;P&gt;what is the benifit of this check condition. Do this check conidtion correct my index. As i'have the wrong index... I am still confused in writting the check condition&lt;/P&gt;&lt;P&gt;Pls help..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Sal Khan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 17:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063423#M725792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T17:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063424#M725793</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;If the user clicks on total line then you need to give information message saying that "click on the non total line " like that . The check is for you can identify the user clicks on a total line or non total line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 17:34:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063424#M725793</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-11-28T17:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063425#M725794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so you mean it's not possible to go to that PO, if user double clicks on total field...&lt;/P&gt;&lt;P&gt;???&lt;/P&gt;&lt;P&gt;Yes, if it's not possible i'll give info message, but may be this is not acceptable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 17:46:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063425#M725794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T17:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063426#M725795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest you to use Hotspot on PO number. This handles properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 17:51:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063426#M725795</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2007-11-28T17:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063427#M725796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to use hotspot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 17:55:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063427#M725796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T17:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063428#M725797</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;For Hotspot check the code below. Hope this helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;------------------------------------------------------*
*&amp;amp; Report displaying an ALV GRID CONTROL which responds *
*&amp;amp; to HOTSPOT click event                               *
*&amp;amp;------------------------------------------------------*

REPORT  ZZ_ALV_GRID_RESPONDING_HOTSPOT_CLICK .

TABLES : BKPF .
DATA : I_BKPF TYPE STANDARD TABLE OF BKPF WITH HEADER LINE .
DATA : MOK_CODE LIKE SY-UCOMM .
DATA : OK_CODE LIKE SY-UCOMM .


DATA : MM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER .
DATA : MM_ALVGRID  TYPE REF TO CL_GUI_ALV_GRID .

DATA : CT_FIELDCAT TYPE STANDARD TABLE OF LVC_S_FCAT   .
DATA : WA_FIELDCAT LIKE LVC_S_FCAT   .


*------------------------------------------------------*
*       CLASS RESPOND_EVENTS DEFINITION
*------------------------------------------------------*
*------------------------------------------------------*
CLASS RESPOND_EVENTS DEFINITION  .
  PUBLIC SECTION .
    METHODS : RESPOND_HOTSPOT_CLICK FOR EVENT 
             HOTSPOT_CLICK OF
             CL_GUI_ALV_GRID IMPORTING  E_ROW_ID
                                        E_COLUMN_ID
                                        ES_ROW_NO.
ENDCLASS .                    "RESPOND_EVENTS DEFINITION

*------------------------------------------------------*
*     CLASS RESPOND_EVENTS IMPLEMENTATION
*------------------------------------------------------*
*------------------------------------------------------*
CLASS RESPOND_EVENTS IMPLEMENTATION .

  METHOD RESPOND_HOTSPOT_CLICK  .
 
    CLEAR BKPF .
    READ TABLE I_BKPF INDEX  E_ROW_ID INTO BKPF .
    IF SY-SUBRC EQ 0 .
      SET PARAMETER ID 'BLN' FIELD BKPF-BELNR .
      SET PARAMETER ID 'BUK' FIELD BKPF-BUKRS .
      SET PARAMETER ID 'GJR' FIELD BKPF-GJAHR .
      CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN .

    ENDIF .

  ENDMETHOD .            "RESPOND_HOTSPOT_CLICK
ENDCLASS .               "RESPOND_EVENTS IMPLEMENTATION

DATA : I_RESPOND_EVENTS TYPE REF TO RESPOND_EVENTS  .

*=====================================================
* SELECTION SCREEN - ( DEFAULT ) 
*=====================================================
SELECT-OPTIONS : S_BELNR FOR I_BKPF-BELNR  OBLIGATORY.

*=====================================================
* START OF SELECTION
*=====================================================
START-OF-SELECTION .

  SELECT * FROM BKPF 
  INTO CORRESPONDING FIELDS OF TABLE I_BKPF
  WHERE BELNR IN S_BELNR .

*======================================================
* END-OF-SELECTION  .
*======================================================
END-OF-SELECTION  .
  CALL SCREEN 100 .
* ------------------------------------------------------
* The screen 100 has a custom control named 'MCONTAINER'
* and a command button with function code 'QUIT' . 
* Of course has an element called OK_CODE like sy-ucomm .
* The flow logic of the screen has in the output section
* the module PREPARE_OUTPUT , 
* and in the input section the module USER_COMMAND_0100 .
* ------------------------------------------------------

*&amp;amp;-----------------------------------------------------*
*&amp;amp;      Module  USER_COMMAND_0100  INPUT
*&amp;amp;-----------------------------------------------------*
*  
*------------------------------------------------------*
MODULE USER_COMMAND_0100 INPUT.
  CLEAR : MOK_CODE .
  MOK_CODE = OK_CODE .
  CLEAR : OK_CODE .
  CASE MOK_CODE .
    WHEN 'QUIT' .
      LEAVE TO SCREEN 0 .
  ENDCASE .
ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&amp;amp;-----------------------------------------------------*
*&amp;amp;      Module  OUTPUT  OUTPUT
*&amp;amp;-----------------------------------------------------*
*       text
*------------------------------------------------------*
MODULE PREPARE_OUTPUT OUTPUT .
  IF MM_CONTAINER  IS INITIAL .
    CREATE OBJECT MM_CONTAINER 
    EXPORTING CONTAINER_NAME = 'MCONTAINER' .

    CREATE OBJECT MM_ALVGRID 
    EXPORTING I_PARENT = MM_CONTAINER .

    PERFORM CATALOG_CREATION .

    PERFORM SHOW_DATA .

    CREATE OBJECT I_RESPOND_EVENTS .
    SET HANDLER I_RESPOND_EVENTS-&amp;gt;RESPOND_HOTSPOT_CLICK 
    FOR MM_ALVGRID .

  ENDIF .
ENDMODULE.                 " OUTPUT  OUTPUT
*&amp;amp;----------------------------------------------------*
*&amp;amp;      Form  CATALOG_CREATION
*&amp;amp;----------------------------------------------------*
*
FORM CATALOG_CREATION .

  call function 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name = 'BKPF'
    CHANGING
      ct_fieldcat      = Ct_fieldcat.


  LOOP AT Ct_fieldcat INTO WA_fieldcat.
    IF  ( WA_FIELDCAT-FIELDNAME NE 'BUKRS' )
    AND ( WA_FIELDCAT-FIELDNAME NE 'BELNR' )
    AND ( WA_FIELDCAT-FIELDNAME NE 'GJAHR' ) .
      WA_FIELDCAT-HOTSPOT = 'X' .
      MODIFY Ct_fieldcat FROM WA_fieldcat.
    ENDIF .
  ENDLOOP.

  DELETE Ct_fieldcat  WHERE HOTSPOT = 'X' .

  LOOP AT Ct_fieldcat INTO WA_fieldcat.
    IF  WA_FIELDCAT-FIELDNAME EQ 'BELNR'   .
      WA_FIELDCAT-HOTSPOT = 'X' .
      MODIFY Ct_fieldcat FROM WA_fieldcat.
    ENDIF .

  ENDLOOP.


ENDFORM.                    " CATALOG_CREATION
*&amp;amp;--------------------------------------------------*
*&amp;amp;      Form  SHOW_DATA
*&amp;amp;--------------------------------------------------*
FORM SHOW_DATA .
  CALL METHOD MM_ALVGRID-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY
    CHANGING
      IT_OUTTAB       = I_BKPF[]
      IT_FIELDCATALOG = Ct_fieldcat[].
ENDFORM.                    " SHOW_DATA

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;chaithanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 18:33:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063428#M725797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T18:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063429#M725798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have implemented the hotspot but same problem. If i click on the total (I mean in the first line where i'm displaying toals of PO line item), then its showing some other PO in ME23N transaction. Its not capturing the proper line index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion....&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 19:36:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063429#M725798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-28T19:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Double click event problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063430#M725799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use hotspot only on po number. If you do so, there will be no hotspot on other fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_structure_name       = str_report&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      ct_fieldcat            = p_it_fieldcat&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inconsistent_interface = 1&lt;/P&gt;&lt;P&gt;      program_error          = 2&lt;/P&gt;&lt;P&gt;      OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE p_it_fieldcat ASSIGNING &amp;lt;fieldcat&amp;gt;&lt;/P&gt;&lt;P&gt;  WITH KEY fieldname = 'VBELN'.&lt;/P&gt;&lt;P&gt;  &amp;lt;fieldcat&amp;gt;-hotspot = c_on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Str_report will have the value of structure created in se11 for fieldcatalog. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_event_receiver DEFINITION DEFERRED. "for screen 100&lt;/P&gt;&lt;P&gt;DATA: event_receiver TYPE REF TO lcl_event_receiver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      CLASS lcl_event_receiver DEFINITION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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_receiver DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;    METHODS:&lt;/P&gt;&lt;P&gt;        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;ENDCLASS.                    "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;implementaion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD handle_hotspot_click.&lt;/P&gt;&lt;P&gt;    IF e_column_id-fieldname = 'VBELN'.&lt;/P&gt;&lt;P&gt;      IF e_row_id CO c_int.&lt;/P&gt;&lt;P&gt;        READ TABLE it_final INTO wa_final INDEX e_row_id.&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          SET PARAMETER ID 'AUN' FIELD wa_final-vbeln.&lt;/P&gt;&lt;P&gt;          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "handle_double_click&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to give this after the Method first display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT event_receiver.&lt;/P&gt;&lt;P&gt;  SET HANDLER&lt;/P&gt;&lt;P&gt;  event_receiver-&amp;gt;handle_hotspot_click FOR gc_grid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2007 21:38:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-event-problem/m-p/3063430#M725799</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2007-11-28T21:38:48Z</dc:date>
    </item>
  </channel>
</rss>

