ALV with select all option
i have written a ALV report program. One of the field in the output is a check box. The progarm has a button in the PF-status to select all the check boxes. I have written the below code to achive this functionality.
LOOP AT gi_postprv INTO gw_postprv.
IF gw_postprv-chk_box NE 'X'.
gw_postprv-chk_box = 'X'.
MODIFY gi_postprv FROM gw_postprv INDEX
sy-tabix TRANSPORTING chk_box .
where gi_postprv is my output table.
The above is not achieving the desired functionality. I want to know if the above is correct? if not what else modification do i need to make.