Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

check box

Former Member
0 Likes
390

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.

3 REPLIES 3
Read only

Former Member
0 Likes
369

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

Read only

Former Member
0 Likes
369

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.

Read only

Former Member
0 Likes
369

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