10-28-2009 2:57 PM
Hi Experts,
Get selected rows in ALV oops doesn't work for the second time for the same object.
Can any one suggest, how can retrieve values using this method for multiple times.
Regards
RP.
10-28-2009 3:10 PM
Hi,
I think every time when selecting rows u are creating a new reference to grid .
Reference to grid has to be created only once
Check whether u have created reference like below.
DATA: g_o_container TYPE REF TO cl_gui_custom_container,
g_f_container TYPE scrfname VALUE 'G_CONTAINER_ALV', " Custom control name in screen painter
g_o_grid TYPE REF TO cl_gui_alv_grid.
IF g_o_container IS INITIAL.
CREATE OBJECT g_o_container
EXPORTING
container_name = g_f_container.
IF g_o_grid IS INITIAL.
CREATE OBJECT g_o_grid
EXPORTING
i_parent = g_o_container.
ENDIF.
ENDIF.
Thanks
Edited by: Sap Fan on Oct 28, 2009 4:11 PM
10-28-2009 3:09 PM
10-29-2009 8:49 AM
10-28-2009 3:10 PM
Hi,
I think every time when selecting rows u are creating a new reference to grid .
Reference to grid has to be created only once
Check whether u have created reference like below.
DATA: g_o_container TYPE REF TO cl_gui_custom_container,
g_f_container TYPE scrfname VALUE 'G_CONTAINER_ALV', " Custom control name in screen painter
g_o_grid TYPE REF TO cl_gui_alv_grid.
IF g_o_container IS INITIAL.
CREATE OBJECT g_o_container
EXPORTING
container_name = g_f_container.
IF g_o_grid IS INITIAL.
CREATE OBJECT g_o_grid
EXPORTING
i_parent = g_o_container.
ENDIF.
ENDIF.
Thanks
Edited by: Sap Fan on Oct 28, 2009 4:11 PM
10-29-2009 8:41 AM
Hi,
We need to free the objects and then use set selected rows and assign values to it in PBO, which were retrieved using get selected rows earlier in PAI.
Thats it...it works fine now..
Issue is resolved.
Regards
RP.
04-19-2010 6:14 AM
Hai Mr. RP Reddy,
Could you pls post the code, how you got the get selected rows issue rectified for multifple times triggering.
I am also facing the same problem in my requirement. i await your quick reply.
Thanks & Regards,
Rajesh.K