04-08-2005 8:15 PM
Dear developers
I am building a custom application using ALV GRID (OO method).
I have three ALV's on the screen.
User selects a cell on the first ALV from the list. say a specific product group.
The second ALV displays the product records depnding on selection of first ALV. (this works fine).
when the user selects a cell of a specific column on ALV grid 2 using double click event or hotspot I am always getting row ID as 1 , irrespective of the user clickin on row 2 or 3 on the specific cell.
To carry out further processing , I need to get the exact row the user is selecting which I expected to be available in LVC_S_ROID. My further process works always with ROW ID as 1.
I am using event hot spot in alv grid 1. In grid 2 I tried both hot spot and double click . But both returns the index value of row as 1 , irrespective of the cell being clicked is beyond row 1. in second grid.
Looking forward for help or suggestion on this,
Regards
Kumar
04-08-2005 8:20 PM
Hi Kumar
How do you implement your event handler?
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>
04-08-2005 8:20 PM
Hi Kumar
How do you implement your event handler?
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>
04-08-2005 8:49 PM
Hi
The handler is implemented as follows for all ALV GRIDs.
I give below only the relevant one grid 2 from my code.
Class definition
**03/17/2005 skulist hotspot
handle_skulist FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING e_row_id e_column_id es_row_no,
Class implementation
**03/17/2005 sku list by currency hotspot on listprice
METHOD handle_skulist .
PERFORM handle_skulist USING e_row_id e_column_id es_row_no.
ENDMETHOD. "HANDLE_HOTSPOT_CLICK
DATA gr_event_handler TYPE REF TO lcl_event_handler.
DATA gr_event_handler_4 TYPE REF TO lcl_event_handler.
The above are done in an include and are public in nature.
Also note that I have similar implementation for similar events for grid 1 bu the event handlers are registered in different names.
The code below is in the maib program , under a custom container for grid 2
CREATE OBJECT gr_event_handler_4.
SET HANDLER gr_event_handler_4->handle_skulist FOR gr_alvgrid1.
*Based on the user action on grid 2 this form is getting executed. But as I said earlier the parameter I am getting for index is 1 always.
FORM handle_skulist USING i_row_id1 TYPE lvc_s_row
i_column_id1 TYPE lvc_s_col
is_row_no1 TYPE lvc_s_roid.
04-15-2005 5:31 PM
Hi serdar
The issue I face is when I use Data_changed_finished event. For the time being I got around the issue by using the double click event after the user enter's the data into a editable cell.
It would be nice if at some point in time of you could direct me to a solution.
Your ALV GRID guide was most useful to me in my work.
Thanks for putting such a good document together.
Regards
Kumar