‎2007 Mar 30 4:21 PM
HI all ,
in basic list am having check boxes am selecting all the records by default , but now i need to deselect all the records through any function key or app tool bar .
how to deselect all the records.
Thanks&Regards.
Ramu.
‎2007 Mar 30 4:29 PM
Hi Ramu..
If you are not using ALV..
then for this you need to write your own logic just send your code .. i will try to look
that one
Regards Rk
‎2007 Mar 30 4:30 PM
Hi ramu,
If the button for select all is defined with a function code SELALL, the
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'SELALL'.
DO lines TIMES.
READ LINE sy-index FIELD VALUE box.
IF box = space.
box = 'X'.
ENDIF.
ENDDO.
ENDCASE.
‎2007 Mar 30 4:48 PM
Hi,
Please check this sample program.
REPORT ZTEST.
DATA: CHECK(1) TYPE C.
START-OF-SELECTION.
SET PF-STATUS 'MAIN'. < ---- define function codes
* Write the initial list
DO 5 TIMES.
WRITE:/ CHECK AS CHECKBOX, SY-INDEX.
ENDDO.
AT USER-COMMAND.
* Set the checkbox on or off
CASE SY-UCOMM.
WHEN 'SELALL'.
CHECK = 'X'.
WHEN 'DELALL'.
CHECK = SPACE.
ENDCASE.
* Rewrite the list
SY-LSIND = SY-LSIND - 1.
DO 5 TIMES.
WRITE:/ CHECK AS CHECKBOX, SY-INDEX.
ENDDO.
CLEAR SY-UCOMM.
Regards,
Ferry Lianto