Hide a obligatory parameter when changing radio buttons
31,717
If you use PARAMETERS ... OBLIGATORY
, this is an unconditional statement - this parameter is required regardless of the other settings. If you need a conditional check, you have to code it for yourself:
PARAMETERS p_chkbuk AS CHECKBOX.
PARAMETERS p_bukrs TYPE bukrs.
AT SELECTION-SCREEN ON p_bukrs.
IF p_chkbuk = abap_true AND p_bukrs IS INITIAL.
MESSAGE 'You need to enter something.' TYPE 'I' DISPLAY LIKE 'E'.
ENDIF.
Author by
luiserta
Updated on December 27, 2020Comments
-
luiserta over 3 years
I have some radiobuttons and when I change between them some blocks appear/disappear.
However, if I set parameters as obligatory or required they do not hide unless I fill them. I want to make parameters required but I need to hide them when I change the radiobutton option.