Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Double click event problem

**********************************************************************
*       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

This is my code for double click event on lines of ALV report. Its working fine with exception, that is.

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.

In most of the cases it's working fine even with subtotal field.

Please suggest me to resolve this issue.

Thanks,

Message was edited by:

Sal Khan

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question