Skip to Content

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

ALV double click call transaction

Hi,

I've implemented the double click method, when i double click at the field row of the ALV the program doesn't trigger the event.

*----------------------------------------------------------------------*
*       CLASS lcl_receptor_eventos DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_receptor_eventos DEFINITION.

   PUBLIC SECTION.
     METHODS:
       metodo_doble_click
  FOR EVENT double_click OF cl_gui_alv_grid
  IMPORTING e_row e_column es_row_no.

ENDCLASS


*----------------------------------------------------------------------*
*       CLASS lcl_receptor_eventos IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_receptor_eventos IMPLEMENTATION.
   METHOD metodo_doble_click.
     PERFORM handle_double_click USING e_row e_column es_row_no .
   ENDMETHOD.                    "metodo_doble_click


ENDCLASS.                    "lcl_receptor_eventos IMPLEMENTATION


*&---------------------------------------------------------------------*
*&      Form  HANDLE_DOUBLE_CLICK
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_E_ROW  text
*      -->P_E_COLUMN  text
*      -->P_ES_ROW_NO  text
*----------------------------------------------------------------------*
FORM handle_double_click  USING i_row TYPE lvc_s_row
                                 i_column TYPE lvc_s_col
                                 is_row_no TYPE lvc_s_roid.

   READ TABLE itab001 INTO wa_itab001  INDEX is_row_no-row_id .
   IF sy-subrc = 0 AND i_column-fieldname = 'AUFNR'.
     SET PARAMETER ID 'MAT' FIELD wa_itab001-aufnr.
     CALL TRANSACTION 'CO02' AND SKIP FIRST SCREEN.
   ENDIF .

ENDFORM.                    " HANDLE_DOUBLE_CLICK



I don't know if the problem is that when I double click the 'Orden' field (AUFNR) the system detects all the row instead of the AUFNR one.

I mean, when I double click at the Orden field, despite I've put the /h for debugging, all the row is highlighted but nothing occurs.

Thanks a lot.

Regards.

replied

Hi Ocr,

Do you 'SET HANDLER' for your gird control?

Please go through a example report 'BCALV_GRID_03'.

regards,

Archer

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question