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

Similar Messages

  • How to restrict the duplicate values in lov column of VO based Adv Table

    Hi Gurus,
    I want to restrict the duplicate values at lov which is a colunm in an Adv Table.
    If user enters duplicate values then first it should show an error msg that Duplicate values have been entered.
    After the duplicate values have been removed, then the user can save all the values in the table.
    My Adv Table is based on a VO.
    The link how to restrict the duplicate values at form level
    talks about Adv Table based on a EoVO, which doesnot work in my case.
    My Approach,
    I am iterating through RowSetIterator and committing through PROCEDURE.
    I am able to avoid duplicate entry through a function checkRespId. (given below)
    Below code is for iterating and committing.
    public void saveline(String reqid,String userid)
    System.out.println("RequestId/saveline"+reqid);
    System.out.println("UserId/saveline"+userid);
    OAViewObject vo = (OAViewObject)getRespLineVO1();
    RespLineVORowImpl row = null;
    int fetchedRowCount = vo.getFetchedRowCount();
    RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
    if (fetchedRowCount > 0)
    deleteIter.setRangeStart(0);
    deleteIter.setRangeSize(fetchedRowCount);
    for (int i = 0; i < fetchedRowCount; i++)
    System.out.println("Inside the for LOOP");
    row = (RespLineVORowImpl)deleteIter.getRowAtRangeIndex(i);
    String respoidid = row.getAttribute("ResponsibilityId")+"";
    String respname = row.getAttribute("ResponsibilityName")+"";
    String stdate = row.getAttribute("StartDate")+"";
    String enddate = row.getAttribute("EndDate")+"";
    String linestatus ="A";
    if(userid!=null)
    if(!(respoidid.equals("null")) && respoidid!=null)
    String checkingrespid=null;
    checkingrespid = checkRespId(userid,respoidid);+contains no if not duplicate and yes if its duplicate+
    System.out.println("checkingrespid for Resp with ID :"+respoidid+"exists or not "+checkingrespid);
    if(checkingrespid.equals("No"))
         String message, result = null;
    Connection txn = getOADBTransaction().getJdbcConnection();
    try
    calling PROC ...
    catch(Exception e)
    message = "Error in Inserting into line" + e;
    throw new OAException(message, OAException.ERROR);
    else
    throw new OAException("You have entered duplicate no. of values", OAException.ERROR);
    else
    System.out.println("respoidid is null");
    break;
    deleteIter.closeRowSetIterator();
    public String checkRespId(String userid,String respoidid)
    String createRow="No";
    OAViewObject vo = (OAViewObject)findViewObject("CheckRespVO1");
    if (vo != null)
    vo.setWhereClauseParams(null);
    vo.setWhereClauseParam(0, userid);
    vo.setWhereClauseParam(1, respoidid);
    vo.executeQuery();
    System.out.println("ROW COUNT IS "+vo.getRowCount());
    if(vo.getRowCount()>0)
    createRow="Yes";
    else
    createRow="No";
    return createRow;
    Problem:
    I remove the duplicate entries and click on save and get this error.
    Unable to perform transaction on the record. \nCause: The record contains stale data. The record has been modified by another user.
    \nAction: Cancel the transaction and re-query the record to get the new data.
    Thanks,
    Sombit

    Hi Anil,
    I am trying out your code but stuck in inserting the rows
    using your code in URL: http://oracleanil.blogspot.com/2010/09/oaf-passing-table-type-object-to-oracle.html
    I am always getting the same exception i.e COde blast in when I run.
    My modified code is:
    String[] as = null;
    Number[] vNumber = null;
    Number[] vNumberrespid = null;
    Number reqidnumber = null;
    reqidnumber = new Number(Integer.parseInt(reqid));
    Connection txn = getOADBTransaction().getJdbcConnection();
    String mCreateSearchRequestStatement = null;
    OAViewObject vo = (OAViewObject)findViewObject("RespLineVO1");
    int j = vo.getFetchedRowCount();
    try
    System.out.println("abouce try");
    vo.reset();
    if (vo.getFetchedRowCount() > 0)
    System.out.println(String.valueOf("Fetched row count ").concat(String.valueOf(vo.getFetchedRowCount())));
    int i = 0;
    as = new String[j];
    vNumber = new Number[j];
    vNumberrespid = new Number[j];
    while (vo.hasNext())
    vo.next();
    System.out.println(String.valueOf("Inisde the do while loop").concat(String.valueOf(i)));
    vNumber[i] = (reqidnumber);
    vNumberrespid = ((Number)vo.getCurrentRow().getAttribute("ResponsibilityId"));
    as[i] = String.valueOf(vo.getCurrentRow().getAttribute("ResponsibilityName")).concat(String.valueOf(""));
    System.out.println("Request ID "+reqidnumber[i]);//getting null even there is some value selected
    System.out.println("ResponsibilityId "+vNumberrespid[i]);//getting null even there is some value selected
    System.out.println("Resp Name "+as[i] );//getting null even there is some value selected
    i++;
    CallableStatement cs = txn.prepareCall("{call XX_PassTableType.XX_PassTableType_prc(:1, :2,:3)}");
    ARRAY array = new ARRAY(new ArrayDescriptor("APPS.JTF_NUMBER_TABLE", txn), txn, vNumber);
    ARRAY arraynew = new ARRAY(new ArrayDescriptor("APPS.JTF_NUMBER_TABLE", txn), txn, vNumberrespid);
    ARRAY array1 = new ARRAY(new ArrayDescriptor("APPS.JTF_VARCHAR2_TABLE_100", txn), txn, as);
    cs.setArray(1, array);
    cs.setArray(2, arraynew);
    cs.setArray(3, array1);
    cs.registerOutParameter(3, 2003, "JTF_VARCHAR2_TABLE_100");
    cs.execute();
    ARRAY error = null;
    error = (ARRAY)cs.getArray(2);
    if ((error != null) && (error.length() > 0))
    System.out.println(String.valueOf("Error is ").concat(String.valueOf(error.getArray())));
    String[] retError = new String[j];
    retError = (String[])error.getArray();
    System.out.println(String.valueOf("Error in saving data").concat(String.valueOf(retError[0])));
    cs.close();
    catch (Exception exception)
    throw new OAException("code blast", OAException.ERROR);
    Thanks,
    Sombit

  • Can I restrict the operation of the "magic wand" to a single artboard?

    CS4 on a Mac. Can I restrict the operation of the "magic wand" to a single artboard without moving that artboard to a different layer? At present it selects all the similar items on the active board as well as all the other boards on the same layer.

    Hi MarieMeyer,
    I'm not sure if this works on CS4, but one thing you can try is to click Window + Magic Wand to open your tool settings.
    There, you should see a check mark next to Fill Color. Uncheck fill color. Now, make sure everything is deselected, and then try using the magic wand tool. You may need to play with your Tolerance setting to get it to select the way you want.
    Hope this helps!

  • How to restrict the Null Values for Key Figules in the Bex Query

    Hi Friends,
        I want to restrict the Null values of a perticular key figure in the Bex Query Output.
    I will explain in details. i have 3 key figures in my query.. let us assume.. key1 key2key3
    key1           key2                key3
    4                4                   100.00
    5                0                   200.00
    1                0                    19.00
    0                1                    10.00
    i don't want to see the the records for which key 2 is 0.
    we have a setting in the Bex Query for restricting the Zero values in the query properties. If we enable that setting it will show
    4               4          100.00
    but i want the report to display..
    4               4           100.00
    0               1           10.00
    can any body guide me. <b>i want to display the values if key2 <> 0.</b>
    Regards,
    Nagesh.

    Hi AVR,
    nice to see reply.
    can you eloborate your view...how can i put the condition.
    <b>i want to put the condition key2 <> 0.</b>
    Regards,
    Nagesh.

  • How to restrict the dropdown values in Att/abs type in Record Working Time

    Hello experts,
    We are implementing ESS business package.  In the Record Working time, within the Weekly View and Daily View tabs, there is a column Att/abs.type which has several drop down values - like:  floating value, Funeral Leave, Military Reserve, Regular Attendance, etc.   Our requirement is to restrict the dropdown values  by means of showing only one of these values (say:  Regular Attendance) and others should not be shown.   How do we achieve this?
    Thanks
    Vicky R.

    Hi Siddarth,
    Thanks for the info.  By the way, this table info is not mentioned in the Business Package documentation.  Which documentation are you referring to?
    Thanks
    Vicky R.

  • Regrading restricting the variable values in the report

    hi experts,
    i have a requirement that i have to restrict the values of 2nd level vendors in variable selection screen based on the 1st level vendor selected i mean  we are using the variable for 1st level vendor as mandatory so when user enters the value for 1st level vendor linke xxxx and when he goes to the next variable 2nd level vendor he must have the options related to the 1st levle vendor only i mean he does not see all the 2nd level vendors but he must see the 2nd level vendors related to first level vendor only
    ex for 1st level vendor xxx the 2nd level vendor is yyy and zzz
         for 1st level vendor aaa the 2nd level vendor is bbb and ccc
    now when he select the option first level vendor as xxx it is showing the all 2nd level vendors in the slection screen but client wants that when he select the 1st level vendor he must see the 2nd level vendor list related to particular 1st level vendor only
    thanks and regards
    pedamarla

    pedamarla,
    Does you mean if xxxx is the value for 1st vendor then in 2nd level vendor variable shd be other than xxxx.....
    is my interpretation is right.then you can write the code in step 3 so that 1st vendor value and 2nd vendor is different ....let us know

  • How to restrict the particular value in BEx?

    HI,
    I have added particular dimension in query prompt. While refreshing i got more value in particular dimension. How to restrict the the value in bobj or bex?
    Here i attached the screen shot. Please find the attachment.

    Hi Mani,
    Please make sure of your requirement. If you are using only one single query for multiple reports then i strongly recommend the below criteria or else it better to restrict the value in the BEx itself if you have no other reports on the same BEx query.
    If you are trying to restrict a report to a default prompt value then use equal to in query filter prompt or you can also restrict them to list of values i.e multiple values.Please follow as per the screens below. I am mentioning two ways.
    Method:1
    Step 1: Click on Prompt Options(Blue Questionmark Symbol)
    Step: 2 : Click on the Values after you check the prompt properties options as shown below.
    Step 3: Search for values if they are keys by checking the "Search in keys" or else not required.
    Method 2: Here is another Easy way is Just give the input in the value box as shown below.
    Let me know if you need any further help.
    Regards,
    Naveen

  • How to restrict the attribute values for the user in query designer

    Hi All,
    I have a requirment where certain user would see certain vailes in the query desiner of the attribute.
    The requirment is we have planing material which is attribute of material
    When X user want to restrict the  values for planning material ,where he is able to see all the planning material.But who is not authorized for all the value.
    Ex: X user has authorization for see planning material 100,101,102. of material But when he try to restrict the planning material in query designer where is getting all values of planing material.
    Or
    is there way to blank the restriction help.so that he can't able to see values while restricting
    Please some one can advise me on it..

    Hi,
    Let me sum up:
    you have an object ZPLNMAT for the planning material
    you have the object 0MATERIAL for material and this object has ZPLNMAT as attribute.
    If you can restrict in the query designer, I suppose this attribute is then as navigationnal and also added in the multi-provider.
    The object ZPLNMAT is checked as relevant for authorization, and you set up a role with the attached values of ZPLNMAT this user should have access to.
    Are you sure the users are restricting on the ZPLNMAT object and not 0MATERIAL, because you should have everything now
    PY

  • Select List with the current value

    Hi,
    I have a Page suppose Page1 with 2 region.
    Region1 is having SEARCH button (target page 1 itself) and a SELECT LIST called Deptno (10,20,30,40)
    Region2 is just a simple employee report based on Deptno (where deptno = :p1_deptno)
    Now when I suppose select deptno 30 and press SEARCH button, report is not displayed and also Dept select list current value becomes the first one in the list i.e 10.
    My question is after submitting the same page 1 using SEARCH button, how can I display the selected value (dept 30) in the select list.
    Note:- If I am using Select List with Submit then it's working fine and also displaying the current value (30) in the list, But I am looking for using SEARCH button.
    Thanks,
    Deepak
    Edited by: Deepak_J on Aug 6, 2009 2:14 PM

    Hi,
    Then the value that is selected in the list will not be submitted, so it will not be saved. You need a button that submits the page.
    Andy

  • How can i restrict the qty/value at the time of invoice

    Hi,
    Can you plesae tell me at the time of MIRO how can i restrict the user not to enter the qty more than in MIGO & PO
    Thanx

    You cannot restrict the qty in MIRO. because it is used for partial invoice receipt.
    E.g  in some cases 100 nos of qty might have received in one GR. But the supplier may give 3 invoices for this. that is the reason u cant restict this
    reward if useful
    SK

  • Restricting the Prompt Values based on Fact table data

    Hi,
    We need dashboard prompts in OBIEE reports that will fetch data from dimension tables. Our all dimensions are conformed dimension having joined with multiple fact tables.
    Because prompts are showing data from dimension table, it is showing all dimension data and few data might not present in the particular fact table that we have used in the report.
    For Example:
    We have one Calendar dimension table that has 20 years data that means all dates. Now we have two fact tables Fact1 and Fact2.
    In Fact1 we have records related to only 2007 Years data. And In Fact2 We have 2008 years data.
    Now We are creating two separate reports in two separate page in one dashboard where the prompt is same. That is Calendar date prompt.
    So In report1, The prompt will be Calendare and Result will be from Fact1. But as the calendar prompt from Calendar dimension, it showing all 20 years data though only 2007 years data is valie.
    Similarly for Report2, It is showing all calendar dates in the prompt where Fact2 is having 2008 year data.
    I want to show only 2007 years dates in the prompt for Report1 and 2008 years dates for Report2. That means I want to restrict prompt values based on the fact.
    It will be great if someone can suggest on this.
    Regards,
    SS

    Hi, I have a similar problem.
    I have two dimensions: time and customer.
    The two dimensions are joined into two Fact Table (Order, Forecast).
    I created a dashboard prompt with two selections: the first is the Year (time dimension) and the second is the Region (customer dimension) with the option "cosntraint."
    When I select a Year, not all Regions are shown, but only those that are present in one of two fact table for the year chosen. Which fact table?
    What criteria will limit the values of the Region?
    Thanks

  • Pass the results from a selection formula to the default values for a parameter field

    Post Author: kevans
    CA Forum: General
    Crystal 10 u2013 SQL 2000
    I want to create a parameter field that will display all of our IT Departments so the end user can select the one they want to run the report against, such as IT-Security, IT-Network, etc. about 40 in all.  BUT I donu2019t want this to be a static list where I type in all 40 depts in the default list, I was hoping I could do something more dynamic such a formula field that says u201C if {group.name startswith u2018ITu2019 then {group.name}u201D and then have the parameter field pull from this source.
    Iu2019m sure this has been answered in a previous post but Iu2019m not finding it.  I see stuff on creating a record selection formula such as u2018if {?group} like u2018IT-Secur*u2019 thenu2026u201D  but this leaves too much room for error if people donu2019t type the name correctly.  Maybe Iu2019m not using the record selection formula correctly?  Sorry if I offend anyone but I just upgraded from 8 to 10 and thought for sure this option would be in 10, perhaps built right into the parameter default value page where you can place in select criteria but NOTHING has changed.

    Post Author: sharonmtowler
    CA Forum: General
    if you are creating the parameters in the rpt file, it will only pull values you enter, or directly from the database
    in the record selection you can do something like this, so if they only enter the first 2 characters it should pick up only the IT etc.
    (if eft(,2)={?parameter} then true else ={?parameter})

  • How to restrict the charactersitic values in reporting

    Hi All,
    I have a CCA report with characterstic "GL Accont". Instead of displaying the complete characteristic values i want to display the first 3 characters out of EIGHT characters in that report( say "10003WW", i need to display it as "100" only).
    Looking for your earliest response.
    Thanks in advance...

    Hi Suresh,
    In My R& D This is not possible at query level ie without changing the infoprovider.
    I am giving another solution for this.
    1. Create a new characteristic based on current O Gl account
    2. The new characteristic should be a navigational one to the 0 Gl account.
    3. In the transfer rules   of 0GL ACCOUNT you write a routine for this new navigational attr. Data will update from GL account  but only first 3 digits will update.
    4. Specify the same NA in the data target.
    5. Add this NA to your Query.
    For this changes will not harm the Transaction   data in the production. But you should  Re- init the master data of 0 GL Account.
    You should try with this solution in the Development, if you feel it doesn't harm any transactional data  then you should proceed.
    Thanks & Regards,
    Venkata sharma.

  • Default  value for select options.

    Hi folks
    I have to default four values in select-options.
    eg.,
    S_lfart for likp-lfart, default zse, zin, znd, zps.
    Thanks in Advance,
    Rao

    Hi,
    Go through the following syntax:
    SELECT-OPTIONS <sel> FOR <f>
                   [DEFAULT <g> [to <h>] [OPTION <op>] SIGN <s>]
                   [MEMORY ID <pid>]
                   [LOWER CASE]
                   [OBLIGATORY]
                   [NO-DISPLAY]
                   [MODIF ID <key>]
                   [NO-EXTENSION]
                   [NO INTERVALS]
                   [NO DATABASE SELECTION].
    Declares a selection table <sel> for the field <f>. For <sel>, places input fields on the corresponding selection screen. The additions allow you to set a default value, accept input in lowercase, define a required field, suppress or modify the display on the selection screen, restrict the selection table to a line or a selection to a single field, or prevent input from being passed to a logical database
    Regards,
    Bhaskar

  • Restrict the values on variables screen

    I've a variable on report screen which I want to restrict the values getting from master data. Variable is a authorization variable type. So I can't set default values. I need to restrict the values for example "00D*".
    At result user should see the master data list values which starts with "00D".
    Cheers,
    Yigit

    SELECT_OPTIONS_RESTRICT is not intended for this, only to restrect the kind of sign and options which are allowed in the select-options, you can restrict to single values, range or disable exclusion, this kind of restriction.
    For your requirement, you have to restrict the dropdown values using FM VRM_SET_VALUES. (use the search tools in [forums|http://forums.sdn.sap.com/search.jspa?objID=c42&q=VRM_SET_VALUES] and [wiki|http://wiki.sdn.sap.com/wiki/dosearchsite.action?searchQuery.queryString=VRM_SET_VALUES&searchQuery.spaceKey=conf_global])
    Regards,
    Raymond

Maybe you are looking for

  • Cannot download more than one photo file...

    I am having trouble with my 80GB's photo capabilities. Everytime I try to load pictures onto it, iTunes automatically deletes any pictures that were already on my iPod.

  • How to get rid of the shading on the top of my iPhone wallpaper

    I dont remember her how but i got rid of it before and then i updated my phone... So there is like this shadow at the top of my iphone wallpaper for no reason and i dont know how to get rid of it and its not my photo it is a setting in my phone so pl

  • Sync files from Windows 8.1 laptop to windows 7 server

    My company bought me a new laptop and decided to get Windows 8.1 on it, the rest of the computers in the office have windows 7. I need to sync a folder I have with a folder on my server, my server is Windows 7 and does not have SkyDrive.  Another emp

  • How to include text

    hi i m working on smartform i want to include text for example <b>subject</b> : is text window i want to include text after colon in subject but include text is coming in new line now coming like below <b>subject: hi this is include txt</b> but i wan

  • Nokia Lumia 925 No Display After Switch On

    When I switch my Nokia Lumia 925 off and then turn it back on again I get no display. I know its on because I can press the on/off/ button and the soft keys will vibrate when touched. I can even take a picture using the camera key, confirmed with a f