If you are talking about the Dynamic Selections, then you can only protect the fields. Example with demo program DEMO_LIST_OUTPUT
(which is based on the F1S
Logical Database):


You can only protect those fields against input, and all other attributes are deactivated (they are not implemented as you can see in subroutine MODIFY_SCREEN
of program SAPLSSEL
).
The only possible workaround to simulate a mandatory field is to implement ABAP code after the user has entered selections (or not). For instance, in the program DEMO_LIST_OUTPUT
, you may add this ABAP code which checks that the screen field "Connection Number" contains a value when the user executes the program:
TABLES sscrfields.
AT SELECTION-SCREEN.
DATA dynsel TYPE rsds_trange.
CALL FUNCTION 'RS_REFRESH_FROM_DYNAMICAL_SEL'
EXPORTING
curr_report = sy-repid
mode_write_or_move = 'W'
IMPORTING
p_trange = dynsel
EXCEPTIONS
not_found = 1
wrong_type = 2.
DATA(connid) = VALUE spfli-connid(
dynsel[ tablename = 'SPFLI'
]-frange_t[ fieldname = 'CONNID'
]-selopt_t[ 1 ]-low OPTIONAL ).
IF sscrfields-ucomm = 'ONLI' AND connid IS INITIAL.
MESSAGE 'Flight Connection number is required' TYPE 'E'.
ENDIF.
NB: Tested with ABAP 7.52. Dynamic Selections can be implemented implicitly via Logical Databases (which are obsolete since ABAP 7.02 or 7.31) or explicitly by calling the function modules FREE_SELECTIONS_INIT
and FREE_SELECTIONS_DIALOG
.