Date parameters for the previous fiscal quarter?

Hello Folks,
I have this requirement of selecting the dates for the previous fiscal quarter. usually a fiscal quarter is January 2011 - March 2011. But in my case the fiscal year should be December 2010 to February 2011 and if i check in june 2011 it should return Mar 2011 till May 2011 and so forth. So how can i acheive to be able to select these dates i.e 12/1/2010 till 02/28/2011 in the where clause for the current date?
create table test_A (id int, col varchar(50),change_date date);
insert into test_A values(1, 'A',to_date('20101201 000000', 'YYYYMMDD HH24MISS'));
insert into test_A values(2, 'A1',to_date('20110122 000000', 'YYYYMMDD HH24MISS'));
insert into test_A values(3, 'A1',to_date('20110202 000000', 'YYYYMMDD HH24MISS'));
insert into test_A values(5, 'A1',to_date('20110306 000000', 'YYYYMMDD HH24MISS'));
insert into test_A values(6, 'A1',to_date('20110305 000000', 'YYYYMMDD HH24MISS'));
insert into test_A values(7, 'A1',to_date('20110307 000000', 'YYYYMMDD HH24MISS'));
select * from test_A
1     1     A     12/1/2010
2     2     A1     1/22/2011
3     3     A1     2/2/2011
4     5     A1     3/6/2011
5     6     A1     3/5/2011
6     7     A1     3/7/2011
I only want to see the following
1     1     A     12/1/2010
2     2     A1     1/22/2011
3     3     A1     2/2/2011

select  *
  from  test_A
  where change_date >= add_months(trunc(sysdate,'Q'),-1)
    and change_date <  add_months(trunc(sysdate,'Q'),2)
        ID COL                                                CHANGE_DATE
         1 A                                                  20101201 000000
         2 A1                                                 20110122 000000
         3 A1                                                 20110202 000000
3 rows selected.
SQL> SY.

Similar Messages

  • ABST2 - How to take the report for the previous fiscal year

    Hi,
    For FI-AA reconciliation, my scenario is this: The current fiscal year is 2009 and the system (server) date is 16-Apr-2009. My fiscal year period is: Mar-Apr. In ABST2, it does not accept Fiscal year. When I take the report, it displays for fiscal year 2009, which I don't want because I want it for the fiscal year 2008 to reconcile between FI and AA. The fiscal year 2008 is not yet closed in both FI and AA, so I want the report for 2008 only. But ABST2 always gives the report for the current fiscl year. Is there any way out to get the report for 2008?.
    Thanks,
    Kannan S

    This report is based on the actual values. In the past this report was used for EURO conversions to see if the values are in line. When not it was not possible to do the euro conversion.
    Normal it is a part from the fiscal year closing

  • Posting Depreciation for the previous months

    HI Experts,
    We got new asset  AS100SA  capitalized on 28.02.2013 (Fiscal Year Period 4  2014 )  and we want to start depreciation  this  asset
    start from  Feb 2014 (Fiscal Year Period 4 2014),
    We have run the  depreciation  for all asset in current Month ( Period 5 2014) , when we try run the  depreciation for new asset  AS100SA
    for the previous months in the Current Period , system prompt error msg : "Period  4 is already posted".
    Asset Master Data
          when I view the posted values Tab in the Asset Explorer (AW01N), system is showing the planned values beginning period 5 (Fiscal Year =  March 2014)  
           AFAB - Depreciation Run
           Period 4 (Previous Month for new asset)
          Error Message 
             kindly advise on this issue. thanks in advance.

    Hi Ginee,
    Radio button planned posting run can only be choose once per period and when you choose planned posting run you should not specify your asset number.
    As for your case, you can run the depreciation (AFAB) by choosing the repeat button (specify your asset number) since you already done the planned posting run for period 4 and after the depreciation posted you can check the posted value tab in AW01N again, system will show the posted value in period 4.
    Ex : asset acquisition : 01.01.2014, in AW01N it start with period 2 but the depreciation start from period 1.
    run AFAB with this parameter
    AW01N after AFAB
    Regards,
    Lelyana

  • Giving error while creating a sales contact for the previous year (2008)

    Hi Friends,
    We are currently with SP12. When we try to create a sales contract for the previous year it is giving error like "Schedule line is for the item 100 cannot be after the order's latest delivery date".
    i tried debugging and found that that there is a rule created for this (in SP12). I commented the rule and tried to create a contract but, again got an error "Error while saving". This error I can't catch while debugging.
    I even didn't find where the schedule line date and header cancel dates are set so that I can change the dates manually.
    If any one has any idea, kindly help me.
    Best regards,
    Swarna Seeta

    Hi Wolfhard,
    Thanks for the reply.
    You are right and I have uncommented the line which assigns true to the return value and the contract got saved now.
    Thank you so much.
    I just want to know whether commeting this rule effects any of the functionalities of the sales contract.
    Best regards,
    Swarna Seeta

  • To get time-booking entered thru CATW,CAT2 for the previous week

    Hi Experts,
    I need to analyze the absences booked by an emolyee. I have obtained the time-booking for the present week from the user-exit where I am writing the code. But I have to check the booking of the previous friday (previous week) to check if the same absence is taken on Monday (current week). Thus I have to check the booking made by the employee on friday previous week. How can I get the time booking data for the previous week?
    Do we have any Fm to get that?
    Thanks
    Akash

    BAPI_ABSENCE_GETDETAIL         Read absence
    BAPI_ABSENCE_GETDETAILEDLIST   Read instances with data
    BAPI_ABSENCE_GETLIST           Read instances
    But you need for CATSDb ie for CATS
    use standard trans code cats_da ie rcats_report_activities
    also we have bapis
    BAPI_CATIMESHEETMGR_CHANGE     CATS: Change data records
    BAPI_CATIMESHEETMGR_DELETE     CATS: Delete Data Records
    BAPI_CATIMESHEETMGR_INSERT     CATS: Insert data records

  • FM to get the previous fiscal month

    Hi All,
    is ther any function module to calculate the previous fiscal month from the sy-datum.
    Tnhanks in Advanc
    Moderator message: date calculation questions = FAQ, please search before posting.
    locked by: Thomas Zloch on Sep 29, 2010 2:28 PM

    Hi,
    Use the FM: RP_CALC_DATE_IN_INTERVAL
    DATA:date1 TYPE sy-datum.
    START-OF-SELECTION.
      CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
        EXPORTING
          date      = sy-datum
          days      = '00'
          months    = '04'
          signum    = '-'
          years     = '00'
        IMPORTING
          calc_date = date1.
      WRITE date1.

  • Depreciation of the Previous Fiscal Year want to post in Current FiscalYear

    I have already posted Depreciation for the year 2008 by using Planned Posting Run (T.code:AFAB)
    After that I have created one Asset Master (T.code: AS01)
    In AS01, Depreciation tab , I have set Depreciation starts from 19.09.2007, i.e. Fiscal year: 2007
    I have capitalised this asset as on 31.03.2008, i.e. Fiscal Year :2008
    Now I want to post Depreciation for the period  19.09.2007 to 31.03.2009 (560 Days) on 31.03.2009.
    When I am running AFAB  (Repeat Run) Fiscal year: 2008 & Period: 12  with this Specific Asset No, then system is calculating Depreciation only for 1 day, i.e. 31.03.2009
      As the Fiscal year:2007 has been closed for Asset module, hence I have opened Fiscal year: 2007 in AA (T.code: OAAQ)
    But after opening the Fiscal year :2007 also, system is  calculating Dep only for one day.
    Please suggest me how will I solve this issue
    Thanks & Regards,
    Suvadip Mukherji

    >
    Amitava Bhattacharyya wrote:
    > Hi,
    >
    > Plz suggest whether the last period of the previous fiscal year can be opened in MM to allow backposting. If it's possible then how?
    >
    >
    >
    > Amitava
    Please check these answered links:
    MMPI
    Opening the Closed Periods using MMPI
    Edited by: Afshad Irani on Jun 15, 2010 3:45 PM

  • [svn:osmf:] 15581: Better coding style and some comments for the previous code submission.

    Revision: 15581
    Revision: 15581
    Author:   [email protected]
    Date:     2010-04-19 17:14:00 -0700 (Mon, 19 Apr 2010)
    Log Message:
    Better coding style and some comments for the previous code submission.
    Modified Paths:
        osmf/trunk/apps/samples/framework/OSMFPlayer/src/OSMFPlayer.as

    Revision: 15581
    Revision: 15581
    Author:   [email protected]
    Date:     2010-04-19 17:14:00 -0700 (Mon, 19 Apr 2010)
    Log Message:
    Better coding style and some comments for the previous code submission.
    Modified Paths:
        osmf/trunk/apps/samples/framework/OSMFPlayer/src/OSMFPlayer.as

  • Negative stocks for the previous period when closed MM period

    hi,
    I try to use MMPV to close MM period, error message is displayed "
    Some materials have negative stocks for the previous period."
    how to solve this problem and what cause this message? why system allow negative stock?
    thanks

    Hi
    Negative stock means that for a material in your  plant stock is 0 on current posting date but you still want to  issue the material.
    So  in order to achieve this u need to activate the Negative stock for that material in material master and mark the setting of negative stock for the storage location.
    Using the Transaction OLMB ---Goods Receipt
    If you need further information
    Refer this link
    http://help.sap.com/saphelp_erp2004/helpdata/en/a5/63313343a211d189410000e829fbbd/frameset.htm
    rgds
    Chidanand

  • Opening activities for the ne Fiscal Year

    Dear All
    what are the activities that are required to carry out for opening the New Fiscal Year..
    Thanks  & Regards
    Veena Kunthe

    Hello
    The new fiscal year is automatically opened when you make your first posting in the new fiscal year or once the balance carried forward program has been run. You do not have to close the old fiscal year before you can post data in the new one. You therefore do not need to create closing or opening financial statements.
    The prerequisites for posting to a new fiscal year are as follows:
    If you are using a fiscal year variant which is year-specific, you first have to create a variant for this fiscal year and assign it to the relevant company code. See Fiscal Year and Calendar Year
    If you have also defined year-dependent document number assignment, you must have already set up the document number ranges for the new fiscal year. For more information, see  Document Number Assignment
    The relevant posting periods must be open in the new fiscal year. See Opening and Closing Posting Periods
    Check this link for more documentation on carry forwarding balances
    http://help.sap.com/erp2005_ehp_02/helpdata/en/96/8b307143ce11d189ee0000e81ddfac/frameset.htm
    Reg
    assign points if useful

  • SSRS 2008 Column Chart with Calculated Series (moving average) "formula error - there are not enough data points for the period" error

    I have a simple column chart grouping on 1 value on the category axis.  For simplicity's sake, we are plotting $ amounts grouping by Month on the category axis.  I right click on the data series and choose "Add calculated series...".  I choose moving average.  I want to move the average over at least 2 periods.
    When I run the report, I get the error "Formula error - there are not enough data points for the period".  The way the report is, I never have a guaranteed number of categories (there could be one or there could be 5).  When there is 2 or more, the chart renders fine, however, when there is only 1 value, instead of suppressing the moving average line, I get that error and the chart shows nothing.
    I don't think this is entirely acceptable for our end users.  At a minimum, I would think the moving average line would be suppressed instead of hiding the entire chart.  Does anyone know of any workarounds or do I have to enter another ms. connect bug/design consideration.
    Thank you,
    Dan

    I was having the same error while trying to plot a moving average across 7 days. The work around I found was rather simple.
    If you right click your report in the solution explorer and select "View Code" it will give you the underlying XML of the report. Find the entry for the value of your calculated series and enter a formula to dynamically create your periods.
    <ChartFormulaParameter Name="Period">
                      <Value>=IIf(Count(Fields!Calls.Value) >= 7 ,7, (Count(Fields!Calls.Value)))</Value>
    </ChartFormulaParameter>
    What I'm doing here is getting the row count of records returned in the chart. If the returned rows are greater than or equal to 7 (The amount of days I want the average) it will set the points to 7. If not, it will set the number to the amount of returned rows. So far this has worked great. I'm probably going to add more code to handle no records returned although in my case that shouldn't happen but, you never know.
    A side note:
    If you open the calculated series properties in the designer, you will notice the number of periods is set to "0". If you change this it will overwrite your custom formula in the XML.

  • Error " Data missing for the entry check while creating a new waste code

    Hi all, While setting a new Waste code I get the error " Data missing for the entry check, correction:". while filling the NAM- WASTECOCAT - LER item.
    This sould look for the catalog's name included in the phrase set but for some reason it doesn't find it giving me this error.
    I am changing original Characteristics, phrase set, classes, and value assignment type. Just to have my own estructure with Znames for all of them.
    I have also change the enviroment parameter "WAM_PHRSET_WACATLG" with the name of my phrase set.
    I have checked everything several times watching for typos or looking for a missing step.
    I have even tried including my new Z's characteristics in the classe and living the original SAP_EHS_1024_001_WASTE_CATALOG. (changing the enviroment parameter WAM_PHRSET_WACATLG to SAP_EHS_1024_001_WASTE_CATALOG) and it works.
    I will like to change this characteristic by Z_EHS_WA_WASTE_CATALOG
    Phrase set to Z_EHS_WA_WASTE_CATALOG.
    enviroment parameter WAM_PHRSET_WACATLG= Z_EHS_WA_WASTE_CATALOG
    After matching up the master data It should work fine but I might be missing something to get it running ok.
    ¿Any idea?
    Regards,
    Alvaro

    Hello Juan Carlos, the value and class that I want to duplicate and doesn't work is for Waste Code, I have also duplicated the one you have displayed (waste pproperties) without any problem.
    1.I have duplicated and changed class SAP_EHS_1024_001. to Z_EHS_WA
    2. Create a copy of the 5 characteristics included in this class.
    SAP_EHS_1024_001_WASTE_CATALOG
    SAP_EHS_1024_001_WASTE_CODE
    SAP_EHS_1024_001_WA_SUBCATEG
    SAP_EHS_1024_001_WA_CATEGORY
    SAP_EHS_1024_001_REMARK
    change the name by
    Z_EHS_WA_WASTE_CATALOG
    Z_EHS_WA_WASTE_CODE
    Z_EHS_WA_SUBCATEG
    Z_EHS_WA_CATEGORY
    Z_EHS_WA_REMARK.
    I checked the funcion C14K_WASTECATLG_CHECK is in the value of the Z_EHS_WA_WASTE_CODE characteristic
    I checked the funcion C14K_WASTECODE_CHECK is in the value of the Z_EHS_WA_WASTE_CATALOG characteristic
    3. Create phrase sets for each new category. with same name.
    4. Match up the master data.
    5. Change the enviroment parameter.to Z_EHS_WA_WASTE_CATALOG
    I think I have followed all the steps, but for some reason it doesn't find the catalog
    The phrase for the catalog is EWC in english and LER in spanish.
    Regards
    Alvaro.

  • My ipod has had a previous owner How do I change my ipods email address so that when I try to down load anything it asks for the previous owners password but when I go to my account it says its my email my account but not when I try to download????

    My ipod has had a previous owner How do I change my ipods email address so that when I try to down load anything it asks for the previous owners password but when I go to my account it says its my email my account but not when I try to download can anyone please help me ????Plus it still has some of the previous owners pictures and videos on it that I want to delete and can't????? Also is there a way to kill the apps that u have used throughout the day the battery doesn't last long at all ??????

    - How did you dlete stuff from the iPod? If you have a 1G or 2G iPod and deleted the stuff by going to Settings>Genera.>Reset>Erase aall contents and settings without being connected to a power source, the battery dies before he erase was comleted since it can take hour.
    - In any event try the following:
    - Connect to a chaging sour for three hours.
    - Reset the iPod and then connect to the computer and try to restore va iTunes.
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Next try placing the iPod in recovery moe and then try to restore. For recovery mode:
    iPhone and iPod touch: Unable to update or restore
    - Last try DFU made and restore.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • When I go to update my software using the app store download, it always asks for the previous user's ID, not mine.  Please help!

    When I go to update my software using the app store download, it always asks for the previous user's ID, not mine (my IT guy at school's-I am a faculty with admin priviledges).  I have signed in as me, have set the main preferences login user as me,and everywhere on the laptop I can use my apple ID except here.  It always shows me a greyed out ID of my IT.  How can I reset this to my ID? It doesn't give me an option to change the user ID, only a link to reset password.  I reset it, but it did not change the problem.  Can someone help me?

    It's not an ID problem, it's an ownership problem.
    When someone uses their personal Apple ID to buy and download content, the content is licensed to them and has their Apple ID engrained in it's DNA. It is an anti-piracy program. And when that personal Apple ID is used to setup a new Mac, it involves the Mac itself, the shipping OS and any pre-installed apps as well.
    It's not the correct way to handle Macs that belong to a business or an institution. And had it been handled correctly they would not now be in this predictument needing a drastic remedy.

  • Variance of Wagetype amounts  Report  for the previous and prest months

    Hi experts,
    our clients are wish to have the report of  Variance of Wagetypes for the Previous and Present months.
    we require the report on  new wagetypes included in the Current month along with amount and also any wagetypes deleted for the current month along with amount.We also need to have the Difference between previous gross amount and current months Gross.
    Is it possible to have the report on variation of amounts.
    Regards,
    V Sai.

    Hi,
    The quickest way is to use wage type reporter (transaction PC00_M99_CWTR, report H99CWTR0_CE).
    There you can specify two payroll periods and compare values by wage types, if necessary export result in Excel and do whatever you want.
    Cheers

Maybe you are looking for

  • Function modules or BAPI for deleting plan costs on a cost center

    Hi all, I search for a function module or bapi to delete plan costs / activity on a cost center. At the moment I update the planning with 0, but that cause a mass of needles entries on the cost centers. For check and posting I use the function group

  • Error provisioning a date with DBATconnector

    hi, in the configuration of DBAT connector there is a field called: Target Date Format . in the table the format date is DD-MMM-RR . so in the Target Date Format i put the format dd-MMM-yy and whe i try to provision this is the error: [2012-09-07T13:

  • ColorFX hard crashing Color after 1.0.1 update

    I'm not sure if this is a Decklink issue, or if it's a Color issue, but in any case, since upgrading to 1.0.1, Every time I add a ColorFX node to one of my projects, Color will hard crash instantly. Desktop Video Out has been disabled in my Decklink

  • I am unable to fill in info on a fillable PDF

    I am unable to fill in info on a fillable PDF form. Do i need to down load anything???

  • Tab Control Question

    Dear Sir If I have a control in the front panel of one page in tab control and I want to add the same control in another page in tab control to use it. How can I do that ?? I'm waiting your reply