sapdev logo background
sapdev logo sapdev logo
Comments

Initiate the 'AT selection-screen' EVENT from a checkbox




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. See the ABAP code below to see how this is done. You can also just copy the code into an new ABAP program and execute it to see how it works.

The example below simply uses this functionality to make all the other checkboxes display only once the user selects one of the checkbox.


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

DATA: gd_ucomm type sy-ucomm.

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

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

************************************************************************
*AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN OUTPUT.
  case 'X'.
    when p_check1.
      loop at screen.
        if screen-name CS 'P_CHECK1'.
          screen-input = 1.
        else.
          screen-input = 0.
        endif.
        modify screen.
      endloop.
    when p_check2.

      loop at screen.
        if screen-name CS 'P_CHECK2'.
          screen-input = 1.
        else.
          screen-input = 0.
        endif.
        modify screen.
      endloop.
  endcase.


Also see:
Deselect other checkboxes on selection
Initiate AT selection-screen from RADIOBUTTON
Initiate AT selection-screen from LISTBOX dropdown
<--Report selection screen main menu




comments powered by Disqus