2006 Jul 28 8:41 AM
Hi All,
I have created an alv report using alv class. I have handled the double click event in that i am calling transaction using row currenlty selected. But after doing subtotalling the list and then i double click a line it is passing wrong data.
Points are awarded,
Regards,
Bharat Mistry
Message was edited by: Bharat Mistry
2006 Jul 28 9:08 AM
Hello,
Whenever you double click on the subtotal line, contents of E_ROW-ROWTYPE will not be initial. So, you can check on this basis like,
if E_ROW-ROWTYPE is initial.
call other transaction with the row number
else.
message click on the data line.
endif.
Regards,
Naimesh
2006 Jul 28 9:08 AM
Hello,
Whenever you double click on the subtotal line, contents of E_ROW-ROWTYPE will not be initial. So, you can check on this basis like,
if E_ROW-ROWTYPE is initial.
call other transaction with the row number
else.
message click on the data line.
endif.
Regards,
Naimesh
2006 Jul 28 9:37 AM
Hi Naimesh,
Thanks for your solution.
Is it possible that i can get the content of the particular row?
Regards,
Bharat.
Message was edited by: Bharat Mistry
2006 Jul 29 9:14 AM
Hi Bharat,
Read the internal table contents in double click event with e_row-index , then you will get the data of that particular row.
check below code :
local class to handle semantic checks
CLASS lcl_event_receiver DEFINITION DEFERRED.
DATA: g_event_receiver TYPE REF TO lcl_event_receiver.
**************************************************************
LOCAL CLASS Definition
**************************************************************
*§4.Define and implement event handler to handle event DATA_CHANGED.
*
CLASS lcl_event_receiver DEFINITION.
public section.
METHODS:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column.
ENDCLASS.
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_double_click.
read table gt_outtab index e_row-index into
Regards
Appana
*Reward Points for helpful answers
Message was edited by: L Appana
2006 Jul 29 11:52 AM
Hi L Appana
I had done the same way but after doing total and subtotals on the list internal table also gets sorted and so i am not able to fetch the right record from the internal table on the basis of row no. . So is it possible to get the row contents at this time?
Regards,
Bharat Mistry.
Message was edited by: Bharat Mistry
2006 Jul 29 1:35 PM
Hi L Appana,
You have spot the problem and it is solved.
Thank you very much.
Provide help in future.
Regards,
Bharat Mistry.
2006 Jul 28 9:17 AM
Try clearing the parameters E_ROW and E_COLUMN before thatmethod and try
2006 Jul 28 9:55 AM
Hi,
you can get the content of the row you have selected,
by calling method GET_SELECTED_ROW, this returns you the row number, using this as index read your internal table to get the content.
Regards,
Raghavendra
2006 Jul 29 12:32 PM
Hi Bharat
Try using the Sort Catalog.
Refer to the following:
http://www.sapfans.com/forums/viewtopic.php?t=17335
http://www.esnips.com/doc/2d953590-e8c5-490c-a607-d1ab7cf517d7/ALV.pdf
Award points if necessary.
Regards
Inder