07-07-2011 1:51 PM
Hi,
I am displaying an ALV grid using REUSE_ALV_GRID_DISPLAY.............................I have a editable checkbox against each row which is selectable by user. Also i have an 'Select all' and 'Deselect all' button to select/deselect all rows..................I have coded the functionality to select/deselct all table rows when theses button are clicked
Now the issue I am facing....................Using filter function user can filter the rows in the ALV gird.................In this scenario, when user click on the 'Select all' button then only for the rows displayed in the ALV grid should be selected (i.e checkbox checked)......................But with my current code, all rows of ALV grid (visible and hidden) rows are selected....................
Does any one know how to read the visible rows of the ALV grid......................Or an idea/experience how to solve this
Thanks and have a good day.....................................
07-07-2011 2:07 PM
Use method [get_filtered_entries|http://help.sap.com/saphelp_46c/helpdata/en/0a/b552fdd30911d2b467006094192fe3/frameset.htm] of class [CL_GUI_ALV_GRID|http://help.sap.com/saphelp_46c/helpdata/en/22/a3f5ecd2fe11d2b467006094192fe3/frameset.htm] you will get all indexes that are currently hidden on the screen, do not update the selection box value for those records.
To get a reference variable to CL_GUI_ALV_GRID instance, use FM GET_GLOBALS_FROM_SLVC_FULLSCR in your USER_COMMAND form.
Regards,
Raymond
PS: Why did you code yourself what looks like a standard function of ALV Grid ?
07-07-2011 2:07 PM
Use method [get_filtered_entries|http://help.sap.com/saphelp_46c/helpdata/en/0a/b552fdd30911d2b467006094192fe3/frameset.htm] of class [CL_GUI_ALV_GRID|http://help.sap.com/saphelp_46c/helpdata/en/22/a3f5ecd2fe11d2b467006094192fe3/frameset.htm] you will get all indexes that are currently hidden on the screen, do not update the selection box value for those records.
To get a reference variable to CL_GUI_ALV_GRID instance, use FM GET_GLOBALS_FROM_SLVC_FULLSCR in your USER_COMMAND form.
Regards,
Raymond
PS: Why did you code yourself what looks like a standard function of ALV Grid ?
07-07-2011 3:26 PM
Thanks Raymond Giuseppi for the speedy and needy tip....................
This ALV grid is used in a workflow..................based on the user selection the next process are determined.......................Also apart from selection these CB has more business functionalitywhich detemines the subsequent process.............................