on 2004 Apr 14 5:47 PM
When handling a double-click for my alv grid, I have found methods for getting the value of the cell that was clicked. Is there a method for returning the value of the whole row?
Thanks in advance.
Try the code bellow.
You also have to set the fieldcat-hotspot field to 'X' in the fieldcatalog for the column you want to enable clicking.
There is also a method for double click, as far as I remember it works very similar way...but I always use hotspot_click.
I've just found it: check demo BCALV_GRID_02
Incho
*eject
----
CLASS cl_event_receiver DEFINITION
----
class lcl_event_receiver: local class to handle event HOTSPOT_CLICK
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_hotspot_click
FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING e_row_id e_column_id.
ENDCLASS. "lcl_event_receiver DEFINITION
----
CLASS lcl_event_receiver IMPLEMENTATION
----
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_hotspot_click.
READ TABLE it_rseg INDEX e_row_id-index INTO wa_rseg.
CASE e_column_id-fieldname.
*--> Display Invoice
WHEN 'BELNR'.
IF wa_rseg-belnr <> space.
SET PARAMETER ID 'RBN' FIELD wa_rseg-belnr.
SET PARAMETER ID 'GJR' FIELD wa_rseg-gjahr.
CALL TRANSACTION tcode_mir4 AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
*=======================================================================
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.