Restricting the subset of a given timeinterval

Hi
I'm using db 10.2.0.1.0 , and forms6i
I have a screen through which i'm accepting user i/ps fromdate and todate.
Suppose user has already entered
Fromdate                              Todate
07/05/2011 08:15:00           07/05/2011 10:15:00     and if he tries to enter another set of i/p as
Fromdate                              Todate
07/05/2011 08:15:00           07/05/2011 09:15:00     or
Fromdate                              Todate
07/05/2011 07:15:00           07/05/2011 09:15:00     or
Fromdate                              Todate
07/05/2011 07:15:00           07/05/2011 11:15:00     In either of the above cases, i shou;d restrict the user. Because all comes as subset/superset.
But if he enters
Fromdate                              Todate
07/05/2011 07:15:00           07/05/2011 08:00:00     Should be allowed.
How can i check this?
Is there any builtin function to check subset/superset?
Thanks

Solved

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

  • How to Create a Selection Variable for restricting the querry output

    Hi Gurus,
    I have created a query in query designer on a Multiprovider and the output of the query is a Formula in a structure which calculates a % value, the client is looking for entering a range of number during the query selection screen and the output should be restricted to the given selection values.
    Can any one tell me how i should create a selection variable that would take the input from the user during the query selection screen and then restrict the output to that value which user specified.
    Is there a need to write any customer exit or is there any alternative way to make the query work as the requirement is.
    I hope this explains my problem but if any questions please let me know so that i can give u specific information.
    Thanks,
    Nisha.

    Hi Nisha,
    Firstly, in order to restrict the query output by a key figure value, you will need to create a condition on that key figure. This is done in the query deisgner. Now when you are creating the condition you can also use user entry variables (formula variables with user entry) to let the users enter the value that they want to see.
    See here for more details:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/content.htm
    Hope this helps...

  • How to restrict the Request and Response process in that cookies should be Secure way SAP Portal 7.0 ?

    Dear Experts,
    Please any one can help me i am getting one security issue.Some third party tools using and hacking the Request and Response of the Server.That time there taking one successfully Request (GET http://1.1 302 found)   and Response (http://1.1 200 ok).In this request based on again there giving some invalidate credential in that time server giving request replacing for success fully Request that time there login in to portal successfully(Bypassing).In this Request level only getting the information for URL and set-cookies only.Here any process is there to restrict the set cookies.like JSESSIONMARKID and JSESSIONID SAP_LB.
    We are using 7.0 Version and SP 12. Please share you are solutions because of this is very high problem here.
    Thanks for Advance
    Thanks and regrades,
    Durga Rao. 

    Dear Samuli,
    Thanks for the Replay,
    We are using HTTPS and SSL confined but man in the middle types of attack is happening here there using one tool based one there taking the Request and Response.The below given cookie are available in that request.
    According to this , set-cookie: JSESSIONMARKID , JSESSIONID and MYSAPSSO2 values are user login time it will change every time  are not.
    After  capturing above response HTTP/1.1 302 etc , when user gives valid credentials and logs in ,
    and now ill give wrong password and wrong user id and on click of log on button, i can intercept the request and response coming from the server and when i replace this valid response stil i am able to loggin in to the portal , which should not happen as JESSIONMARKID is changed , server should not allow , but it is loggin in.Standard Login page also allowing to login in this case.
    My server version is EP 7.0 SP 12.
    Please suggest a solution so that if we restric the hacker at this stage , no matter he can never hijack the sesiona and login  with invalid username and  password.
    Thanks for Advance
    Thanks and regrades,
    Durga Rao.

  • How we can restrict the account ID in FCH5

    Hi
    we have a scenario
    House bank Account ID sub Accounts
    axis1 axi1 1000203(outgoing a/c)
    axis1 axi2 1000303(outgoing a/c)
    axis1 axi3 1000403(outgoing a/c)
    Now i am defining the problem.
    Step 1.
    we have posted the payment to vendor (F-53) through 1000203 outgoing a/c.(axis1 , a/c ID axi1)
    Step 2.
    Created check information through FCH5 but here user selected different house bank( axis1) and account ID (axi2). and the system assign check from different account ID.
    system is not restrict the user according the outgoing a/c, system allows to select the different account ID.
    So kindly give me the solution that how can we restict that the system don't allow the different accout ID.
    Regards
    kuldeep

    Hi Kuldeep,
    Usually for creation of check lots, company code, house bank and account id are must. But in your case it might happen that once u create a check lot inside that u will assign which are the payment methods that are applicable for that lot may be in the check lots your users might have given all the payment methods thats why your problem is coming.
    U can do one thing for each check lot u can assing a different payment method.
    regards
    srikanth.

  • How to restrict the modification of a process form field.

    Hi,
    Is there a way out to restrict the modification of a process form field.
    I have a process form field loginid which can not be updated in a target. I want to achieve the same in OIM. I have not created any update task for the field but if the user changes the loginid field then it is getting saved in the OIM database and hence any operation thereafter is falling.
    Thanks

    Hi Kevin.
    I really appreciate your help.
    But I tested your configuration in our environment and it doesn't work. The same error (The Resource has not been configured properly) is displayed when I try a provisioning for that resource. Anyway, we could not use this configuration here, because end-users shall have the option to change some values in their process form.
    I don't know why, but seems that when I define any field as Display-Only, the prepopulate adapter runs in a post-insert schedule and a error is given cause it try to fulfill a display-only field, which is not allowed.
    I try an alternative configuration, which works properly:
    - keep the field User ID as Text Field.
    - use the prepopulate adapter to populate this field with the User Login (previously defined in the User Definition form)
    - delete the property "required = true" to this field
    - set property "visible = false" to this field
    In this way, the end-users can modify the other fields, except User ID. Otherwise, they never will can see their own User IDs while making a request. For new users it will not be a problem because their User Login (on User Definition) and User ID (on Process Form) will be exactly the same, but for users that already exists in the target system, this values will be different which can originate small issues.
    Until achieve an understanding about why a display-only field can not be filled by an pre-populate adapter, I will use this setting above.
    Regards.

  • Re : Restrict the number items in Billing

    hI
             How to restrict the number items in Billing ? For Example No. of item in billing is maximum 5. Suppose our delivery document contains 7 items then I need first 5 in one invoice and remaining in another invoice. How to do this?.
    Thanks
    mani

    Hi,
    Go to SPRO>>>IMG>>>Sales & Distribution>>>Billing>>>Billing Documents>>>Country-specific features>>>Maintain Maximum No. Of Billing Items.
    This is where you can define a maximum number of items allowed for all billing documents within a given sales organization.
    However, maintaining data here is not enough alone to bring about a billing split by number of billing items.
    You must also go to copying control for order/delivery to billing document at item level under "Data VBRK/VBRP" and maintain routine 006 "individual invoice limited" or a similar routine that accesses the data maintained here.
    Thanks

  • Restrict the number of processed messages in a time interval

    Hi experts,
    i have one problem to solve.
    Is there a possibility to restrict the number of processed messages in single stack java pi 7.3 in some time intervals?
    My problem is, that i have to restrict the messages from being sent only from 8:00 to 18:00 and there are restricted numbers that i can send in 15 minutes.
    For example 2000 messages can be sent in 15 minutes, if more messages arive, they should be queued and be processed in the next 15 minutes.
    Thank you in advance.
    Richard

    You're right in thinking that the behaviour you describe looks wrong.
    Take a look at the QueueBrowser interface which can be used to inspect a queue. You get one using QueueSession.createBrowser(Queue). The QueueBrowser allows you to scan a queue without consuming the messages. However note that the state of the queue may change while you're observing it through the QueueBrowser so what you see might not always be a 100% accurate representation of the queue at any given time.
    Other things to check:
    - message selectors - are you setting a message selector on your queue receiver which is resulting in not all of the messages 'matching'.
    - expired messages - are you setting a time-to-live on the messages that you publish.
    Hope this helps,
    David Ingham
    http://www.arjuna.com

  • In Free goods how to restrict the quantity to not to alter.

    Dear All,
    I have maintain condition record for free goods in VBN1.EX.102.While creating sales order for 20 quantities system populates 204.But if am changing this as 152 or 205,system is allowing to do.Same is the case at delivery.How can we restrict the system to not to allow the changes in sales order in case of free goods .Please guide me.
    Regards,
    Deepti

    Hi
    KIndly check the  below user exit and make the free goods item as in display mode
    MV45AFZZ 'USEREXIT_FIELD_MODIFICATION'
    to change the SCREEN-INPUT = 0 to make it display  for free goods item category Tann
    By doing above if any one changes main item  system will accordingly change the free goods item also
    Regards
    Damu.

  • Restrict the list of values retrieved by a model driven LOV

    hi all
    i'm try to restrict the list of values retrieved by a model driven LOV just like the article in this link
    http://www.oracle.com/technology/products/jdev/tips/fnimphius/restrictlovlist/restrictlov.html
    and i'm using the jdev11.2 but i always get this error
    java.sql.SQLException: parameter IN or OUT is missing at index 1
    my code is :
    public void SetSchoolLovVar(LaunchPopupEvent launchPopupEvent)
    String var_val=getOt7().getValue().toString();
    System.out.println("++++++++++++++++++++++++++++++++"+var_val);
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    FacesCtrlLOVBinding lov = (FacesCtrlLOVBinding)bindings.get("DeptCode");
    System.out.print("LOVE "+lov);
    System.out.println("+_+_+_+_+__+_+_+__+_+_+_+_+_+_+_+_+_+_________+++++_+_+_"+lov.getName());
    lov.getListIterBinding().getViewObject().setNamedWhereClauseParam("Rejon_For_Prj_Dept",var_val);
    Rejon_For_Prj_Dept is the bind variable of the Lov Query.
    any good idea

    Hi,
    The error might be due to making the bind variable as required but not using it in the vo query. Edit the bind variable and make it as optional by unchecking the required checkbox.
    Sireesha

  • Form with report, where some items in the form have been given values.

    Hi, greetings:
    I have a question that maybe silly but annoying to me. I need to provide a form with report, where some items in the form have been given values automatically, and these items (display only) are supposed to show given values in the form automatically.
    I used the APEX form with report. The update and delete worked well. But I cannot show automatic values when insert. By default APEX insert form makes every item null; I tried to give value for two items: P5212_USERKEY, P5212_DAILY_VER_DATE with process before header, after header, after regions and before footer, and computation, or set values of these two items in the branch when user hit create button (submit). It never worked out, the two items always displayed null value, and when I insert, I got "ORA-01400: cannot insert NULL into ("TBSBI"."DAILYVERPRODNOTE"."USERKEY")", since I have set up constraint in database that these two columns should not be null.
    Could anyone help on this? any suggestion would be appreciated.
    Sam

    If you have made these values 'Display Only' they would by default not save the session state. Accessing the page items will always return NULL. Did you change the 'Save Session State' option to 'Yes'?

  • How to Restrict the users from changing the Default variant of report.

    Hello everybody,
    The requirement is to restrict the users to save and overwrite  the default layout variant (Layout for higher managenet)set for the report, but at the same time they should be able to change and save the other layouts for which they are having access.
    I have written the logic in the program which is working fine for all the scenario when we execute the report. But the logic doesnt work if the user is selecting the layout on the output screen of the report.
    for e.g if the user runs the report using the layout varaint for which he is having the authorization then he gets the all 4 options so he then he can select the layout for which he is not authorized and he can overwrite.
    i have debugged and check as i have found that after the report output is shown all the layout paramater is controllled by the statndard SAP objects.
    Can anyone help me out in this issue.
    Thankyou in advance.
    *to get the default layout variant.
      w_save = 'A'.
      if p_vari is initial.
        clear disvariant.
        disvariant-report = sy-repid.
        w_variant = disvariant.
        call function 'REUSE_ALV_VARIANT_DEFAULT_GET'
          exporting
            i_save     = w_save
          changing
            cs_variant = w_variant
          exceptions
            not_found  = 2.
        if sy-subrc = 0.
          p_vari = w_variant-variant.
        endif.
      endif.
    *logic to check user authorization to change the layout setting.
      if p_vari = c_layout.
        if not sy-uname is initial.
          select single * from agr_users
                  where agr_name = c_role
                  and   uname    = sy-uname.
          if sy-subrc = 0.
            w_save = 'A'.
          else.
            w_save = ' '.
          endif.
        endif.
      endif.
    Regards,
    Satish.

    Hi Maine,
    Thanks for your reply.
    As you mentioned for your own program, you can control the parameter "I_SAVE", when calling "REUSE_ALV_GRID_DISPLAY".
    so already i have use the same logic and control the parameter through I_SAVE and here i am calling method ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY instead of "REUSE_ALV_GRID_DISPLAY".
    and it works fine when we execute the report but the logic doesnt work when the user tries to change and save the layout variant on the output screen of the report.
    Regards,
    Satish

  • How to restrict the changes in Relesed PO?.

    Hi all,
    How to restrict the users to make a changes in the Released PO?. User should make the changes only if it is unreleased by the respective codes.
    1. Is there any user parameters like functional authorisation?
    2. I have already suggested two solutions to the clients that
        1. To restrict the authorisation of TCodes ME22n at the user level, but it's not a suitable solution, if user want to make any changes before releasing, then system is not allow to do the changes.
        2. I have made release indicator as a 1 - not changeable if it is released, in release strategy settings. But the system is not allowing the all the users including release codes to make the changes?.
    If there is any solution, please reply immediately.
    with regards,
    Raja.

    hi,
    if u set release indicator 1, after release is taken place, for any changes, u need to revoke the release. and then change the PO.
    even u cant directly block the changes to already released PO, because, in future if at all qty or some changes is required to change, it should allow u to change!

  • Performance Issue-;How to restrict the total output of the report.

    Hi Experts
    I need your advise to resolve one performance issue in my BI Publisher report.
    My report query is extracting more than 80000 records at once. To load these records into the report template it is taking all most 14 to 15 hours. Unfortunately i cannot change my logic to put some more filter to restrict the query output, as this is the requirement from the client.
    Is there any way i can restrict my report so that it will extract the first 1000 record and on the event of pressing next it will extract the next 1000 record and so on from the point when it left in last time.
    Kindly let me know if you have any solution for this.
    Thanks in advance.
    Regards
    Srikant

    Hi experts...
    Any update on this...

  • Get the Stock for a given Material no

    Hi,
         I'm an ABAP consultant, new to MM.
         I have a requirement - For a given Production Order I have to find the Material and respective BOM Explosion. Once that is done I have to get the Stock for those Materials [Child Materials].
    I have used AUFK and AFPO to get the material from the Production Order and Used MAST table to get the other details and passed it to FM - 'CS_BOM_EXPL_MAT_V2' - This gives me the Child materials.
    Now I want to know how can I find the Stock for a given Material. I want to get the Overall Unrestricted stock. Which Table do I have to use. Is there any standard Function Module [FM] or BAPI to get it.
    Please help.
    Thanks & Regards,
    Ashish

    I have gone through  the MARD table. I want to confirm - for a Material no there are more than 1 plant and for each plant there are more than storage location. So I have to add the Unrestricted Stock of all those to get the Full Unrestricted Stock.
    Please refer Transaction MMBE - I have to use that output.

Maybe you are looking for

  • Audigy Platinum Pro does not work for microphone!!! CREATIVE HE

    I recently bought the Audigy 2 ZS Platinum Pro mainly for guitar recording. The external unit that i plug my guitar into plays alright through the LINE IN 2 (I find it works better when you don't put a line out to your amp), though not spectacular, b

  • PDF print preview not coming as it contains chinese character

    hi when i see the print preview of the Delivery note ( in scripts ) normally, the chinese characters appears. but when i want to check with pdf print preview nothing is coming. i am using convert_otf func. module. is it because of function module or

  • Binocular search for Cost Center is not returning any data

    Hi Gurus, When clicking on the SRM-Shooping Cart-Cost Assignment- Account Assignment Overview- Cost center Binocular search icon,  it is not returning any data.  However,  when drilling down in the Account Assignment Overview, you will see another Bi

  • Why won't my shift register work?!

    I am trying to calculate the volume by multiplying the rate by the time plus the previous volume. The previous volume is the part that I can't figure out. I used a shift register and it's not working. Attachments: screen shot of program test 12.gif ‏

  • Firefox lags constantly in many ways

    Firefox hangs constantly with everything. This started about 3 weeks ago. When I type in text it lags, when I watch youtube videos it lags, and when I scroll down in websites of all different kinds it lags. The problem is getting progressively worse.