09-10-2015 11:22 PM
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.
09-11-2015 4:12 AM
Hi Ocr,
Do you 'SET HANDLER' for your gird control?
Please go through a example report 'BCALV_GRID_03'.
regards,
Archer
09-11-2015 4:12 AM
Hi Ocr,
Do you 'SET HANDLER' for your gird control?
Please go through a example report 'BCALV_GRID_03'.
regards,
Archer
09-11-2015 5:47 AM
Hello,
You are using the wrong Parameter ID, it should be 'ANR'.
ANR is the parameter ID for Order number field in CO02.
Regards,
Thanga
09-11-2015 6:12 AM
Hi,,
you have to set the handler and set the correct parameter for oder number which is ANR
set handler event_receiver->handle_double_click for ALV_GRID.
SET PARAMETER ID 'ANR' FIELD wa_itab001-aufnr.
CALL TRANSACTION 'CO02' AND SKIP FIRST SCREEN.
Regards
Ibrahim