Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to add OBLIGATORY for SELECT-OPTIONS

Former Member
0 Kudos

Hi experts,

I can use OBLIGATORY for PARAMETERS

PARAMETERS :s_WMno  TYPE LINK-LGNUM DEFAULT 'SCA' OBLIGATORY.

I want to add OBLIGATORY for SELECT-OPTIONS. How to do this?


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
    SELECT-OPTIONS:  s_matnr FOR mara-matnr .
SELECTION-SCREEN END OF BLOCK b1.

Many thanks.

2 REPLIES 2

Former Member
0 Kudos

Hi,

Please read documentation of select-options syntax. you can refer below


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
    SELECT-OPTIONS:  s_matnr FOR mara-matnr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.

regards,

former_member1245113
Active Contributor
0 Kudos

Hi,

TABLES spfli.
SELECT-OPTIONS : carrid FOR spfli-carrid OBLIGATORY. " This makes only Low field Obligatory

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name = 'CARRID-HIGH'. " To make High field also obligatory
      screen-required = 1.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Cheerz

Ram