2007 Sep 05 10:22 AM
ON THE ALV SCREEN I NEED TO PUT SELECT ALL, DESELECT ALL FUNCTIONS. AM ABLE TO PUT THE ICONS USING guiSTATUS. BASICALLY AM SUPPOSE TO SELECT AND DESELCT ALL THE ROWS IN THE ALV REPORT UPON CLIKING THIS BUTTON. WAT CODE AM I SUPPOSE TO WRITE UNDER AT USER COMMAND?
2007 Sep 05 10:28 AM
Hi
If you insert an CHECKBOX field in your ALV, the system set those icons automatically:
DATA: LT_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: BEGIN OF T_OUTTAB OCCURS 0,
.....................
MARK,
END OF T_OUTTAB.
LT_LAYOUT-BOX_FIELDNAME = 'MARK'.
Max
2007 Sep 06 5:14 AM
Hi,
Put the function code for those 2 icons and in the PAI of the screen write this code :
1. to select all rows
call this method of cl_gui_alv_grid
set_selected_rows
Pass all the indexes of the alv table to this method and it would select all the rows.
2 to deselect all rows
use the same method as above, but do not pass any values, pass empty table
it would deselect all the rows.
Hope this helps you. if u still have any doubts, revert back to me, i will reply with a detailed code.
Regards,
Prasant
*Reward if useful