Skip to Content
0
Jun 14, 2022 at 09:34 AM

If multiple checkbox is selected, value is not being displayed

131 Views

I have 2 check boxes and if it is both selected at the same time, it doesn't get executed

SELECTION-SCREEN BEGIN OF BLOCK chk1
WITH FRAME TITLE text-008.
PARAMETERS: chk_morning AS CHECKBOX DEFAULT 'X',
chk_evening AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK chk1.
IF chk_morning = abap_true.
WRITE / 'Morning'.
ELSEIF chk_evening = abap_true.
WRITE / 'Evening'.
ELSE.
WRITE / 'Morning and Evening'.
ENDIF.

When both the checkbox morning and evening is selected, the write statement 'Morning and Evening' is not being displayed. Any help is appreciated. Thank you