sapdev logo background
sapdev logo sapdev logo
Comments

ABAP parameter as checkbox plus initiate 'AT selection-screen' EVENT to unselect other checkboxes




In-order for the checkbox selection process to initiate the 'AT selection-screen' event you simply need to add the 'USER-COMMAND' option to the parameter declaration. Once you have done this you can add your own processing when a user checks a checkbox.

The example below simply uses this functionality to deselect all the other checkboxes once the user selects a checkbox.


*Code used to Initiate the 'AT selection-screen' EVENT from radiobuttons.
REPORT  CHECKBOX.

DATA: gd_ucomm type sy-ucomm.

PARAMETERS: p_check1 AS CHECKBOX USER-COMMAND check1,
            p_check2 AS CHECKBOX USER-COMMAND check2.

************************************************************************
*AT SELECTION-SCREEN.
AT SELECTION-SCREEN.
  gd_ucomm = sy-ucomm.

************************************************************************
*AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN OUTPUT.
  case gd_ucomm.
    when 'CHECK1'.
      clear: p_check2.
    when 'CHECK2'.
       clear: p_check1.
  endcase.

Also see:
Initiate AT selection-screen from CHECKBOX
Initiate AT selection-screen from RADIOBUTTON
Initiate AT selection-screen from LISTBOX dropdown
<--Report selection screen main menu




comments powered by Disqus