Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

is there a command for setting the selection option to be mandatory

hi,

i have a 4 select-option in my program, and i would set that, either one select option must be fill to execute the program. which mean, at least one field ( any select option) have to be enter, or else it will not run. is there a command to restrict on this?

please help. thanks

Tags:
Former Member
Former Member replied

Hi Lee,

I think you can add simple validation code after START-OF-SELECTION.

See below sample code:

  IF S_OPT1[] IS INITIAL
  AND S_OPT2[] IS INITIAL
  AND S_OPT3[] IS INITIAL
  AND S_OPT4[] IS INITIAL.
    MESSAGE I398(00) WITH 'Please insert at least one selection'.
    LEAVE LIST-PROCESSING.
  ENDIF.  

Regards,

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question