‎2006 Nov 23 11:49 AM
hello,
i have created an ALV grid with OO and displayed contents of an internal table in container. A field of internal table is displayed as check mark. I want to find out which lines are checked before i go to another processing screen. event handler for data_changed does not work because it waits for Enter or focus change but i directly press a pushbutton to go to the other screen.
Thx in advance
Ali
‎2006 Nov 23 11:53 AM
In the PAI of the screen.
CALL METHOD check_changed_data OF THE GRID.
Now, all the data change on the grid, is updated to the table. So, you can loop at the table and find out which rows are checked for the specific check box column.
LOOP AT ITAB WHERE CHECKBOX = 'X'.
ENDLOOP.
Regards,
Ravi
Note - Please mark all the helpful answers
‎2006 Nov 23 11:51 AM
hi Ali,
BCALV_EDIT_01 This report illustrates the simplest case of using an editable/noneditable ALV Grid Control.
BCALV_EDIT_02 This report illustrates how to set chosen cells of an ALV Grid Control editable.
pls go thru the above stndard SAP OOPS programs.
they are very helpful to solve ur issue.
rgds
Anver
‎2006 Nov 23 11:52 AM
hi,
use the following code in the PAI of the screen
CALL METHOD grid1->check_changed_data.
grid1 is the grid instance.
this will trigger the handle_data_changed method.
Message was edited by:
Sandeep S
‎2006 Nov 23 11:53 AM
Hi Ali
Hi you can try function check_changed_data of ALV on some button click.
hope this helps
‎2006 Nov 23 11:53 AM
In the PAI of the screen.
CALL METHOD check_changed_data OF THE GRID.
Now, all the data change on the grid, is updated to the table. So, you can loop at the table and find out which rows are checked for the specific check box column.
LOOP AT ITAB WHERE CHECKBOX = 'X'.
ENDLOOP.
Regards,
Ravi
Note - Please mark all the helpful answers
‎2006 Nov 23 11:53 AM
in OO it will automatically detect the changes made in the container
may be u had missed something
in the layout have u added this
wa_layout-box_fname = 'CHECKBOX'.
where CHECKBOX is the name of that field in ur internal table