Year to Date error ?

Hi
I have following problem
The amount inivoiced from 1st of january 2007 till 18th of march 2007 = *1500*
The amount inivoiced from 1st of january 2008 till 18th of march 2008 = 1980
filtering on date 18th of march 2007, the ToDate(amount, year) returns *1500*
filtering on date 18th of march 2008, the ToDate(amount, year) returns 1980
So far so good.
But when I'm filtering on on date 18th of march 2008, the AGO(ToDate(amount, year), year,1) returns *1560*
I've found out the extra 60 is because of the system takes 1 extra day.
I assume it has something to do with the leap year.
Is there a way to solve this problem? Is it a bug?
Thanks

it's a known feature:
http://obiee101.blogspot.com/2009/01/obiee-leap-year-challenge.html
regards
John
http://obiee101.blogspot.com

Similar Messages

  • MID YEAR GO LIVE ERROR

    MID YEAR GO LIVE ERROR
    Its a mid year go live and we have only year to date (YTD only
    and not QTD and MTD) data for gross pay ,deductions &
    taxes.Right now we are uploading the YTD gross in /101, YTD
    Social Secutiry in /403, YTD medicare in /405 , YTD Federal tax
    in /401 and YTD State tax in /401 in tables T558B, T558C and
    T5U8C against the last payroll period before the go live payroll
    period. We are using the payroll driver with schema ULK9 to
    upload the data to the cluster and then setting the earliest
    retro accounting date to the go live date.
    On running the payroll for the next period with schema U000
    the system does a negative deduction for Social Security and
    Medicare i.e pays back to the employee the amount
    uploaded in /403 and /405 for the past period.
    For /401 the things are working perfectly fine but for other wage
    types
    Will really appreciate your help!!
    Regards,
    Kumarpal Jain

    mid year go live

  • How to catch date errors and continue processing in a PL/SQL procedure

    I'm updating a date field with dates constructed from day, month and year fields. The incoming data has many instances of day and month that are not valid dates, ex 11 31 2007. There is no 31st day in November.
    I would like to write a pl/sql script to scan the table containing these values and log the rows that produce conversion errors.
    I thought I could do this with exceptions but there are no exceptions that correspond to the ORA-01847 error for mismatched day and month.
    Here is what I tried (the print procedure is a local wrapper for DBMS_OUTPUT.put_line):
    PROCEDURE date_check IS
    start1 DATE ;
    BEGIN
    select to_date(nvl(yearcollected,'9999') ||'/'|| nvl(monthcollected,'01') ||'/'|| nvl(daycollected,'01'),'YYYY/MM/DD'))) into start1 from incoming_data where id=1 ;
         BEGIN
              update temp_test set test_date = start1 where id=1 ;
         EXCEPTION
              WHEN OTHERS THEN
              print('Date error message from exception block');
         END;
    print('Processing continues after handling date exception') ;
    END date_check ;
    Is there a way to catch this kind of error and continue processing after logging a message?
    -=beeky

    Hi, Beeky,
    There are lots of different error messages associated with bad dates. Rather than try to catch them all, I use a BEGIN ... EXCEPTION block that contains nothing but a TO_DATE call. This is one of the rare occassions when I think "EXCEPTION WHEN OTHERS" is okay,
    The following function comes from a package. If you want to make a stand-alone function, remember to say " *CREATE OR REPLACE* FUNCTION ...".
    --          **   t o _ d t   **
    --     to_dt attempts to convert in_txt (assumed to
    --          be in the format of in_fmt_txt) to a DATE.
    --     If the conversion works, to_dt returns the DATE.
    --     If the conversion fails for any reason, to_dt returns in_err_dt.
    FUNCTION     to_dt
    (     in_txt          IN     VARCHAR2                    -- to be converted
    ,     in_fmt_txt     IN     VARCHAR2     DEFAULT     'DD-MON-YYYY'     -- optional format
    ,     in_err_dt     IN     DATE          DEFAULT     NULL
    RETURN DATE
    DETERMINISTIC
    AS
    BEGIN
         -- Try to convert in_txt to a DATE.  If it works, fine.
         RETURN     TO_DATE (in_txt, in_fmt_txt);
    EXCEPTION     -- If TO_DATE caused an error, then this is not a valid DATE: return in_err_dt
         WHEN OTHERS
         THEN
              RETURN in_err_dt;
    END     to_dt
    ;

  • Month-to-Date and Year-to-Date values in Query

    Hello experts,
    One of our BI reports has the following requirement: the user should be asked for the report date. After the user inputs the date, the report shows the key figures in three different "flavors": one is the values for that date, the second one is the cumulate values from the first day of the month of the report date to the report date itself, and the third is the cumulate values from the first day of the year of the report date to the report date itself.
      I created my report date variable based on 0CALDAY. Then I searched for SAP-exit variables that would help me achieve this, but could not really find any, except for 0P_ABO10, 0P_ABO11, 0P_ABO12 variables, all of them have as description "Start of Key Date Year". I tried creating a few selections in which the dates taken were defined as a range from each of these variables to the report date variable (for the year-to-date values), but I got the error "Variable 0P_ABO10 could not be substituted". I also got this error for the other two variables. And I could not find any SAP-exit variables like "Start of Key Date Month", in order to do the Month-to-Date part. My next try was to use the field "Key Date" with a variable in it, instead my own report date variable based on 0CALDAY, but it gave me the same errors.
    I searched the forums and found a few threads that looked useful, like
    First and Last day of month and
    1st day of month / 1st day of week variables
    However, they require some ABAP coding, and I do not know where to place the code (actually, I do not know where to work with ABAP code), and I also believe that I would have to do some changes to it.
    Any suggestions?

    Hi Pedro,
    You have to create customer exit in T_Code: CMOD
    1. Create a Z project
    2. Select RSR00001 as enhancement type.
    3. Go into include ZXRSRU01
    4. create a code like
    Here A is your variable based on 0calmonth with type customer exit and B is variable for 0calday.
    Try to write logic for your case taking this as example.
    WHEN 'A'.
        IF I_Step = 2.
          Loop at I_T_VAR_RANGE into L_T_VAR_RANGE where VNAM = 'B'.
            Concatenate L_T_VAR_RANGE-LOW(4) '001' into D1.
            Concatenate L_T_VAR_RANGE-LOW(4) '012' into D2.
            Clear L_S_Range.
            L_S_Range-low = D1.
            L_S_RANGE-high = D2.
            L_S_RANGE-sign = 'I'.
            L_S_RANGE-opt = 'BT'.
            Append L_S_Range to E_T_Range.
          ENDLOOP.
        ENDIF.
    If you want exact code I can help you in that.
    Thanks,
    Kams

  • Convert to a date error

    i have a the code below which i am passing a form value to
    <CFLOCATION
    url="CalendarCurrent.cfm?DATE=<cfoutput>#form.Diary_Date#</cfoutput>">
    but i am getting cannot convert to a date error, i cannot
    change the code below as other pages use it, so how can i change
    the cflocation date to match.
    i have tried dateformat and lsdateformat any ideas?
    <cfif NOT IsDefined("URL.DATE")>
    <cfset session.DATE= DateFormat(Now(), "dddd DD MMMM
    yyyy")>
    <cfset session.SHORTDATE= DateFormat(Now(),
    "yyyy-mm-dd")>
    <cfelse>
    <cfset session.DATE= (DateFormat(URL.DATE, "dddd DD MMMM
    yyyy")) >
    <cfset session.SHORTDATE= (DateFormat(URL.DATE,
    "yyyy-mm-dd")) >
    </cfif>

    Hi,
    You didnt understand some basic stuff, so i tell you what you
    should have done:
    "The value "27/3/2007" could not be converted to a date."
    <cfset myDate="form.Diary_Date">
    this line you create myDate parameter with value from form,
    Diary_Date field.
    you should use # signs because coldfusion doesnt know
    otherwise you want to use cf parameters value.
    in other words otherwise you are telling coldfusion that
    mydate is string containing literaly "form..Diary_Date".
    take care you always trim parameter values from forms, same
    browsers are so nice to adding extra enter character at end of
    field value. so first line goes:
    <cfset myDate="#Trim(form.Diary_Date)#">
    now, sence myDate parameter is fine, lets focus few minutes
    how you split value from myDate to tree different pieces.
    GetToken fuction is nice fellow when you want split
    preformated string to pieces, preformated mean that string always
    look same kind. just like dates. year, month and day are in same
    positions at string, while year might be different.
    example: 1.1.2007 and 1.1.2003, get it?
    usage of gettoken is very simple, you just tell function
    first parameter where he has to split you piece of string and
    second
    you tell number of piece to look for and last you tell what
    character is separator of each piece.
    so, since date you want to process is "27/3/2007", date is
    first, month next and year last.
    separator is "/" so, getting month should be like this:
    myDate is parameter is strinng to be splitted.
    number 2 is order number, month is second piece at string
    / is piece separator.
    Following code will give you substring "3" from string
    "27/3/2007".
    <cfset myDate_Month = "#GetToken(myDate,2,"/")#">
    Can you repair your self next two lines?
    <cfset myDate_Day = "#GetToken(myDate,1,"\")#">
    <cfset myDate_Year = "#GetToken(myDate,3,"\")#">
    Cheers
    Kim

  • Year To Date for Current Fiscal Year

    Hi All,
    I have installed BC variable Year To Date for Current Fiscal Year 0I_CFYTD..
    foloowing error occurs
    Variable 0I_CFYTD could not be replaced..
    Do i need to write any code or Please help.....

    Hi,
    Please check if fiscal year variant is used in the filter. Else the BC variable throws an error. Drag fiscal year variant to the filter area and set a value or variable input for the same.
    Regards,
    Satya

  • Uploading pages to FTP - Get error of internal data error

    I had malware on my computer and had to redo the whole computer and reinstall Dreamweaver CS5. I have not had to redo this for 4 years and in the process ..none of my pages will upload with Dreamweaver as before. All I did was update my pictures like I do every month. I got some of the text updated on the web using Filezilla, but the Dreamweaver upload will not work..I get the Dreamweaver internal data error sign.
    What am I doing wrong?
    My web site is www.williamshomesteadranch.com
    The index page, contact us page, well done page, and infor links pages uploaded ok with Filezilla, but the none will  upload with Dreamweaver. Filezilla uploaded all but the new pictures on the other pages.
    Please help!
    Sue

    > I'd like to know if there is a fix out there
    We haven't identified the source of the problem yet. I have
    no trouble
    uploading PDFs with any version of DW, so I would be
    profoundly surprised if
    this were a DW problem.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Mustang151" <[email protected]> wrote in
    message
    news:eggkcj$gpt$[email protected]..
    > I've just recently encountered a similar problem with
    uploading PDF's
    > through
    > Dreamweaver. All other file types upload just fine, but
    the PDF's give an
    > 'internal data error'. I'd like to know if there is a
    fix out there, or
    > pending, as I really would like to avoid having to use a
    different FTP
    > client
    > to upload one file type. I have the most recent
    Dreamweaver MX2004 update,
    > which doesn't seem to have fixed the problem. Any
    further suggestions?
    >

  • Date Error on Start Up

    This problem just began in the past two days. I am in Leopand 10.5.1 (just did the latest software updates on Tuesday) on a G4 PowerBook. Twice (but not consistently) upon start up in the last 24 hours, I get an error message saying my date and time are off dramatically and it could affect the operation of certain programs. Sure enough, I'm back in 1969 (PLEASE don't send me back there!). Once didn't bother me TOO much (though all my calendar alerts reloaded themselves for YEARS). Twice was a pain, but three times worries me that there is a corrupted files somewhere.
    At the same time, but not necessarily connected? - my saved WEP password for my home wireless network didn't show up and took several re-enterings (keychain didnt' save it?) and restarts to get reconnected to the Net.
    Any thoughts about what might be going on? I've searched on "date errors" and haven't seen anything that fits this bill.

    I'll bet you need a new PRAM battery:
    http://docs.info.apple.com/article.html?artnum=86181

  • DTS 2000 Short date error in Windows 7 (64 bit)

    When using the DTS 2000 Package Designer in 2008 SQL Server Management Studio in Windows 7 (64 bit),
    and when trying to use the Build Query functionality, I get the following error message:
    An unexpected error occurred.
    [MS Visual Database Tools] - Short date
    I don't get this error on my machine running Windows XP. The regional settings on both machines are the same.

    Hi Everyone,
    I know this is a very old thread.  But it came up as the first hit in Google when I searched the error message.
    I still have the requirement to update an old DTS package that has been migrated to SQL Server 2008 R2 and couldn't find a solution anywhere.
    I didn't want to experiment with client tools on my Database Server so here is what I did on my Windows 7 64 bit machine.
    I installed Microsoft Windows Virtual PC and then installed Windows XP Mode as a virtual machine.
    Then I installed the following stuff in the virtual XP machine.
    SQL Management Studio 2008 tools.  Of course I needed to install the SQL 2005 backward compatibility stuff as described elsewhere and quite a few other prerequisites that the management studio installer nicely pointed out to me. (You
    will probably also need SQL 2000 Client  Tools and SQL 2000 SP4)
    Once that was all in place I no longer received the "Short Date" error message and I could update my old DTS packages.
    I can even run Server Management Studio as a XP Mode Application directly in Windows 7 and it looks just like any other native application.
    I have told my boss years ago that this DTS stuff is all hanging on by a thread.  I'll also tell him the thread just got a bit thinner :)
    Hope this helps someone else stuck in this position.
    David

  • Ultra 10 showing Date ERROR

    Ultra 10 frequently showing Date Error, date changed year --:--:1967, sometimes it automatically changed correct time. I need solution for this issue.

    Hello John,
    The U10 has 4 sticks; 3 x 64Mb and 1 x 128Mb DIMMs... I tried every combination of 2 I could think of with the same results (RED STATE)
    you have to use pairs (same capacity) of DIMMs. Use a pair of the 64MB DIMMs to test.
    Get another 128MB DIMM or better 2 or 4 128MB DIMMs (one as as spare) -- if the system is working otherwise get another U10 with (333 or 440MHz /2MB Cache) CPU and memory (128MB or 256MB modules).
    The error might be caused by a bad CPU module, bad system board (error appears later due to a termic problem), bad memory module or bad power supply.
    I tried booting with no sticks of RAM, and with the exception of a error message telling me I had no ram, the POST/RED STATE happened the same way...
    I guess the CPU module is bad. Have you checked that none of the pins of the CPU module are bent or missing ?
    These systems are very cheap today, except for the higher shipping charges, a complete system costs less than the individual components in sum.
    Michael

  • Next Years Meeting Dates

    Been toying with different thoughts, SQL and Functions but haven't come up with the right plan of action.
    We have a monthly meeting, typically on the 1st Monday of the Month. Occasionally it needs to be different. The date needs to be saved to a Table for referencing other code and documents on the server. These are some of the things I have toyed with in trying
    to figure out how to do it.
    I have a Form that uses =DMax("BoardDates","Board and submission dates") to return the highest date in the Table.
    There are several functions in a Standard Module from the Forums
    1)
    '"the following function was made to display info on Report"
    Public Function fnIsFirstMondayOfMonth(dteInput As Date) As Boolean
    fnIsFirstMondayOfMonth = (Day(dteInput) <= 7) _
    And (Weekday(dteInput) = vbMonday)
    End Function
    2)
    'The following function by Dirk is to try creating dates on a Form to store in the Tables
    Function fncFirstMondayOfNextMonth( _
    BaseDate As Date, _
    Optional WeekdayWanted As VbDayOfWeek = vbMonday) _
    As Date
    ' Given a datem return the date of the first occurrence
    'of a given day of the week in the next month.
    ' The default is the first Monday
    ' but the optional WeedayWanted argument
    ' can be used to specify any desired day of the week, as
    ' a member of the vbDayOfWeek enum.
    Dim dtNextYear As Date
    Dim dtNextMonth As Date
    Dim intDay As Integer
    ' Start with the first day of next month.
    dtNextMonth = DateSerial(Year(BaseDate), Month(BaseDate) + 1, 1)
    ' Find the first <WeekdayWanted> on or after dtNextMonth.
    intDay = Weekday(dtNextMonth)
    'fncFirstWeekdayOfNextMonth = DateAdd("d", (WeekdayWanted + IIf(intDay > WeekdayWanted, 7, 0)) - intDay, dtNextMonth)
    End Function
    3)
    'The following function by Ken is to try creating future dates on a Form to store in the Table
    Public Function GetMondayDate(dtmDate As Date, intWeekNum As Integer)
    On Error GoTo Err_Handler
    Const NOCURRENTRECORD = 3021
    Dim rst As DAO.Recordset
    Dim strSQL As String
    Dim strFrom As String
    Dim strTo As String
    Dim n As Integer
    Dim dtmReturnDate As Date
    ' get start and end dates of next month as date literals
    ' in internationally unambiguous ISO format of YYYY-MM-DD
    strFrom = "#" & Format(DateSerial(Year(dtmDate), _
    Month(dtmDate) + 1, 1), "yyyy-mm-dd") & "#"
    strTo = "#" & Format(DateSerial(Year(dtmDate), _
    Month(dtmDate) + 2, 0), "yyyy-mm-dd") & "#"
    ' establish a recordset of all Wednesday dates in next month
    strSQL = _
    "SELECT WeekStart " & _
    "FROM WednesdayCalendar " & _
    "WHERE WeekStart BETWEEN " & _
    strFrom & " AND " & strTo & _
    " ORDER BY WeekStart"
    Set rst = CurrentDb.OpenRecordset(strSQL)
    ' loop until required week of month
    ' and get Wednesday date
    With rst
    Do While n < intWeekNum
    dtmReturnDate = .Fields("WeekStart")
    n = n + 1
    .MoveNext
    Loop
    End With
    GetMondayDate = dtmReturnDate
    Exit_Here:
    Exit Function
    Err_Handler:
    ' if number of weeks in month with a Wednesday
    ' has been exceeded return a Null
    ' otherwise inform user of any unknown error
    Select Case Err.Number
    Case NOCURRENTRECORD
    GetMondayDate = Null
    Case Else
    MsgBox Err.Description, vbExclamation, "Error"
    End Select
    Resume Exit_Here
    End Function
    Then have tried the following in unbound controls on the Form with a highest date in the Table at 11/3/2015.
    =IIf(fnIsFirstMondayOfMonth([HighestDate]+DatePart("m",2)),Null,"*") & Format([HighestDate],"mmmm dd"", ""yyyy") which returns - The current Date preceded by *
    =IIf(("m",[highestdate]>10),DateAdd("m",1,[HighestDate]),[highestdate]) Returns The current date + 1 Month (12/3/2015)
    =DateDiff("d",Now(),[HighestDate]) - Returns the difference between today's date and the highest date in the Table (315)
    =Format(DateDiff("d",Now(),[HighestDate]),"yyyy") - Returns 1900
    =Format([HIghestDate],"yyyy")+1 - Returns the Next highest Year (2016)
    =DateAdd("d",("Monday"+IIf([intDay]>[WeekdayWanted],7,0))-[intDay],[dtNextMonth]) - Returns #Name? error
    =DateAdd("d",(3+IIf(Day(DateSerial(Year(Date()),Month(Date())+1,1))>3,7,0))-Day(DateSerial(Year(Date()),Month(Date())+1,1)),DateSerial(Year(Date()),Month(Date())+1,1)) - Returns 1/3/2015
    =DateAdd("d",7-(7-Day(DateAdd("m",1,DateSerial(Year(Date()),Month(Date()),0)+1))),DateAdd("m",1,DateSerial(Year(Date()),Month(Date()),0)+1)) - Returns 1/2/2015
    =DateDiff("y",[HighestDate],DateAdd("y",+1,DateAdd("yyyy",3,[HighestDate]))) - Returns 1097
    =(365-Day(Now())) - Returns 342
    =DateAdd("y",-1,(Now())) - Returns 12/22/2014 2:41:03 PM
    =IIf([HighestDate]<Now(),Now(),DateAdd("d",+1,Now())) - Returns 12/24/2014 2:41:03 PM
    =Format(IIf([HighestDate]<Now(),Now(),DateAdd("yyyy",+1,Now())),"yyyy") - Returns the year of the highest date (2015)
    So we need to be able to have on the Form the 11 dates in Bound controls based on the selected year in an unbound Form, and then have 11 unbound controls show the next years monthly meeting dates. A button to update the unbound dates to the Table provided
    those months of the year do not already have dates. We don't want the code to update the Table if the Month/Year already has a date as 1 or 2 times a year the dates will be deferred and we need the deferred date to remain.
    I was also looking at using the following code to make it work???
        If Len(Trim(Nz(Me.[JanMDate], "") & "")) = 0 Then
        'check to see if the text box already has data - if it doesn't then
        Me.[JanMDate] = DateAdd("d", 365, Me.[HighestDate])
        'use the Highest date value and calculate next years dates to store in the unboun date text boxes
        End If
    Thank you for your help!!!
    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    If not automated, regular compacting of a database should be a maintenance task undertaken by the database administrator, but failing that I can see three possible approaches:
    1.  Create the temporary table in an external file, which is itself created and deleted at runtime.  The BoM demo in my OneDrive folder adopts this approach to create temporary tables on the fly to simulate recursive querying to generate a bill of
    materials.
    2.  Adapt my code so that instead of creating a separate table from which to append rows it inserts rows into your operational table annually.
    3.  Instead of creating a temporary table, create a permanent auxiliary calendar table stretching 10 or 20 years into the future, and restrict an append query by a date range to insert a subset of rows into the operational table annually.  Auxiliary
    calendar tables are normally permanent objects as the dates in them are not usually subject to amendment, apart from the deletion of public and concessionary holidays dates as and when these become known.  In your case, however, if you created a table
    of first Mondays of each month say, the table would need to be updated if subsequently the regular dates were to change to another day in the month, e.g. 2nd Tuesday.  This would not be difficult to incorporate into the interface as it would involve no
    more than deleting rows after the first Monday dates ceased to be appropriate, and inserting rows from that date onwards for the 2nd Tuesdays.
    Ken Sheridan, Stafford, England

  • I am using Windows 8.1 i have an External Hard Disk and one drive is now inaccessible due to sudden power failure few days ago. Now it shows "Data error (Cyclic redundancy check)". I want all my important files and Pics. How ?

    Hi,
    I am using Windows 8.1
    I have an External Hard Disk i have partitioned it to 4 parts.
    One drive is now inaccessible due to sudden power failure while listening Music from that drive few days ago.
    Now it shows "Data error (Cyclic redundancy check)".
    I tried all the procedures provided here like
    chkdsk /f, diskpart, rescan etc
    but no result :( (i mean all processes failed. They could not detect the drive).
    Please help me to get those data, pictures and project files.
    thank you

    Then why aren't you posting this in the Windows 8 forums found @
    http://social.technet.microsoft.com/Forums/windows/en-US/home?category=w8itpro
    This is a Windows 7 forum for discussion about Windows 7.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

  • SSRS expression for today,yesterday,Lastweek ,Last fortnight,Last Month, Year to date

    Hi All;
    I have a field called createdon 
    Using this field i need to create the SSRS expression for the table as below 
    Any help much appreciated
    Thanks
    Pradnya07

    use expressions as below
    assuming this is to be done in SSRS
    Today
    =COUNT(IIF(
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now()),Fields!YourRequiredField.Value,Nothing))
    Yesterday
    =COUNT(IIF(
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    LastWeek
    =COUNT(IIF(
    DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    Last fortnight
    =COUNT(IIF(
    (DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-1)
    Or (DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-2),Fields!YourRequiredField.Value,Nothing))
    Last Month
    =COUNT(IIF(DateDiff(DateInterval.Month,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Month,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    Year To Date
    =COUNT(IIF(DateDiff(DateInterval.Year,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Year,Cdate("01/01/1900"),Now())
    And
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) <= DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now()),Fields!YourRequiredField.Value,Nothing))
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Stale data error while opening a multiple OAF page .

    Dear Friends ,
    I have a OAF page developed and deployed in server , its basically a search page , it also has several links to
    go to create page and update page . when the user opens the multiple page using different tabs in the browser
    like for example
    ex :
    from search page click on create page open it as new tab . if such multiple table are being opened
    and do some operation like search a record , it gives and error (stale data : Developer's mode exception ) .
    How to over come this exception , could you please share you ideas
    Thanks in Advance,
    Keerthi.k

    Hi friend ,
    In Search page i didn't do any update. and also search page is not a problem it's working fine. create page only the problem. In this page only throwing Stale data error exception.
    Please give me more suggestion.
    Thanks in advance,

  • Stale data error while deleting a record

    Hi
    My design of this development is as follow...
    1. Search Page in which users give some search criteria and results will be displayed in the results region on the same page. For each results record I have two buttons like 'Update' and 'Delete' so that users can delete the record or can update the record. For update i created a one more page where users can able to edit and save the data. I have two AM one for Search Page and one for Update Page.
    Please find more details below.
    intfEO  based on PO_REQUISITIONS_INTERFACE_ALL
    errorEO  based on PO_INTERFACE_ERRORS
    updateEO based on PO_REQUISITIONS_INTERFACE_ALL
    VOs
    intfVO based on intfEO and errorEO
    updateVO based on updateEO
    AM
    intfAM based on intfVO
    updateAM based on updateVO
    Pages
    searchPG based on intfAM
    updatePG based on updateAM
    Suppose I have one record in interface table with corresponding error record in error table.When users given the search criteria and hit enter they found a record. It means i have one record in the interface having one error record in the error table and both tables have same transaction id (primary key). So here user first try to update the record and it is working. After update he try to delete a record then I am getting below error. Please note that I am not getting this error when if i directly delete the record with out doing any update before delete. When ever users click on update icon then update PG will open and when users click on Apply button then data is getting updated in the database and page will forward to the search page.
    Unable to perform transaction on the record.
    Cause: The record contains stale data. The record has been modified by another user.
    Action: Cancel the transaction and re-query the record to get the new data.
    My UpdatePage Controller
    /*===========================================================================+
    |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
    |                         All rights reserved.                              |
    +===========================================================================+
    |  HISTORY                                                                  |
    +===========================================================================*/
    package powl.oracle.apps.xxpowl.po.requisition.webui;
    import com.sun.java.util.collections.HashMap;
    import com.sun.rowset.internal.Row;
    import java.io.Serializable;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OADialogPage;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageDateFieldBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
    //import oracle.apps.fnd.oam.diagnostics.report.Row;
    import oracle.apps.icx.por.common.webui.ClientUtil;
    import powl.oracle.apps.xxpowl.po.requisition.server.xxpowlPOReqIntfUpdateAMImpl;
    import powl.oracle.apps.xxpowl.po.requisition.server.xxpowlPOReqIntfUpdateEOVOImpl;
    * Controller for ...
    public class xxpowlPOReqIntfAllUpdatePageCO extends OAControllerImpl
      public static final String RCS_ID="$Header$";
      public static final boolean RCS_ID_RECORDED =
            VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
       * Layout and page setup logic for a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processRequest(pageContext, webBean);
         xxpowlPOReqIntfUpdateAMImpl am = (xxpowlPOReqIntfUpdateAMImpl)pageContext.getApplicationModule(webBean);
          xxpowlPOReqIntfUpdateEOVOImpl UpdateVO =(xxpowlPOReqIntfUpdateEOVOImpl)am.findViewObject("xxpowlPOReqIntfUpdateEOVOImpl");
          String newvalue = (String)pageContext.getSessionValue("testValue");     
          System.out.println("Transaction ID from processRequest UpdateCO from testValue field:"+newvalue);
          String transactionid = pageContext.getParameter("HashmapTransacitonid");
          System.out.println("Transaction ID from processRequest Hash Map in UpdateCO :"+transactionid);
          String errorcolumn = pageContext.getParameter("HashmapErrorcolumn");
          System.out.println("Error Column Name from processRequest Hash Map in UpdateCO :"+errorcolumn);
          String errormsg = pageContext.getParameter("HashmapErrormessage");
          System.out.println("Error Message from processRequest Hash Map in UpdateCO :"+errormsg);
          String readyonly = pageContext.getParameter("HashmapReadonly");
          System.out.println("Read Only value from processRequest Hash Map in UpdateCO :"+readyonly);
          if (transactionid !=null & !"".equals(transactionid)) { 
         /* Passing below four parameters to the Update Page */
          Serializable amParams[] = new Serializable[]{transactionid,readyonly,errorcolumn,errormsg} ;
          pageContext.getRootApplicationModule().invokeMethod("executexxpowlPOReqIntfUpdateEOVO", amParams);
       * Procedure to handle form submissions for form elements in
       * a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processFormRequest(pageContext, webBean);      
         OAApplicationModule am = pageContext.getApplicationModule(webBean);
          if (pageContext.getParameter("ApplyButton") != null)
            System.out.println("Inside ApplyButton method in UpdatePageCO");
            OAViewObject vo = (OAViewObject)am.findViewObject("xxpowlPOReqIntfUpdateEOVO");
            String transactionid = pageContext.getParameter("HashmapTransacitonid");
            System.out.println("Transaction ID from processFormRequest Hash Map in UpdateCO-ApplyButton method :"+transactionid);
            am.invokeMethod("apply");
              pageContext.forwardImmediately("OA.jsp?page=/powl/oracle/apps/xxpowl/po/requisition/webui/xxpowlPOReqIntfAllPG",
                                                     null,
                                                     OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                                     null,
                                                     null,
                                                     true,
                                                     OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
           else if (pageContext.getParameter("CancelButton") != null)
            am.invokeMethod("rollback");
            pageContext.forwardImmediately("OA.jsp?page=/powl/oracle/apps/xxpowl/po/requisition/webui/xxpowlPOReqIntfAllPG",
                                                   null,
                                                   OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                                   null,
                                                   null,
                                                   true,
                                                   OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    UpdatePageAMImpl.java
    package powl.oracle.apps.xxpowl.po.requisition.server;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OARow;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.inv.appsphor.order.server.XxapOrderHeaderVOImpl;
    import oracle.jbo.Transaction;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class xxpowlPOReqIntfUpdateAMImpl extends OAApplicationModuleImpl {
        /**This is the default constructor (do not remove)
        public xxpowlPOReqIntfUpdateAMImpl() {
        /**Container's getter for xxpowlPOReqIntfUpdateEOVO
        public xxpowlPOReqIntfUpdateEOVOImpl getxxpowlPOReqIntfUpdateEOVO() {
            return (xxpowlPOReqIntfUpdateEOVOImpl)findViewObject("xxpowlPOReqIntfUpdateEOVO");
        /**Sample main for debugging Business Components code using the tester.
        public static void main(String[] args) {
            launchTester("powl.oracle.apps.xxpowl.po.requisition.server", /* package name */
          "xxpowlPOReqIntfUpdateAMLocal" /* Configuration Name */);
    /*  // Added by 
        public void execute_update_query(String TransactionID) {
        xxpowlPOReqIntfUpdateEOVOImpl vo = getxxpowlPOReqIntfUpdateEOVO();
        vo.initQuery(TransactionID);
    // Added by  , this will not call bec changed the logic and so now the update button enabled on search results page
    // and this method will not called
    public void pageInEditMode (String transactionID, String readOnlyFlag, String ErrorColumn,
                                                                           String ErrorMessage)
        System.out.println("Transaction Id from pageInEditMode in UpdatePGAMImpl.java: "+transactionID);
        System.out.println("xxReadOnly from pageInEditMode in UpdatePGAMImpl.java: "+readOnlyFlag);
        // Get the VO
        xxpowlPOReqIntfUpdateEOVOImpl updateVO = getxxpowlPOReqIntfUpdateEOVO();
        //Remove the where clause that was added in the previous run
        updateVO.setWhereClause(null);
        //Remove the bind parameters that were added in the previous run.
        updateVO.setWhereClauseParams(null);
        //Add where clause
        // updateVO.addWhereClause(" TRANSACTION_ID = :1 ");
        //Bind transactionid to the where clause.
         // updateVO.setWhereClauseParam(1, transactionID); // this will not work bec it will start with zero from from 1
          updateVO.setWhereClauseParam(0, transactionID);
        //Execute the query.
        updateVO.executeQuery();
        xxpowlPOReqIntfUpdateEOVORowImpl currentRow = (xxpowlPOReqIntfUpdateEOVORowImpl)updateVO.next();
        // Assiging the transient varaibles
        currentRow.setxxErrorMessage(ErrorMessage);
        currentRow.setxxErrorColumn(ErrorColumn);
        if ("N".equals(readOnlyFlag))
              /* Make the attribute to 'False so that all fields will be displayed in Edit Mode because we used this
               xxReadOnly as SPEL  */
               currentRow.setxxReadOnly(Boolean.FALSE);
       public void executexxpowlPOReqIntfUpdateEOVO(String transactionID, String xxReadyOnly, String ErrorColumn,
                                                                                              String ErrorMessage)
           System.out.println("Transaction Id from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+transactionID);
           System.out.println("xxReadOnly from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+xxReadyOnly);
           System.out.println("Error Message from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+ErrorColumn);
           System.out.println("Error Column from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+ErrorMessage);
         // Get the VO
         xxpowlPOReqIntfUpdateEOVOImpl updateVO = getxxpowlPOReqIntfUpdateEOVO();
         //xxpowlPOReqIntfUpdateEOVORowImpl updaterowVO = xxpowlPOReqIntfUpdateEOVO();
       //not working
       //    OARow row = (OARow)updateVO.getCurrentRow();
       //    row.setAttribute("xxReadOnly", Boolean.TRUE);
    // updateVO.putTransientValue('XXXXX',x);
         //Remove the where clause that was added in the previous run
         updateVO.setWhereClause(null);
         //Remove the bind parameters that were added in the previous run.
         updateVO.setWhereClauseParams(null);
         //Add where clause
         // updateVO.addWhereClause(" TRANSACTION_ID = :1 ");
         //Bind transactionid to the where clause.
          // updateVO.setWhereClauseParam(1, transactionID); // this will not work bec it will start with zero from from 1
           updateVO.setWhereClauseParam(0, transactionID);
        // updateVO.setWhereClauseParam(1, ErorrColumn); 
         //Execute the query.
         updateVO.executeQuery();
         /* We want the page should be read only initially so after executing the VO with above command
            and if you use next() it will go to the first record among the
            fetched records. If you want to iterate for all the records then use iterator */
            /* Using Iterator
             while(updateVO.hasNext()) {  // this will check after execute Query above command if it has any rows
              xxpowlPOReqIntfUpdateEOVORowImpl currentRow = (xxpowlPOReqIntfUpdateEOVORowImpl)updateVO.next();
              /* above line next() will take the control of the first record */
          /*     currentRow.setxxErrorMessage(ErrorMessage);
                 currentRow.setxxErrorColumn(ErrorColumn);
               if ("Y".equals(xxReadyOnly))
                      currentRow.setxxReadOnly(Boolean.TRUE);                 
             } // this while loop will loop till end of all the fetched records
         xxpowlPOReqIntfUpdateEOVORowImpl currentRow = (xxpowlPOReqIntfUpdateEOVORowImpl)updateVO.next();
      // Assiging the transient varaibles
      currentRow.setxxErrorMessage(ErrorMessage);
      currentRow.setxxErrorColumn(ErrorColumn);
        /* Make the attribute to 'TRUE' so that all fields will be displayed as READ ONLY because we used this
           xxReadOnly as SPEL
           if ("Y".equals(xxReadyOnly))
                  currentRow.setxxReadOnly(Boolean.TRUE);            
      //Added by  and this methiod will get called from UpdatePG Process Form Request controller  
         public void rollback()
           Transaction txn = getTransaction();
           if (txn.isDirty())
             txn.rollback();
        public void apply()
            //OAViewObject vo1 = (OAViewObject)getxxpowlPOReqIntfUpdateEOVO();
            //Number chargeAccountID = vo1.get
          getTransaction().commit();      
          OAViewObject vo = (OAViewObject)getxxpowlPOReqIntfUpdateEOVO();
          if (!vo.isPreparedForExecution())
           vo.executeQuery();
    SearchPG AM
    package powl.oracle.apps.xxpowl.po.requisition.server;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.jbo.RowSetIterator;
    import oracle.jbo.Transaction;
    import oracle.jbo.domain.Number;
    import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlErrosLovVOImpl;
    import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlInterfaceSouceCodeLovVOImpl;
    import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlItemSegment1LovVOImpl;
    import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlOrgLovVOImpl;
    import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlReferenceNumberLovVOImpl;
    import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlRequestIdLovVOImpl;
    import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlRequisitionTypeLovVOImpl;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class xxpowlPOReqIntfAllAMImpl extends OAApplicationModuleImpl {
        /**This is the default constructor (do not remove)
        public xxpowlPOReqIntfAllAMImpl() {
        /**Container's getter for xxpowlPOReqIntfAllVO
        public xxpowlPOReqIntfAllVOImpl getxxpowlPOReqIntfAllVO() {
            return (xxpowlPOReqIntfAllVOImpl)findViewObject("xxpowlPOReqIntfAllVO");
        /**Sample main for debugging Business Components code using the tester.
        public static void main(String[] args) {
            launchTester("powl.oracle.apps.xxpowl.po.requisition.server", /* package name */
          "xxpowlPOReqIntfAllAMLocal" /* Configuration Name */);
        /**Container's getter for xxpowlRequestIdLovVO
        public xxpowlRequestIdLovVOImpl getxxpowlRequestIdLovVO() {
            return (xxpowlRequestIdLovVOImpl)findViewObject("xxpowlRequestIdLovVO");
        /**Container's getter for xxpowlErrosLovVO
        public xxpowlErrosLovVOImpl getxxpowlErrosLovVO() {
            return (xxpowlErrosLovVOImpl)findViewObject("xxpowlErrosLovVO");
        /**Container's getter for xxpowlOrgLovVO
        public xxpowlOrgLovVOImpl getxxpowlOrgLovVO() {
            return (xxpowlOrgLovVOImpl)findViewObject("xxpowlOrgLovVO");
      //Start Adding by Lokesh
      //This method wil get invoked from the search results page Process Request
       public void rollbackItem()
         Transaction txn = getTransaction();
         if (txn.isDirty())
           txn.rollback();
      //This method will invoked from Controller page when user click Yes on delete confirmtion page from Search Results Page
       public void deleteItem(String trasnsactionID)
         Number rowToDelete = new Number(Integer.parseInt(trasnsactionID));      
         OAViewObject vo = (OAViewObject)getxxpowlPOReqIntfAllVO();
         xxpowlPOReqIntfAllVORowImpl row = null;
         int fetchedRowCount = vo.getFetchedRowCount();
       //  System.out.print(fetchedRowCount);
         System.out.println("No of row fetched on delete method :"+fetchedRowCount);
         RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
           System.out.println("1 :");
         if (fetchedRowCount > 0)
             System.out.println("2 :");
           deleteIter.setRangeStart(0);
             System.out.println("3 :");
           deleteIter.setRangeSize(fetchedRowCount);
             System.out.println("4 :");
           for (int i = 0; i < fetchedRowCount; i++)
               System.out.println("5 :");
             row = (xxpowlPOReqIntfAllVORowImpl)deleteIter.getRowAtRangeIndex(i);
               System.out.println("6 :");
             Number PK = row.getTransactionId();
               System.out.println("7 :");
             if (PK.compareTo(rowToDelete) == 0)
                 System.out.println("8 :");
               row.remove();
                 System.out.println("9 :");
               getTransaction().commit();
                 System.out.println("10 :");
               break;
                 //System.out.println("11 :");
           System.out.println("11 :");
         deleteIter.closeRowSetIterator();
           System.out.println("12 :");
        /**Container's getter for xxpowlInterfaceSouceCodeLovVO
        public xxpowlInterfaceSouceCodeLovVOImpl getxxpowlInterfaceSouceCodeLovVO() {
            return (xxpowlInterfaceSouceCodeLovVOImpl)findViewObject("xxpowlInterfaceSouceCodeLovVO");
        /**Container's getter for xxpowlRequisitionTypeLovVO
        public xxpowlRequisitionTypeLovVOImpl getxxpowlRequisitionTypeLovVO() {
            return (xxpowlRequisitionTypeLovVOImpl)findViewObject("xxpowlRequisitionTypeLovVO");
        /**Container's getter for xxpowlReferenceNumberLovVO
        public xxpowlReferenceNumberLovVOImpl getxxpowlReferenceNumberLovVO() {
            return (xxpowlReferenceNumberLovVOImpl)findViewObject("xxpowlReferenceNumberLovVO");
        /**Container's getter for xxpowlItemSegment1LovVO
        public xxpowlItemSegment1LovVOImpl getxxpowlItemSegment1LovVO() {
            return (xxpowlItemSegment1LovVOImpl)findViewObject("xxpowlItemSegment1LovVO");
    Search Page Controller
    /*===========================================================================+
    |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
    |                         All rights reserved.                              |
    +===========================================================================+
    |  HISTORY                                                                  |
    +===========================================================================*/
    package powl.oracle.apps.xxpowl.po.requisition.webui;
    import com.sun.java.util.collections.HashMap;
    //import com.sun.java.util.collections.Hashtable;
    import java.util.Hashtable;
    //import java.util.HashMap;
    import java.io.Serializable;
    import javax.servlet.jsp.PageContext;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OADialogPage;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.webui.TransactionUnitHelper;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    * Controller for ...
    public class xxpowlPOReqIntfAllSearchPageCO extends OAControllerImpl
      public static final String RCS_ID="$Header$";
      public static final boolean RCS_ID_RECORDED =
            VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
       * Layout and page setup logic for a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processRequest(pageContext, webBean);
        //Added by Lokesh
          OAApplicationModule am = pageContext.getApplicationModule(webBean);
         if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "updateRecord", false)) {
               am.invokeMethod("rollbackItem");
               TransactionUnitHelper.endTransactionUnit(pageContext, "updateRecord");
       * Procedure to handle form submissions for form elements in
       * a region.
       * @param pageContext the current OA page context
       * @param webBean the web bean corresponding to the region
      public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processFormRequest(pageContext, webBean);
             String userClicked = pageContext.getParameter("event");
             System.out.println("Event from processFormRequest in SearchPageCO :"+userClicked);
           System.out.println("Parametere Names are :- \t" + pageContext.getParameter("UpdateImage"));
           System.out.println("Parametere Names are :- \t" + pageContext.getParameter("event"));
         if (pageContext.getParameter("event") != null &&
             pageContext.getParameter("event").equalsIgnoreCase("Update")) { 
             String ReqTransactionId=(String)pageContext.getParameter("transacitonidParam");
             String errorcolumn=(String)pageContext.getParameter("errorcolumnParam");
             String errormsg=(String)pageContext.getParameter("errormessageParam");
             String readyonly="Y"; //(String)pageContext.getParameter("readonlyParam");
             System.out.println("Requisition Transaction Id  : "+ReqTransactionId);
             System.out.println("Error Column  : "+errorcolumn);
             System.out.println("Error Message  : "+errormsg);
             System.out.println("Read Only  : "+readyonly);
             HashMap params = new HashMap(4);
             params.put("HashmapTransacitonid",ReqTransactionId);
             params.put("HashmapErrorcolumn",errorcolumn);
             params.put("HashmapErrormessage",errormsg);
             params.put("HashmapReadonly",readyonly);
             pageContext.putSessionValue("testValue",ReqTransactionId);
             //System.out.println("Transaction Id passing through HashMap :- \t" + ReqTransactionId);
             pageContext.setForwardURL("OA.jsp?page=/powl/oracle/apps/xxpowl/po/requisition/webui/xxpowlPOReqIntfAllUpdatePG",
                                        null,
                                        OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                        null,
                                        params,
                                        true,
                                        OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
                                        OAWebBeanConstants.IGNORE_MESSAGES) ;   
    else if (pageContext.getParameter("event") != null &&
             pageContext.getParameter("event").equalsIgnoreCase("Delete")) {   
        System.out.println("Inside Delete method in SearchCO");
        String deleteTransactionID=(String)pageContext.getParameter("deleteTransactionIDParam");
        System.out.println("Transaction Id in Delete Method :- \t" + deleteTransactionID);
      //  deleteTransactionID ="";  //Makeing Null because dont want to show the transaction id bec users dont know about it
        //MessageToken[] tokens = { new MessageToken("MESSAGE_NAME", deleteTransactionID) };
        MessageToken[] tokens = { new MessageToken("MESSAGE_NAME", "") };
        OAException mainMessage = new OAException("FND", "FND_MESSAGE_DELETE_WARNING", tokens);
        OADialogPage dialogPage = new OADialogPage(OAException.WARNING,mainMessage, null, "", "");
        String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
        String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
        dialogPage.setOkButtonItemName("DeleteYesButton");
        dialogPage.setOkButtonToPost(true);
        dialogPage.setNoButtonToPost(true);
        dialogPage.setPostToCallingPage(true);
        dialogPage.setOkButtonLabel(yes);
        dialogPage.setNoButtonLabel(no);
        Hashtable formParams = new Hashtable(1);
        formParams.put("transactionIdDeleted", deleteTransactionID);
        dialogPage.setFormP

    Hi friend ,
    In Search page i didn't do any update. and also search page is not a problem it's working fine. create page only the problem. In this page only throwing Stale data error exception.
    Please give me more suggestion.
    Thanks in advance,

Maybe you are looking for