Restrict select option with few values by default

I have few values with which i have to restrict in a select option by default.
I have done in initialisation as below.
  s_ktokd-sign   = 'I'.
  s_ktokd-option = 'NE'.
  s_ktokd-low    = '0012'.
  append s_ktokd to s_ktokd.
  clear s_ktokd.
Is there any other way?
Thanks
Kiran

yeah you can do that in initalization.
>   s_ktokd-sign   = 'I'.
>   s_ktokd-option = 'NE'.
>   s_ktokd-low    = '0012'.
>   append s_ktokd to s_ktokd.
>   clear s_ktokd.
small correction to your code, corrected code...
s_ktokd-sign   = 'E'.
   s_ktokd-option = 'EQ'.
   s_ktokd-low    = '0012'.
   append s_ktokd to s_ktokd.
  clear s_ktokd.

Similar Messages

  • Field in the selection screen as a select option with two default values

    Hi All,
    can anybody tell me how to put field in the selection screen with two defaul values.
    for ex:  selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005.
    please reply ASAP. Its urgent.
    Thanks in advance,
    Madhu

    Hi Madhu,
    Since Select options are nothing but ranges, you can use the following code to add two distinct values to the select options by default.
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'EQ'.
    s_ktokd-low = 'Y001'.
    append s_ktokd.
    s_ktokd-low = 'Y005'.
    append s_ktokd.
    clear s_ktokd.
    However, if you want to mention a range like all the values between these given two values to be considered then u may use,
    select-options : s_ktokd for KNA1-KTOKD default 'Y001' to 'Y005'.
    or
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'BT'.
    s_ktokd-low = 'Y001'.
    s_ktokd-high = 'Y005'.
    append s_ktokd.
    Reward if helpful.

  • Checking against Select-Options with "CP" using "IF value IN select_option"

    Dear experts,
    first of all: I'm sorry, if this question already should have been asked and answered!
    I tried quite a lot of search terms but didn't find anything helpful.
    We are using a statement like "IF value IN select_option" to perform comparisons after the Select-Options have been used in a SELECT statement. This logical expression fails (compared to the results of the DB-SELECT) whenever a select-option line contains the option CP (Contains Pattern). To be more specific: The case sensitivity of the LOW value doesn't seem to play a role any more. A variable with the value 'ABCD' would be positively checked against a select-option with OPTION 'CP' and LOW 'abc*', whereas this value wouldn't have been selected if the select-option had been used in a DB-SELECT.
    Does anybody know a workaround?
    Thanks in advance
    Andreas

    Dear Keshav,
    it's an own field in an own table, defined as CHAR of length 140 (lowercase allowed), reflecting to a line of remittance info of an account statement. A regular Select-Option for this field is provided in a report which works perfectly fine regarding the case sensitivity. For reasons I don't want to point out in detail we need to check a value in this field against the select-option without selecting it from the db again.
    Let's assume that a field remittance_info contains the value 'ABCD'.
    A line of the select-option table looks like this:
    select_option_table-SIGN = 'I'
    select_option_table-OPTION = 'CP'
    select_option_table-LOW = 'abc*'.
    Then an ABAP statement such as
    IF remittance_info IN select_option_table.
    * would be true !!!
    ENDIF.
    but wouldn't deliver a result in a SELECT such as
    SELECT * FROM my_table INTO TABLE my_internal_table WHERE remittance_info IN select_option_table.
    because of the differences in lower/upper case.
    regards
    Andreas

  • 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

  • How can I restrict a vendor with certain value limit?

    Hi Gururs,
    How can I restrict a vendor with certain value limit?.
    Scenario is like this
    If my company was decided to purchase goods from a particular vendor upto Rs.1000, if cross the rs.1000 limit don't allow the Posting the PO and get the Message as warning/error.
    Give the configuration setting's and T.codes
    Thanks and regards
    G.N.Rao

    Hi
    Go to T.Code oms4 and then select the material status BP (Blocked for purchasing)
    Click on Details
    In that under Purchasing select the option A= Warning or B=Error
    Click on Save
    Thus by doing this no further purchasing function for that material can be done. So the PO can not be issued
    So as and when the value limit reaches see that purchasing option is blocked
    So no further PO are generated in the future
    I hope this helps you out
    If found useful reward accordingly
    Thanks
    pavan

  • Query variable : selection option with no interval

    Hello,
    Is it possible to define a query variable as selection option, with no interval (like in abap).
    I am in 3.X version.
    Many Thanks in advance,
    Manuel

    Hi Manuel,
    This should be possible through multiple single value variables, but to ensure that the user has not in input the same charateristic value for exclusion and selection you may choose to write customer exit at the background.
    I think interval and select option would allow 'To values'.
    So I was wrong in what I said before. SORRY
    However multiple single value would not allow exclusion, I think.
    Your scenario would only be possible by excluding multiple single values in variable type select option and process the variable using customer exit, to trmove all to Values.
    But you are right, you cannot have your scenrio handled , I think.
    ( ie multiple exclusion in from values with no To Values )
    One more way is restrict your characteristic by two input ready variables, one select option for exclusion and have a customer exit to delte all inclusion that were input accidently and one multiple value ready for input variable.
    But, all in all, there would be no straight drive through this I think.
    Hope it helps,
    Regards,
    Sunmit.

  • 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.

  • How to write select options with extension in module pool program

    hi,
    M having  the following fields through screen painter.
    1. sales offfice
    2.sales district
    3.customer no
    for those three fields no extension is not provided and no search help is there.
    i want write  seletion options to get extension in that module pool
    screen.
    plese send coding for me , please let me know how to get that
    select options with the above all three fields.
    Thanks & Regards
    Raji

    Check it
    In top include
    DATA: number(4) TYPE n VALUE '9005',
    PROCESS BEFORE OUTPUT.
      MODULE status_9001.
      CALL SUBSCREEN AREA1 INCLUDING SY-REPID number.
    PROCESS AFTER INPUT.
      MODULE user_command_9001.
      CALL SUBSCREEN AREA1.
    *&      Module  status_9001  OUTPUT
          text
    MODULE status_9001 OUTPUT.
      SELECTION-SCREEN BEGIN OF SCREEN 9005 AS SUBSCREEN.
      PARAMETER pa_bukrs TYPE t001-bukrs.
      select-options matnr for wa_matnr.
      SELECTION-SCREEN END OF SCREEN 9005.
    ENDMODULE.                 " status_9001  OUTPUT

  • Creating a Select-option with no-intervals and a parameter on a single line

    Hi
    I have a unusual reqirment of creating a select-option with no intervals obligatory and a parameter on a single line. Is this possible? Can any one please provide me a solution for this. I reffered to the SAP help and what i found out is a single line can contain only parameters.

    Hi,
    humm,
    I guess it's not possible on one line.
    SORRY I've tried and it works!
    Try this :
    SELECTION-SCREEN BEGIN OF BLOCK main WITH FRAME
                     TITLE text-s01 NO INTERVALS.
    SELECTION-SCREEN begin of line.
    PARAMETERS : p_gjahr LIKE bkpf-gjahr OBLIGATORY MEMORY ID gjr.
    SELECT-OPTIONS : s_blart FOR bkpf-blart MODIF ID knt .
    SELECTION-SCREEN end of line.
    SELECTION-SCREEN END OF BLOCK main.
    Regards,
    erwan

  • SELECT-OPTIONS: s_aedtm  FOR zxi_errpt-aedtm default sy-datum - 30

    I'm trying to figure out how to use the sy-datum - 30 days on the selection screen.   Can soeone give me a suggestion on how to alter the sy-datum as it would appear on the selection screen?
    SELECT-OPTIONS: s_aedtm  FOR zxi_errpt-aedtm default sy-datum - 30 NO-EXTENSION
    NO INTERVALS OBLIGATORY
    Thanks!

    Hello Riki,
    There was a minor typo !!!
    SELECT-OPTIONS: s_date FOR sy-datum NO-EXTENSION NO INTERVALS OBLIGATORY.
    INITIALIZATION.
      s_date-sign = 'I'.
      s_date-option = 'EQ'.
      s_date-low = sy-datum - 30.
      APPEND s_date.
    the append would not work
    I never knew this !!!!
    BR,
    Suhas

  • How do I restrict Select-option values to those founn in a Z table?

    Hello friends,
    I would like to display and restrict values for a select-option to those found in a Z table. That is to say, the user is only able to choose those values found in the Z table and not otherwise.
    How to do this please?
    Thank you for your help.

    USE FM : SELECT_OPTIONS_RESTRICT
    report  zs_list_select_option.
    type-pools sscr.
    tables : marc.
    defining the selection-screen
    select-options :
      s_matnr for marc-matnr,
      s_werks for marc-werks.
    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_***.
    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.
    Edited by: Srinivas Gurram Reddy on Mar 18, 2008 3:14 PM

  • Select/option with cfquery - how to pass selected value to field downform

    I have a form that has a basic select/option dropdown using a cfquery result.  I would like to use the value that the user selects to pre-populate an editable 'title' field further along on the form.  For example:
    <form action="index.cfm?fuseaction=sendEmail" method="POST" name="email_approval" enctype="multipart/form-data">
    <table width="500" border="1" cellspacing="0" cellpadding="2" align="center">
    <tr>
      <td align="left">Request ID:</td>
      <td align="left" width="100"><b><cfoutput>#RequestId#</cfoutput></b></td>
      <td align="left">Application:</td>
      <td align="left" width="400"><b><cfoutput>#this_request.app_abbrev#</cfoutput></b></td>
      <td align="left">WR/RD#:</td>
      <td align="left" width="400"><b><cfoutput>#this_request.request_number#</cfoutput></b></td>
    </tr>
    <tr>
      <td align="left">Email Type:</td>
      <td align="left" colspan="2">
          <select name="approval_type" size="1" >
          <cfoutput query="approval_types">
             <option value="#approval_types.approval_descrip#" style="font-size:8pt">#approval_types.approval_descrip#</option>
           </cfoutput>
         </select>
      </td>
      <td align="left"> </td>
      <td align="left">Date Sent:</td>
      <td align="left"><b><cfoutput>#dateformat(Now(), "MM/DD/YYYY")#</cfoutput></b></td>
    </tr>
      <cfset subjectLine = "#RequestId#" & " " & "#approval_types.approval_descrip#" & " Approval Request" >
    <script  type="text/javascript" language="JavaScript">
    <cfoutput>
      var #toScript(subjectLine, "jsLine")#;
    </cfoutput>
    </script>
    <script  type="text/javascript" language="JavaScript">
    function setValue()
      document.getElementById('subject').value =jsLine;
    </script>
    <tr>
      <td align="left">Subject:</td>
      <td align="left" colspan="5">
       <b><input type="Text" name="subject"  required="Yes" size="70" maxlength="70" onClick="setValue();"></b>
    </td>
    </tr>
    When the user gets to the subject field,the onClick will pre-populate the field with the combined value using <cfset subjectLine = "#RequestId#" & " " & "#approval_types.approval_descrip#" & " Approval Request" >.  regardless of what is selected, it uses the first item in the query list because that is what is rendered when the form is loaded (got that).  I figure that I need a javascript onChange event for the select statement for the dropdown, but can't figure out how to pass this javascript variable back to the CF form.  Any ideas, or am I stuck?
    Thanks in advance for your thoughts!

    You will need to do it with JS as the values you want to access are not set until the form is submitted. This should give you what you want.
    It uses a hidden form field to hold the requestID, that is then accessed with JS. (I am assuming this value is available when the page loads)
    <form action="index.cfm?fuseaction=sendEmail" method="POST" name="email_approval" enctype="multipart/form-data">
    <input type="hidden" name="requestID" id="reqID" value="1234" />
    <table width="500" border="1" cellspacing="0" cellpadding="2" align="center">
    <tr>
      <td align="left">Email Type:</td>
      <td align="left" colspan="2">
          <select name="approval_type" id="approval_type" size="1" >
             <option value="test" style="font-size:8pt">test</option>
         </select>
      </td>
      <td align="left"> </td>
      <td align="left">Date Sent:</td>
      <td align="left"><b><cfoutput>#dateformat(Now(), "MM/DD/YYYY")#</cfoutput></b></td>
    </tr>
    <script  type="text/javascript" language="JavaScript">
    function setValue(){
        var e = document.getElementById("approval_type");
        var approval_type_value = e.options[e.selectedIndex].value;
        var subjectLine = document.getElementById('reqID').value + ' ' + approval_type_value + ' Approval Request';
        document.getElementById("subject").value = subjectLine;
        alert(subjectLine); 
    </script> 
    <tr>
      <td align="left">Subject:</td>
      <td align="left" colspan="5">
       <b><input type="Text" name="subject"  required="Yes" size="70" maxlength="70" onClick="setValue();"></b>
    </td>
    </tr>

  • Restricting selection-options

    I want to restrict the selection option of a field.
    There will be no intervals to enter.
    Only EQ will be available.
    Will allow multiple values but no intervals.
    when I enter somthing* and than proceed it displays a popup showing which criteria to select and there is only EQ value.
    In other circumstances it works as I  want. But I do not want the popup.
    Please help.
    I write the code below.
    TABLES:
      vbak.
    SELECT-OPTIONS:
      zvbeln FOR vbak-vbeln
        NO INTERVALS
        MATCHCODE OBJECT zpyp_posid
        OBLIGATORY
    INITIALIZATION.
      PERFORM init_1001.
    *&      Form  init_1001
          text
    FORM init_1001 .
      TYPE-POOLS:
         sscr.
      DATA:
        restriction TYPE sscr_restrict,
        wa_opt_list TYPE sscr_opt_list,
        ls_***     TYPE sscr_***.
      MOVE 'EQ'      TO wa_opt_list-name.
      MOVE 'X'       TO wa_opt_list-options-eq.
      APPEND wa_opt_list TO restriction-opt_list_tab.
      MOVE: 'S'          TO ls_***-kind,
            'I'          TO ls_***-sg_main,
            ' '          TO ls_***-sg_addy,
            'EQ'         TO ls_***-op_main,
            'EQ'         TO ls_***-op_addy,
            'ZVBELN'     TO ls_***-name.
      APPEND ls_***      TO restriction-***_tab.
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
        EXPORTING
      PROGRAM                      =
          restriction                  = restriction
      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.
    ENDFORM.

    Hi Fuat ,
    i don't understand ?!
    in my example report comes <b>no addtitional popup</b>:
    here's the complete test-report:
    REPORT z6.
    TABLES:
    vbak, bkpf.
    SELECT-OPTIONS:
    zvbeln FOR vbak-vbeln OBLIGATORY DEFAULT '5300000000'.
    INITIALIZATION.
      PERFORM init_1001.
    START-OF-SELECTION.
      SELECT belnr FROM  bkpf INTO bkpf-belnr
             WHERE  bukrs  = '0001'
             AND    belnr  IN zvbeln
             AND    gjahr  = sy-datum(4).
        WRITE: / bkpf-belnr.
      ENDSELECT.
      IF sy-subrc <> 0.
        WRITE: / 'no entry found!'.
      ENDIF.
    *& Form init_1001
    FORM init_1001 .
      TYPE-POOLS:
      sscr.
      DATA:
      restriction TYPE sscr_restrict,
      wa_opt_list TYPE sscr_opt_list,
      ls_*** TYPE sscr_***.
      MOVE 'EQ' TO wa_opt_list-name.
      MOVE 'X' TO wa_opt_list-options-eq.
      APPEND wa_opt_list TO restriction-opt_list_tab.
      MOVE: 'S' TO ls_***-kind,
       'I' TO ls_***-sg_main,
      'EQ' TO ls_***-op_main,
      'ZVBELN' TO ls_***-name.
      APPEND ls_*** TO restriction-***_tab.
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
           EXPORTING
                restriction = restriction.
    ENDFORM.
    regards Andreas

  • Select Option with masked entry in GRR3 report

    Hi,
    I am trying to find out if it is possible in standard to call a grr3 report like s_alr_87013611 (cost center report) and be able to enter the cost element like 4* to get all values for cost elements starting with 4.
    When trying this I get an error message and the only select option that appears is "=".
    In a KE80 report like S_ALR_87013326 on profit centers I can select the account and here it works fine with 4*.
    What is responsible for this and where can I do the settings? Any help is greatly appreciated.
    Thomas

    Follow-up:
    I noted in another post, that you can set the default value in the entity object, and this can carry through to the List-based object and retain that as the "selected" option.
    How do you set the selected option programmatically/via properties or tag attributes, without doing something like this:
    <select name="Cardtype1">
    <c:forEach var="listEntry" items="${bindings.Cardtype1.displayData}">
    <c:choose>
    <c:when test="${listEntry.prompt=='VISA'}">
    <option value="<c:out value='${listEntry.index}'/>" selected="true">
    </c:when>
    <c:otherwise>
    <option value="<c:out value='${listEntry.index}'/>" >
    </c:otherwise>
    </c:choose>
    <c:out value="${listEntry.prompt}"/>
    </option>
    </c:forEach>
    </select>

  • Restricting select-options

    Hi,
    I came across this piece of code in ABAP FAQ. It is supposed to restrict the select-options so that the user can enter only specific options like only intervals or single values or patterns etc. But for some reason its not working for me. I am using SAP 4.7.
    Any pointers will be greatly appreciated.
    Restricting the selection screen
    REPORT ZDANY_RESTRICT_SELECTION.
    Include type pool SSCR
        TYPE-POOLS sscr.
        TABLES : sflight.
    defining the selection-screen
        select-options :
            s_carrid for sflight-carrid,
            s_connid for sflight-connid.
    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_***.
        INITIALIZATION.
    Restricting the carrid 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_carrid'.
        ***-sg_main = 'I'.
        ***-sg_addy = space.
        ***-op_main = 'OBJECTKEY1'.
        APPEND *** TO restrict-***_tab.
    Restricting the connid 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_connid'.
        ***-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,
    Sudeep

    Hi
    Olaf's solution should be OK. Always use uppercase for this kind of variable values. I guess you've already seen, but the FM has a documentation if you need more information on it.
    *--Serdar

Maybe you are looking for