Select options restriction

Hi experts,
is it possible to restrict the select options so that the user can select only from a limited list based on previous selections?
Example: user selects value "A" of attribute1 from drop-down list, then in the select options he/she would be allowed to select attr2 with attr1 = "A".
Thanks a lot!
Tomas

Hi Tomas.
I think it is not possible if you use the select options component for that.
But if you do it using the controls directly (dropdown, inputfield) you can do it easily.
So if the user selects something in dropdown A you can fill the node for dropdown B in the onselect method.
Cheers,
Sascha

Similar Messages

  • Select-options restrict possible entries

    Hi
    I use select options like in this example
    select-options: so_matnr for mara-matnr.
    In my report,when running, if pressing f4 for possible entries i only want to have material 123 and 234 for example,and not the whole list of materials.How can i restrict this possible entries to only my desired materials.
    thanks

    Hi Seba,
    1. Demo program for F4 help on Selection-screen : <b>demo_selection_screen_f4.</b>
    2. Sample program
       REPORT zvenkat_f4_for_selops MESSAGE-ID zmsg .
       TABLES :marc.
       TYPES:
          BEGIN OF t_t001w,
            werks       TYPE t001w-werks,
            name1       TYPE t001w-name1,
          END OF t_t001w,
          t_return_tab  TYPE ddshretval.
       DATA:
           w_t001w      TYPE t_t001w,
           w_return_tab TYPE t_return_tab.
       DATA:
           i_t001w      TYPE STANDARD TABLE OF t_t001w,
           i_return_tab TYPE STANDARD TABLE OF t_return_tab.
    *&      SELECTION-SCREEN
       SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
       SELECT-OPTIONS : s_werks FOR marc-werks.
       SELECTION-SCREEN END OF BLOCK b1.
    *&      AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
       AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_werks-low.
         PERFORM f4_help_for_palant USING 'S_WERKS-LOW'.
       AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_werks-high.
         PERFORM f4_help_for_palant USING 'S_WERKS-HIGH'.
    *&      Form  f4_help_for_palant
       FORM f4_help_for_palant USING l_dynprofield.
         SELECT werks name1
         FROM t001w
         INTO TABLE i_t001w.
         CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
             retfield        = 'WERKS'
             dynpprog        = sy-repid
             dynpnr          = sy-dynnr
             dynprofield     = l_dynprofield
             value_org       = 'S'
           TABLES
             value_tab       = i_t001w
             return_tab      = i_return_tab
           EXCEPTIONS
             parameter_error = 1
             no_values_found = 2
             OTHERS          = 3.
         IF sy-subrc <> 0.
           MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
         ENDIF.
       ENDFORM.                    " f4_help_for_palant
    I hope that it solves your problem.
    Thanks
    Venkat.O

  • Select options -restricting the operator value options.

    Hi,
    In selection screen for the  select options or parameter declarations  I need to restrict the operator options , like when they click for any select options it will give options to select = , #, <, <= , > , >=
    all these options right.
    I would like to restrict the user  to select only > and >=  while passing values.
    Can anyone give me idea how I can approach this?
    Thanks in advance.

    Hi,
    use this FM...
    SELECT_OPTIONS_RESTRICT can be use to supress options available with a SELECT-OPTIONS on a selection screen.
    jusy copy the code and execute it....It will give the exact output what u want.....
    TYPE-POOLS sscr.
    TABLES : marc.
    *Define the object to be passed to the RESTRICTION parameter
    DATA restrict TYPE sscr_restrict.
    *Auxiliary objects for filling RESTRICT
    DATA : optlist TYPE sscr_opt_list,
    *** TYPE sscr_***.
    *Defining the selection-screen
    SELECT-OPTIONS : s_matnr FOR marc-matnr,
    s_werks FOR marc-werks.
    INITIALIZATION.
    *Restricting the MATNR selection to only EQ and 'BT'.
    optlist-name = 'OBJECTKEY1'.
    optlist-options-eq = 'X'.
    optlist-options-bt = 'X'.
    APPEND optlist TO restrict-opt_list_tab.
    ***-kind = 'S'.
    ***-name = 'S_MATNR'.
    ***-sg_main = 'I'.
    ***-sg_addy = space.
    ***-op_main = 'OBJECTKEY1'.
    APPEND *** TO restrict-***_tab.
    *Restricting the WERKS selection to CP, GE, LT, NE.
    optlist-name = 'OBJECTKEY2'.
    optlist-options-cp = 'X'.
    optlist-options-ge = 'X'.
    optlist-options-lt = 'X'.
    optlist-options-ne = 'X'.
    APPEND optlist TO restrict-opt_list_tab.
    ***-kind = 'S'.
    ***-name = 'S_WERKS'.
    ***-sg_main = 'I'.
    ***-sg_addy = space.
    ***-op_main = 'OBJECTKEY2'.
    APPEND *** TO restrict-***_tab.
    CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
    restriction = restrict
    EXCEPTIONS
    too_late = 1
    repeated = 2
    selopt_without_options = 3
    selopt_without_signs = 4
    invalid_sign = 5
    empty_option_list = 6
    invalid_kind = 7
    repeated_kind_a = 8
    OTHERS = 9.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Regards
    Kiran

  • Select option restriction to particular rows

    Dear Gurus,
    I have searched the form for this but couldn't find the particular solution.
    my scenario is i need to enter only 5 plants in the select options it should not exceed  it, for this i have done  like
    select options :S_PLANT FOR  G_PLANT NO INTERVALS.
    CONSTANTS:   LC_OPT_LIST TYPE RSREST_OPL VALUE 'OPT_LIST',
                    LC_S        TYPE RSSCR_KIND VALUE 'S',
                    LC_MAT      TYPE BLOCKNAME  VALUE 'S_PLANT',
                    LC_INC      TYPE C          VALUE 'I'.
       DATA:  LW_OPT_LIST TYPE SSCR_OPT_LIST,
              LW_RESTRICT TYPE SSCR_RESTRICT,
              LW_***      TYPE SSCR_***.
       LW_OPT_LIST-NAME       = LC_OPT_LIST.
       LW_OPT_LIST-OPTIONS-BT = SPACE.
       LW_OPT_LIST-OPTIONS-EQ = 'X'.
       APPEND LW_OPT_LIST TO LW_RESTRICT-OPT_LIST_TAB.
       LW_***-KIND    = LC_S.
       LW_***-NAME    = LC_MAT.
       LW_***-SG_MAIN = LC_INC.
       LW_***-OP_MAIN = LC_OPT_LIST.
       APPEND LW_*** TO LW_RESTRICT-***_TAB.
       CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
         EXPORTING
           RESTRICTION            = LW_RESTRICT
         EXCEPTIONS
           TOO_LATE               = 1
           REPEATED               = 2
           SELOPT_WITHOUT_OPTIONS = 3
           SELOPT_WITHOUT_SIGNS   = 4
           INVALID_SIGN           = 5
           EMPTY_OPTION_LIST      = 6
           INVALID_KIND           = 7
           REPEATED_KIND_A        = 8
           OTHERS                 = 9.
    now when i click the extension button i will be getting the popup window with ' SELECT SINGLE VALUES' sub screen  now in this i need only 5 rows
    I don't know weather this is possible or not.
    If yes . can any one explain this ?
    Thanks in advance .
    Regards
    Rakesh S.

    I do not think it is possible without changing the SAP standard (program RSDBRUNT). That is not something you want to do.
    The only way I can think of is creating  a module pool program and define your own screen instead of the selection screen and place a tabcontrol where you can limit the amount of lines programmatically.

  • Select options: Restricting Value Display in Search Help Parameters

    Hello friends,
    I have following requirement.
    I have declared one select option. On that select options I'am having different search help paremeters on which I can restrict the search help values display.
    Can I specify the restriction in search help at the time of programming so that it would display only the values that follows the given restriction?
    I can ofcourse do this by AT SELECTION-SCREEN ON VALUE REQUEST, however I am trying to avoid this.
    How can I proceed?
    Points will be rewarded generously.
    Best Regards,
    Navin

    hI
    SEE THIS CODE
    **************DATA TYPES DECLARATION **********************
    TABLES: HRP1001, HRP1026, HRP1000,PCHDY.
    TYPE-POOLS SLIS.
    TYPES :BEGIN OF ST_OUTPUT,
            COUNT TYPE STRING,
            OBJID TYPE HRP1001-OBJID,
            STEXT TYPE HRP1000-STEXT,
            BEGDA TYPE HRP1000-BEGDA,
            ENDDA TYPE HRP1000-ENDDA,
            CANCRT TYPE T77CRT-CANCRT,
            AEDTM TYPE HRP1026-AEDTM,
            UNAME TYPE HRP1026-UNAME,
            LSTEXT TYPE HRP1000-STEXT,
           RINVT TYPE T777V-RINVT,
           END OF ST_OUTPUT.
    TYPES: BEGIN OF ST_HRP1000,
            OBJID TYPE HRP1001-OBJID,
            STEXT TYPE HRP1000-STEXT,
           END OF ST_HRP1000.
    TYPES : BEGIN OF ST_HRP1001,
             OTYPE TYPE HRP1001-OTYPE,
             OBJID TYPE HRP1001-OBJID,
             RELAT type hrp1001-RELAT,
             BEGDA TYPE HRP1001-BEGDA,
             ENDDA TYPE HRP1001-ENDDA,
             SCLAS TYPE HRP1001-SCLAS,
             SOBID TYPE HRP1001-SOBID,
            END OF ST_HRP1001.
    TYPES : BEGIN OF ST_HRP1026,
             OTYPE TYPE HRP1026-OTYPE,
             OBJID TYPE HRP1001-OBJID,
             AEDTM TYPE HRP1026-AEDTM,
             UNAME TYPE HRP1026-UNAME,
             DELET TYPE HRP1026-DELET,
             CANCR TYPE HRP1026-CANCR,
            END OF ST_HRP1026.
    TYPES : BEGIN OF ST_REASON,
             CANCR TYPE HRP1026-CANCR,
             CANCRT TYPE T77CRT-CANCRT,
            END OF ST_REASON.
    TYPES : BEGIN OF ST_SOBID,
             OTYPE TYPE HRP1001-OTYPE,
             OBJID TYPE HRP1001-OBJID,
             RELAT type hrp1001-OBJID,
             BEGDA TYPE HRP1001-BEGDA,
             ENDDA TYPE HRP1001-ENDDA,
             SCLAS TYPE HRP1001-SCLAS,
             SOBID TYPE HRP1001-OBJID,
            END OF ST_SOBID.
    TYPES : BEGIN OF ST_OBJID,
             OBJID TYPE HRP1001-OBJID,
            END OF ST_OBJID.
    TYPES : BEGIN OF ST_LOCATION,
             OTYPE TYPE HRP1001-OTYPE,
             OBJID TYPE HRP1001-OBJID,
             RSIGN TYPE HRP1001-RSIGN,
             RELAT TYPE HRP1001-RELAT,
             SCLAS TYPE HRP1001-SCLAS,
             SOBID TYPE HRP1001-SOBID,
            END OF ST_LOCATION.
    TYPES : BEGIN OF ST_LOCATION1,
             OTYPE TYPE HRP1001-OTYPE,
             OBJID TYPE HRP1001-OBJID,
             RSIGN TYPE HRP1001-RSIGN,
             RELAT TYPE HRP1001-RELAT,
             SCLAS TYPE HRP1001-SCLAS,
             SOBID TYPE HRP1001-OBJID,
            END OF ST_LOCATION1.
    TYPES : BEGIN OF ST_LSTEXT,
             OTYPE TYPE HRP1000-OTYPE,
             OBJID TYPE HRP1000-OBJID,
             LSTEXT TYPE HRP1000-STEXT,
            END OF ST_LSTEXT.
    TYPES : BEGIN OF ST_OBJID_SH,
             OTYPE TYPE HRP1000-OTYPE,
             OBJID TYPE HRP1000-OBJID,
            END OF ST_OBJID_SH.
    DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.
    DATA : WA_OBJID_SH TYPE ST_OBJID_SH.
    DATA : IT_LSTEXT TYPE STANDARD TABLE OF ST_LSTEXT.              "TOS STORE THE TEXT OF COURCE LOCATION
    DATA : WA_LSTEXT TYPE ST_LSTEXT.
    DATA : IT_LOCATION TYPE STANDARD TABLE OF ST_LOCATION.          " TO STORE THE LOCATION OF COURCE
    DATA : WA_LOCATION TYPE ST_LOCATION.
    DATA : IT_LOCATION1 TYPE STANDARD TABLE OF ST_LOCATION1.        " TO CONVERT SOBID INTO OBJID FOR COURCE LOCATION
    DATA : WA_LOCATION1 TYPE ST_LOCATION1.
    DATA : IT_SOBID TYPE STANDARD TABLE OF ST_SOBID.                " TO CHANGE THE SOBID OF HRP1001 TO OBJID OF HRP1026
    DATA : WA_SOBID TYPE ST_SOBID.                                   " BY USING FOR ALL ENTRIES
    DATA : IT_REASON TYPE STANDARD TABLE OF ST_REASON.              "TO STORE T HE REASON FOR CANCELL TEXT
    DATA : WA_REASON TYPE ST_REASON.
    DATA : IT_OUTPUT TYPE STANDARD TABLE OF ST_OUTPUT.               "OUTPUT FEILDS OF REPORT.
    DATA : WA_OUTPUT TYPE ST_OUTPUT.
    DATA : IT_OUTPUT_1 TYPE STANDARD TABLE OF ST_OUTPUT.               " TEMP OUTPUT FEILDS OF REPORT.
    DATA : WA_OUTPUT_1 TYPE ST_OUTPUT.
    DATA : IT_HRP1000 TYPE STANDARD TABLE OF ST_HRP1000.             "DATA FROM HRP1000 TABLE
    DATA : WA_HRP1000 TYPE ST_HRP1000.
    DATA : IT_HRP1001 TYPE STANDARD TABLE OF ST_HRP1001.             "DATA FROM HRP1001 TABLE
    DATA : WA_HRP1001 TYPE ST_HRP1001.
    DATA : IT_HRP1026 TYPE STANDARD TABLE OF ST_HRP1026.              "DATA FROM HRP1026 TABLE
    DATA : WA_HRP1026 TYPE ST_HRP1026.
    DATA : IT_OBJID TYPE STANDARD TABLE OF ST_OBJID.                  " TO STORE THE OBJID OF HRP1001
    DATA : WA_OBJID TYPE ST_OBJID.
    DATA: WS_FCAT    TYPE SLIS_FIELDCAT_ALV .                         " FEILDCATALOG FOR ALV REPORT
    DATA: IN_FCAT    TYPE SLIS_T_FIELDCAT_ALV.
    DATA: W_LAYOUT   TYPE SLIS_LAYOUT_ALV.
    DATA : LV_COUNT TYPE I.                                           "FEILD FOR SERIAL NUMBER
    ***************************END OF DATA DECLARATION******************************************
    ************SELECTION SCREEN DESIGN************************
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    *SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .
    SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .
    SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    ***********END OF SELECTION SCREEN DESIGN******************
    *****INITIALIZATION VENT TO ASIGN DEFAULT VALUES TO OTYPE
    *INITIALIZATION.
    S_OTYPE-LOW = 'D'.*
    S_OTYPE-SIGN = 'I'.*
    S_OTYPE-OPTION = 'EQ'.*
    APPEND S_OTYPE.*
    CLEAR S_OTYPE.*
    **************END OF EVENT INITIALIZATION******************
    **********VALIDATION FOR SCREEN FIELDS*********************
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.
    IF S_OBJID IS NOT INITIAL.*
        SELECT OTYPE OBJID FROM HRP1000
                     INTO TABLE IT_OBJID_SH
                     WHERE OTYPE = 'D'.
    IF SY-SUBRC EQ 0.
    SEARCH HELP FOR QUALIFICATION.*
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
                 DDIC_STRUCTURE         = ' '*
            RETFIELD               =  'OBJID'
                 PVALKEY                = ' '*
           DYNPPROG               = SY-REPID
           DYNPNR                 = SY-DYNNR
           DYNPROFIELD            = 'S_OBJID'
                 STEPL                  = 0*
                 WINDOW_TITLE           =*
                 VALUE                  = ' '*
           VALUE_ORG              = 'S'
                 MULTIPLE_CHOICE        = ' '*
                 DISPLAY                = ' '*
                 CALLBACK_PROGRAM       = ' '*
                 CALLBACK_FORM          = ' '*
                 MARK_TAB               =*
               IMPORTING*
                 USER_RESET             =*
          TABLES
            VALUE_TAB              =  IT_OBJID_SH
                 FIELD_TAB              =*
                 RETURN_TAB             = RETURN_TAB*
                 DYNPFLD_MAPPING        =*
               EXCEPTIONS*
                 PARAMETER_ERROR        = 1*
                 NO_VALUES_FOUND        = 2*
                 OTHERS                 = 3*
        IF SY-SUBRC <> 0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO*
                      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.*
        ENDIF.
      ENDIF.

  • Select-options restrict

    dear all,
                 Ive searched forums and then posting .i have to restrict document type in a selection screen with only three values.
                VR,RD,DG.
                i have used 'SELECT_OPTIONS_RESTRICT". but unable to understand where should i pass my three values .
    please explain and correct me?
    regards,

    Hi Naren
    Try this
    first
    **F4 help to fetch Accounting Document Number
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_belnr-low.
      lv_string = 'S_BELNR-LOW'.
    **Fatch the Accounting No. List from database table
      PERFORM select_belnr USING lv_string
                           CHANGING i_bkpf.
    **Show F4 list
      PERFORM f4_belnr_list USING  lv_string
                            CHANGING s_belnr-low.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_belnr-high.
      lv_string = 'S_BELNR-HIGH'.
    **Fatch the Accounting No. List from database table
      PERFORM select_belnr USING lv_string
                           CHANGING i_bkpf.
    **Show F4 list
      PERFORM f4_belnr_list USING  lv_string
                         CHANGING s_belnr-high.
    FORM select_belnr  USING lv_string TYPE dfies-fieldname
                       CHANGING p_i_bkpf TYPE t_bkpf.
      RANGES: s_belnr1 FOR bkpf-belnr.
      CLEAR: p_i_bkpf.
      CLEAR s_belnr1[].
    **Fetch the values entered by user on selection screen
      PERFORM read_selection_screen USING lv_string.
    **Read the value
      READ TABLE dynfields WITH KEY fieldname = lv_string.
      IF sy-subrc = 0
      AND dynfields-fieldvalue IS NOT INITIAL.
        s_belnr1-low = dynfields-fieldvalue.
        s_belnr1-sign = 'I'.
        s_belnr1-option  ='CP'.
        APPEND s_belnr1.
      ENDIF.
    **Fetch the data from database table
      SELECT belnr
        FROM bkpf
    INTO TABLE p_i_bkpf
        WHERE bukrs GE space
          AND belnr IN s_belnr1
          AND gjahr GE space
          AND blart EQ 'AB'.
    **Remove Duplicate Records
      SORT p_i_bkpf BY belnr.
      DELETE ADJACENT DUPLICATES FROM p_i_bkpf.
    ENDFORM.                    " SELECT_BELNR
    FORM f4_belnr_list  USING    p_retfield
                        CHANGING p_belnr.
      CLEAR: ret_tab.
    **Call F4 Help Value-request
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = p_retfield
          value_org       = 'S'
        TABLES
          value_tab       = i_bkpf
          return_tab      = ret_tab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    **Read the Value selected by user
      READ TABLE ret_tab INTO w_ret_tab INDEX 1.
      IF sy-subrc = 0.
        p_belnr = w_ret_tab-fieldval.
      ENDIF.
      CLEAR: i_bkpf,
             ret_tab.
    ENDFORM.                    " F4_BELNR_LIST
    FORM read_selection_screen USING    p_dynfields TYPE dfies-fieldname.
      CLEAR: dynfields.
      REFRESH : dynfields.
    **Append field name
      dynfields-fieldname = p_dynfields.
      APPEND dynfields.
    **Fetch the field Values
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = sy-cprog
          dynumb     = sy-dynnr
        TABLES
          dynpfields = dynfields.
    ENDFORM.                    " READ_SELECTION_SCREEN
    DECLARATION PART
    TYPES: BEGIN OF ty_bkpf,
           belnr TYPE bkpf-belnr,
           END OF ty_bkpf.
    TYPES: t_bkpf  TYPE TABLE OF ty_bkpf.
    Data: i_bkpf      TYPE t_bkpf.
    DATA: dynfields TYPE TABLE OF dynpread WITH HEADER LINE.
    DATA: ret_tab TYPE STANDARD TABLE OF ddshretval,
          w_ret_tab TYPE ddshretval.
    Try the aboe code hope this will work for you.
    thanks
    lalit

  • MDM Syndication selection option restrictions

    Hi all,
    In the MDM Syndicator is it possible to only syndicate certain details of the header record for a header and detail hierarchy structure?
    For our Scenario, GL Account has the hierarchy as a Single Chart of Accounts assigned to multiple Company Code records.
    ·         GL Account Master Record
    ·         Chart of Account Details (SKA1 - Header)
              o        Company Code Details (SKB1 - Detail)
    In the repository we have SKA1 as the Main table and SKB1 as a sub table within SKA1. While the content is imported it comes in as 1 Record with multiple Company code level details. Is there anyway to restrict the selection for syndication for a given SKA1 - Header and get only the selected SKB1 - Details syndicated?
    For example if for Chart of Account has 5 company codes A, B, C, D and E. Can we restrict the syndication of the of the record with selected company code details only (Example B and D - without the details for A, B, C being syndicated).
    I appreciate the time.
    Thanks,
    -Raj.

    Hi Raj
    Here I do have some suggestions regarding your request, correct me if i am wrong, basically you are looking to syndicate the records by applying the filter row wise or column wise.
    <u><b>Row wise :</b></u> Required all the field but search criteria as one or two fields ( for example filtering based on COA and Company code).
    <u><b>Column wise :</b></u> Required only few fields to be syndicate, either row wise filter applied or not.
    Hope I understood your question.
    <u><b>Solution:</b></u>
    <u><b>Row wise :</b></u> Use search parameter tab, search for particular COA and Company code and save the search for future purpose [from MENu  SEARCH->SAVE SEARCH].
    <u><b>Column wise :</b></u> Create Destination items for the fields which u want to syndicate and try to map those fields wt Original source items and try to syndicate the same.
    Hope I have covered the point what you expected.
    thanks
    Alexander
    P.S. Kindly reward the points, i found helpful.

  • Restricting Select Options to Multiple Single Entries

    Hi All,
           I have a requirement where we have two select options. I need to restrict only One of the select options to only accept multiple single entries. I have tried using the  'SELECT_OPTIONS_RESTRICT'  Function module. But it provided little help to me.
    Please check the below code.
    gv_w_opt_list-name = 'A'.
      gv_w_opt_list-options-eq = 'X'.
      APPEND gv_w_opt_list TO gv_w_res-opt_list_tab.
      gv_w_***-kind = 'A'. 
      gv_w_***-name = 'YTRADE_DESC'.
      gv_w_***-sg_main = '*'.
      gv_w_***-sg_addy = 'N'.
      gv_w_***-op_main = 'A'. 
      APPEND gv_w_*** TO gv_w_res-***_tab.
    It allows to restrict intervals for select-options in selection screen
        CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
          EXPORTING
            program                = sy-repid
            restriction            = gv_w_res
          EXCEPTIONS
            too_late               = 1
            repeated               = 2
            selopt_without_options = 3
            selopt_without_signs   = 4
            invalid_sign           = 5
            empty_option_list      = 6
            invalid_kind           = 7
            repeated_kind_a        = 8
            OTHERS                 = 9.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Please help me if you have any information related to this requirement. Relevant anwers will be surely rewarded.
    Regards
    Nagaraj

    I have a code sample I use in a report. Result is only EQ and no intervals and no excludes
    LOAD-OF-PROGRAM.
        Subscreen: Select Options for delivery                                    *
      SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN
                                          NO INTERVALS.
      SELECT-OPTIONS:
      so_dlvno FOR /scwm/s_aspq_tu-docno
                                     MODIF ID dlv .
      SELECTION-SCREEN END OF SCREEN 1100.
        Subscreen: Select Options Restrictions                                  *
    Include type pool SSCR
      TYPE-POOLS sscr.
    Define the object to be passed to the RESTRICTION parameter
      DATA restrict TYPE sscr_restrict.
    Auxiliary objects for filling RESTRICT
      DATA t_opt_list TYPE sscr_opt_list.
      DATA ***      TYPE sscr_***.
      CLEAR ***.
      ***-kind    = 'S'.        "Apply only to the named SELECT-OPTION
      ***-name    = 'SO_DLVNO'.  "This is name of the SELECT-OPTION
      ***-sg_main = 'I'.        "I = ONLY Inclusions; * = Both
      ***-op_main = 'NOINTERVALS'. "This must match opt_list-name
      APPEND *** TO restrict-***_tab.
    Create t_opt_list entry to specify capabilities of S_BUKRS.
      CLEAR t_opt_list.
      t_opt_list-name       = 'NOINTERVALS'."This must match ***_tab-op_main
      t_opt_list-options-bt = space.     "Do not permit BETWEEN
      t_opt_list-options-cp = space.     "Do not permit MATCHES-PATTERN
      t_opt_list-options-eq = 'X'.       "       Permit EQUALS
      t_opt_list-options-ge = space.     "Do not permit GREATER-OR-EQUAL
      t_opt_list-options-gt = space.     "Do not permit GREATER-THAN
      t_opt_list-options-le = space.     "Do not permit LESS-OR-EQUAL
      t_opt_list-options-lt = space.     "Do not permit LESS-THAN
      t_opt_list-options-nb = space.     "Do not permit NOT-BETWEEN
      t_opt_list-options-ne = space.     "Do not permit NOT-EQUAL
      t_opt_list-options-np = space.     "Do not permit NO-PATTERN-MATCH
      APPEND t_opt_list TO restrict-opt_list_tab.
    Call function module
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
        EXPORTING
          restriction                = restrict
        EXCEPTIONS
          too_late                   = 1
          repeated                   = 2
          not_during_submit          = 3
          db_call_after_report_call  = 4
          selopt_without_options     = 5
          selopt_without_signs       = 6
          invalid_sign               = 7
          report_call_after_db_error = 8
          empty_option_list          = 9
          invalid_kind               = 10
          repeated_kind_a            = 11
          OTHERS                     = 12.
    Exception handling
      IF sy-subrc NE 0.
      ENDIF.
    Edited by: Suhel Awad on Feb 1, 2011 3:06 PM

  • How to restrict more than one 1 range in select option on selection screen.

    Hi all,
    I have a requirement where I need to restrict user from giving more than 1 range for a date selct option ..other all features of multiple selection will be as usual...
    for eg we can do this if we disable / hide other cells if the user clicks on multiple ranges tab.. If only 1 cell is available to give the range user will not be able to give more than 1 range....
    I was thinking if I could use select_options_restrict but how do i fill its parameters...
    Can anyone send me the sample code or the same to achieve this functionality...I have used select_options_restrict to hide multiple ranges itself  ... But here user will be able to give range but only 1....
    Thanks and Regards
    Sweta

    HI,
    Please try the below logic.
    SELECT-OPTIONS: so_addr   FOR    ADR6-SMTP_ADDR NO INTERVALS.
    ***********remove_range_for_select_option******************* .
      DATA: ls_restrict  TYPE  SSCR_RESTRICT,    "The type for SELECT_OPTIONS_RESTRICT
            ls_opt_list  TYPE  SSCR_OPT_LIST,    "One list of options
            ls_asn       TYPE  SSCR_***.         "One line of table associating selection screen
                                                                      "object with opt. list
      CLEAR: ls_restrict,
             ls_opt_list,
             ls_asn.
    *Only EQ valid, discrete values, Include & Exclude
      ls_opt_list-name       = 'EQ'.
      ls_opt_list-options-eq = 'X'.
      APPEND ls_opt_list TO ls_RESTRICT-OPT_LIST_TAB.
      LS_ASN-KIND            = 'S'.
      LS_ASN-NAME            = 'SO_ADDR'.            "Select Option
      LS_ASN-SG_MAIN         = 'I'.
      LS_ASN-SG_ADDY         = '*'.
      LS_ASN-OP_MAIN         = 'EQ'.
      LS_ASN-OP_ADDY         = ' '.
      APPEND LS_ASN TO LS_RESTRICT-***_TAB.
    *Make use of SELECT-OPTIONS easier on the selection screen
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
        EXPORTING
          RESTRICTION            = LS_RESTRICT
        EXCEPTIONS
          TOO_LATE               = 1
          REPEATED               = 2
          SELOPT_WITHOUT_OPTIONS = 3
          SELOPT_WITHOUT_SIGNS   = 4
          INVALID_SIGN           = 5
          EMPTY_OPTION_LIST      = 6
          INVALID_KIND           = 7
          REPEATED_KIND_A        = 8
          OTHERS                 = 9.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Edited by: Rajasekhar Reddy P on Mar 16, 2009 2:03 PM

  • Restrict select options

    I am using a logical database in HR.I use the selection screen of the logical database but i want to restrict a select options for only permit introduce one value.
    I restrict in abap to only use values ,nor intervals by example and other conditions.Now i have to restrict to only one value.
    it must be work like a parameter

    Hi,
    U can use No-extension to restrict multiple selcet option button.
    See this link
    http://www.sapdevelopment.co.uk/reporting/selscr/selscr_restrictso.htm
    *: Report:  ZRESTRICT_SELOPT                                           :
    *: Author:  www.SAPdev.co.uk                                           :
    *: Date  :  2004                                                       :
    *: Description: Demonstrates how to restrict select options to only    :
    *:              allow specific restriction options:                    :
    *:                                     i.e.. EQ, NE, BT etc..          :
    REPORT ZRESTRICT_SELOPT.
    * Include type pool SSCR
    TYPE-POOLS sscr.
    TABLES: EKPO.
    * Selection-screen
    select-options : so_ebeln for ekpo-ebeln,
                     so_ebelp for ekpo-ebelp.
    * Variables for populating restriction data
    DATA: gd_restrict TYPE sscr_restrict.   "structure containing 2 tables
    DATA: gd_optlist  TYPE sscr_opt_list,   "header line for table 1
          gd_***      TYPE sscr_***.        "header line for table 2
    *INITIALIZATION.
    INITIALIZATION.
    * Restrict SO_EBELN to only except EQ, BT and NE.
      gd_optlist-name = 'KEY1'.      "Can be anything
      gd_optlist-options-eq = 'X'.
      gd_optlist-options-bt = 'X'.
      gd_optlist-options-ne = 'X'.
      APPEND gd_optlist TO gd_restrict-opt_list_tab.
      clear: gd_optlist.
      gd_***-kind = 'S'.
      gd_***-name = 'SO_EBELN'.
      gd_***-sg_main = 'I'.
      gd_***-sg_addy = SPACE.
      gd_***-op_main = 'KEY1'.       "Must be same as above
      APPEND gd_*** TO gd_restrict-***_tab.
      clear: gd_***.
    * Restrict SO_EBELP to only except CP, GE, LT.
      gd_optlist-name = 'KEY2'.      "Can be anything
      gd_optlist-options-cp = 'X'.
      gd_optlist-options-ge = 'X'.
      gd_optlist-options-lt = 'X'.
      APPEND gd_optlist TO gd_restrict-opt_list_tab.
      clear: gd_optlist.
      gd_***-kind = 'S'.
      gd_***-name = 'SO_EBELP'.
      gd_***-sg_main = 'I'.
      gd_***-sg_addy = SPACE.
      gd_***-op_main = 'KEY2'.       "Must be same as above
      APPEND gd_*** TO gd_restrict-***_tab.
      clear: gd_***.
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
       EXPORTING
    *    PROGRAM                      =
        restriction                  = gd_restrict
    *    DB                           = ' '
       EXCEPTIONS
         TOO_LATE                     = 1
         REPEATED                     = 2
         SELOPT_WITHOUT_OPTIONS       = 3
         SELOPT_WITHOUT_SIGNS         = 4
         INVALID_SIGN                 = 5
         EMPTY_OPTION_LIST            = 6
         INVALID_KIND                 = 7
         REPEATED_KIND_A              = 8
         OTHERS                       = 9.
      IF sy-subrc <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Kindly reward points for the answer which helped u and close the thread if ur problem got solved.
    Message was edited by: Judith Jessie Selvi

  • Restrict Select-Options for Logical Database field

    The way we restrict select options for custom defined select option fields on selection screen.. can we restrict select options for standard Logical Database fields?
    i.e. report uses PNPCE logical database and has field called PERNR. I want to restrict select options for this PERNR field so that it has options for 'Select single values' only.
    Thanks,
    Falguni
    Edited by: Falguni V on Nov 13, 2010 6:42 AM

    You can user AT SELECTION-SCREEN event, and check whether any record is having high value for PNPPERNR.

  • Is there any restriction on no of entries in Select-option-low ?

    Is there any restriction on no of entries in Select-option-low ? I have a select option which has 22 thousand entries and the select query is thrwoing a dump.
    Any inputs ?
    Regards,
    Ankur Bhandari

    Hi Ankur,
    1. i had faced same problem.
    2. Virtually the limit in SELECT-OPTION low
       is not the problem.
    3. The problem is with SQL query and database limit.
    4. The R/3 system generates final database query
       in the form of (for select option)
       FIELD IN ('ABC','DEF','XYZ',........'')
    5. Now Oracle/SqlServer
       has limit of THESE IN VALUES.
       limit is something in 2500 approx.
    6. So your approach will not work
      using IN.
       It will always give error when
       entries are more.
    7. SOLUTION which i did.
       1. First select all appropriate records from
          master table in your itab
         (without using IN select option clause)
      2. After that use this concept.
         Loop at ITAB.
         If Itab-Field in SelectOption.
         Else.
         DELETE ITAB.
         ENDIF.
    The above will take care for any number of records. 
    I hope it helps.
    regards,
    amit m.
    Message was edited by: Amit Mittal
    Message was edited by: Amit Mittal

  • Complex Restrictions in Select-options

    Hi Team,
    I've coded SELECT-OPTIONS in my web dynpro(ABAP) and want to disable the complex selection button/link (displayed just before the actual field). This link takes the user to either "Exclude" the selection or other options like "GE", "BT" etc. I actually want that user should only select ONE value with sign="I" and Option='EQ'. Is there a way to manage this? Please help.
    Thanks for your time.
    P.S: Points will be awarded for solutions

    Hi Sanjay.
    You can switch of intervall and complex restrictions using the 
    parameters I_USE_COMPLEX_RESTRICTION and I_NO_INTERVALS
    of the method ADD_SELECTION_FIELD:
    wd_this->mr_selop->add_selection_field(
                             i_id = lv_fieldname
                             i_no_intervals = abap_true
                             i_use_complex_restrictions = abap_false
    Hope this helps.
    Cheers,
    Sascha

  • Restrict the no of values to 10 for select-options

    hi gurus,
    i have the require that the user can put only 10 distinct values for a select-option for selection screen....now to disable range selection and other signs than eq to i have used function module select_options_restrict..
    The only thing which i could'nt do is restricting the values to 10. That is I want to disable (grey out ) the rows after 10 so that the user if wants also cannot put more than 10 values....i dont want to go by the convention method of displaying an error message that only 10 values are permitted...instead i will keep the provision of disabling after 10 values...
    i guess that when we press the extension button the screen that comes for multiple selection is a module pool screen....so do we need to modify that screen or may be there is some other method...
    please help.....

    im not aware of restricting the user form entry itself instead.
    let the user enter the values..
    select-options:so_dat for sy-datum.
    at selection-screen on so_dat.
    describe table so_dat lines wk_lines.
    if wk_lines > 10.
    throw message
    endif.

  • How to restrict values displayed using a select-options

    Can someone please tell me how to restrict values displayed using a select-options.
    Example- in my table I have 100 entries. However when the user will click on the required field- I want to be display only 25 options based on a given value of another field in the table.
    Thanks,
    Mahesh.

    get the screen value for the selectd field  using the fm
    DYNP_VALUES_READ.
    for that value filter the internal table values and pass the table to f4 help of the field.
    below code will help u
    write the f4 help for the field.
    At Selection Screen on value request                                *
    F4 help for Corporate
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CORP.
    Get Corporates for selected division
      PERFORM GET_CORP.
      PERFORM F4HELP_CORP.
    *&      Form  GET_CORP
    Get the corporates for the selected division
    There are no interface parameters to be passed to this routine
    FORM GET_CORP .
    Table for conglomerate
      DATA:
        LT_CONG      LIKE STANDARD TABLE OF FS_CORP,
    Fields of current screen
        LFS_DYNPREAD TYPE DYNPREAD,
    Table for current Screen fields
        LT_DYNPREAD  LIKE STANDARD TABLE OF LFS_DYNPREAD.
      LFS_DYNPREAD-FIELDNAME = 'P_DIV'.
      APPEND LFS_DYNPREAD TO LT_DYNPREAD.
    Get selection screen value for division
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME               = SY-REPID
          DYNUMB               = SY-DYNNR
        TABLES
          DYNPFIELDS           = LT_DYNPREAD
        EXCEPTIONS
          INVALID_ABAPWORKAREA = 1
          INVALID_DYNPROFIELD  = 2
          INVALID_DYNPRONAME   = 3
          INVALID_DYNPRONUMMER = 4
          INVALID_REQUEST      = 5
          NO_FIELDDESCRIPTION  = 6
          INVALID_PARAMETER    = 7
          UNDEFIND_ERROR       = 8
          DOUBLE_CONVERSION    = 9
          STEPL_NOT_FOUND      = 10
          OTHERS               = 11.
      IF SY-SUBRC EQ 0.
        READ TABLE LT_DYNPREAD INTO LFS_DYNPREAD INDEX 1.
        IF SY-SUBRC EQ 0.
          P_DIV = LFS_DYNPREAD-FIELDVALUE.
        ENDIF.                             " IF SY-SUBRC EQ 0
      ENDIF.                               " IF SY-SUBRC EQ 0
      REFRESH T_CORP.
    Get the conglomerate for the selected division
      SELECT KUNNR                         " Conglomerate
        FROM KNVH
        INTO TABLE  LT_CONG
       WHERE HITYP  EQ C_HITYP
         AND VKORG  EQ C_VKORG
         AND VTWEG  EQ C_VTWEG
         AND SPART  EQ P_DIV
         AND DATAB  LE SY-DATUM
         AND DATBI  GE SY-DATUM
         AND HKUNNR EQ SPACE.
      IF SY-SUBRC EQ 0.
        SORT LT_CONG BY KUNNR.
        DELETE ADJACENT DUPLICATES FROM LT_CONG
                        COMPARING KUNNR.
    Get the corporates for the selected conglomerates
        SELECT KUNNR                       " Customer Number
          FROM KNVH
          INTO TABLE  T_CORP
           FOR ALL ENTRIES IN LT_CONG
         WHERE HITYP  EQ C_HITYP
           AND VKORG  EQ C_VKORG
           AND VTWEG  EQ C_VTWEG
           AND SPART  EQ P_DIV
           AND DATAB  LE SY-DATUM
           AND DATBI  GE SY-DATUM
           AND HKUNNR EQ LT_CONG-KUNNR.
        IF SY-SUBRC NE 0.
          CLEAR: SSCRFIELDS.
          MESSAGE I531(0U) WITH TEXT-005.
          STOP.
        ENDIF.                             " IF SY-SUBRC NE 0
      ELSE.
        CLEAR: SSCRFIELDS.
        MESSAGE I531(0U) WITH TEXT-004.
        STOP.
      ENDIF.                               " IF SY-SUBRC EQ 0
    ENDFORM.                               " GET_CORP
    *&      Form  F4HELP_CORP
    F4 help for corporate
    There are no interface parameters to be passed to this routine
    FORM F4HELP_CORP .
    F4 help for corporate
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD        = 'KUNNR'
          DYNPPROG        = 'Z_EXCESS_USAGE'
          DYNPNR          = '1000'
          DYNPROFIELD     = 'P_CORP'
          VALUE_ORG       = 'S'
        TABLES
          VALUE_TAB       = T_CORP
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2
          OTHERS          = 3.
      IF SY-SUBRC EQ 0.
    Do nothing
      ENDIF.                               " IF SY-SUBRC EQ 0
    ENDFORM.                               " F4HELP_CORP

Maybe you are looking for

  • Auto focus on my 2 year old T3i has stopped working, any suggestions.

    auto focus has stopped working.  camera is almost 2 years old.  I can take pictures at normal distance but if I try to take a picture that requires zoom it will not work and all my pictures are fuzzy.

  • Looking for WS over email service proxy ??

    Anyone hear / see a webservice over an Email service or proxy? IE an email client needs to make WS / Soap calls to fetch email from my mindspring email account. Thanks, curt

  • Indesign files won't open over a network

    I have just copied my entire work folder from a 17" iMac Core Duo to a 20" iMac Core Duo. When I attempt to open any InDesign files over the network from one machine to the other I get the following message. "Cannot open the document "xxxxxxx". You m

  • [Issue] Skype call ends immediately on Samsung Gal...

    Greetings, I'm currently having a problem with calling others on skype and recieving skype calls, and recieving notifications with skype on my mobile device. My device specfications are: Samsung Galaxy S4 (SCH-l545) w/ stock Android 4.4.2 & WiFi (hom

  • Authorware Title in Task Bar

    I have just completed my first application using Authorware and everything works fine. The only thing I noticed is that when I launch the application from the computer desktop, "Authorware" first appears in the task bar for about a second before the