Compare periods and financial years

Hi Experts,
I am trying to figure out how to create a report for which I have sales figues for one quarter compared to another quarter and then have these compared to the previous year?
In other words the report should look like this
                            1st Quarter 2009    |  2nd Quarter 2009    |   % diff    |    1st Quarter 2008     |     2nd Quarter 2008   |  % diff
Item 1                                 
Item 2
Item 3
Hpow would I accomplish this?

This formula will do a 2 month previous balance.  
if {Journal_Entry.Date} < dateserial(year(dateadd('m',-1,{?End Date})), month(dateadd('m',-1,{?End Date})),1) and {Journal_Entry.Date} >= DateSerial(year(dateadd('m',-2,{?End Date})),month(dateadd('m',-2,{?End Date})), 1) then
    if {Journal_Entry.Debit Or Credit} = 'Credit' then
         {Journal_Entry.Amount} * -1;
    else
        {Journal_Entry.Amount};
While this one, is a month balance
if {Journal_Entry.Date} >= DateSerial(year({?End Date}), month({?End Date}), 1) then
    if {Journal_Entry.Debit Or Credit} = 'Credit' then
          {Journal_Entry.Amount} * -1;
    else
        {Journal_Entry.Amount};
This one is year to date
if {Journal_Entry.Date} >= dateserial(year({?End Date}),1,1) then
    if {Journal_Entry.Debit Or Credit} = 'Credit' then
          {Journal_Entry.Amount} * -1;
    else
        {Journal_Entry.Amount};

Similar Messages

  • What is difference in open account period and encumbrance year?

    hello experts,
    I want to open the accounting as well as financial year for 2012-2013. as I am using test application.
    in purchainsing->setup>-accounting->open and close period.
    their are are two terms
    accounting period and encumbrance year.
    what is the meaning of these terms.
    when I am click open next account period , it is opening month wise.
    in my test application period only before 2007 is opened. now I want to open directly 2012-2013 period.
    how to do that.
    also tell me what is accounting inventory period, n what case it is useful?
    thanks
    yash

    http://docs.oracle.com/cd/A60725_05/html/comnls/us/gl/openpe01.htm
    http://www.google.co.in/webhp?source=search_app#hl=en&sclient=psy-ab&q=inventory%20accounting%20periods%20in%20oracle%20apps&oq=&gs_l=&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.43148975,d.bmk&fp=38b5f37b94cc2ba8&biw=1366&bih=667&pf=p&pdl=300

  • Period and Fiscal Year in a report selction screen (3.1 I version of SAP.)

    Hi Team,
    I have a requirement on a Zreport. Suppose if we are executing a report in the month of March (3)-fiscal year 2011 and if I select a variant and the varinat should populate period as Feb (2 period) and fiscal year as last year (2010).
    In Nut shull if i am executing the report todays date the period and fiscal year in the selection screen should be 2 and 2010.
    Also please note that i am working on 3.1 I version of SAP.
    Your inputs are highly appreciated.
    Thank you
    Venkatesh Billa

    Hi,
    Generatlly while saing the variant for the report selection screen you can use the dynamic date calculation , where the last period and last fiscal year options are available.
    Also you can choose the option of calculating the period and fiscal year in your program and can default the same on the selection screen. But I think you should check in ABAP forum for this, whether there anything in coding also.
    Regards,
    Gaurav

  • Comparing period and date

    hi,
    Are period and date , directly comparable.
    that is...i have
    seloption:SO_PERIOD: 02.2005 to 03.2006
    and Ztable like this...
    col1 col2
    xxx 01.01.2005
    yyy 01.02.2005
    yyy 02.01.2005
    yyy 01.03.2006
    will the statement..
    select col1 from ztable where col2 in so_period.....return all values
    pls help.

    Hi Saravanan,
    No, it wont return any values as COL2 and SO_PERIOD are of different types.
    But you can achieve this by collecting the start date and end date of SO_PERIOD into dates and use this range to select against COL2.
    Check this thread which will have same requirement as you needed.
    Re: How to convert the date format from MM/YYYY to MM/DD/YYYY.
    Thanks,
    Vinay

  • FM to find the first & last date of month when we enter period and year

    Hi Gurus,
               I required an urgent need.
               I want a function module which gives me first and the last date of the month when I enter the period and the year.
               Reply me as soon as possible.
    Regards,
    Sagar

    Try this coding...  enter    02/2007 into the selection screen field and execute
    report zrich_0001 .
    data: start_date type sy-datum,
          end_date type sy-datum.
    parameters: p_spbup type spbup.
    start-of-selection.
      start_date = p_spbup.
      start_date+6(2) = '01'.
      call function 'LAST_DAY_OF_MONTHS'
           exporting
                day_in            = start_date
           importing
                last_day_of_month = end_date.
      write:/ start_date, end_date.
    Regards,
    Rich Heilman

  • TVARV - Dynamic Period and Year

    Hi,
    A standard FI report is executed weekly in batch job. The selection screen for the report has the following fields: Period and Year. We need the following:
    1) A report variant that takes the current period and current year
    2) A report variant that takes the previous period and current year
    I know that it is possible to have dynamic dates (Current / date calculations), but is it possible with period and year as well ina  variant?
    What do the variables in TVARV table "SAP_SCMA_PERIOD" and "SAP_SCMA_FISC_YEAR" do?
    Since this is a standard report, what could be the solution?
    Awaiting response.

    Hi Anuritha,
    Did you able to solve this problem. Basically I am also in the same situation, so it would be great help if you suggest me what needs to be done exactely !
    How did you manage the variants SAP_SCMA_FISC_YEAR & SAP_SCMA_PERIOD in TVARV table to work accordengly.
    Looking forward for your reply.
    --Thanks
    Pankaj

  • Problem with Fiscal Period and regarding...

    Hi all,
             I have a particular query in which posting period and fiscal year are the characteristic variables(mandatory and single values) . I have to define  Rolling Year To Date variable/ User exit such that when the user enters posing period and fiscal year query has to fetch previous 12 periods data from the cube..
           If posting period is 005 and fiscal year is 2007 then the output for a particular balance Keyfigure has to be from 005-2007 to 006-2006.
         The thing is we don’t have Fiscal period defined in the cube . One possible solution is Using the Offsets… if we are are goin to offset on the previous 12 periods, is the query going to fetch the correct values….
        Other thing we can think of is user exits… can some one share the logic regarding this... if we have to user the user exits…. Promise to award full points….
    regards,
    sasidhar gunturu

    Sasidhar,
    Since you have posting period and fiscal year separately, you need not think of going for an exit. You can simply use offsets on both so that they will fetch right data. Since there are two separate objects offsets should fetch correct data. Go ahead with offsets.....

  • Convert 0calday to fiscalyear/period and fiscalyear in BI7.

    Hello
    Please can someone tell me the formula to convert calendar day to fiscalyear/period and fiscal year....also can someone give me links to where i can find all the formulas...any documents etc
    thanks

    Hi,
    Please check formula builder there you can find DATE_FISCPER3, DATE_FISCPER and DATE_FISCYEAR formulas which converts date to fiscal year and period.Take a look at them..
    Regards.

  • Error while saving FYV : Gaps in financial year variant periods

    Hello Experts,
    We are getting an error while saving  a new FYV as:
    Gaps in financial year variant periods XY
    Message no. FGV556
    Diagnosis
    The period specification has gaps. The periods must be sequentially numbered without any gaps.
    System Response
    Only a correctly defined period assignment can be saved.
    Procedure
    Define the periods with consecutive numbers.
    Details: The new FYV has 52/53 weeks as posting periods depending on calendar year.
    For example, we are trying to define Fisc 2009 as follows. (Fiscal year 2009 = Nov 01 2008 to Oct 31 2009).
    Month-Day-Period-Yearshift
    11     ---     7     ---     1     ---     +1
    11     ---     14     ---     2     ---     +1
    11     ---     21     ---     3     ---     +1
    11     ---     28     ---     4     ---     +1
    12     ---     5     ---     5     ---     +1
    12     ---     12     ---     6     ---     +1
    12     ---     19     ---     7     ---     +1
    12     ---     26     ---     8     ---     +1
    12     ---     31     ---     9     ---     +1
    1     ---     3     ---     9     ---     0
    1     ---     10     ---     10     ---     0
    1     ---     17     ---     11     ---     0
    1     ---     24     ---     12     ---     0
    1     ---     31     ---     13     ---     0
    2     ---     7     ---     14     ---     0
    2     ---     14     ---     15     ---     0
    2     ---     21     ---     16     ---     0
    2     ---     28     ---     17     ---     0
    3     ---     7     ---     18     ---     0
    3     ---     14     ---     19     ---     0
    3     ---     21     ---     20     ---     0
    3     ---     28     ---     21     ---     0
    4     ---     4     ---     22     ---     0
    4     ---     11     ---     23     ---     0
    4     ---     18     ---     24     ---     0
    4     ---     25     ---     25     ---     0
    4     ---     2     ---     26     ---     0
    5     ---     9     ---     27     ---     0
    5     ---     16     ---     28     ---     0
    5     ---     23     ---     29     ---     0
    5     ---     30     ---     30     ---     0
    6     ---     6     ---     31     ---     0
    6     ---     13     ---     32     ---     0
    6     ---     20     ---     33     ---     0
    6     ---     27     ---     34     ---     0
    7     ---     4     ---     35     ---     0
    7     ---     11     ---     36     ---     0
    7     ---     18     ---     37     ---     0
    7     ---     25     ---     38     ---     0
    8     ---     1     ---     39     ---     0
    8     ---     8     ---     40     ---     0
    8     ---     15     ---     41     ---     0
    8     ---     22     ---     42     ---     0
    8     ---     29     ---     43     ---     0
    9     ---     5     ---     44     ---     0
    9     ---     12     ---     45     ---     0
    9     ---     19     ---     46     ---     0
    9     ---     26     ---     47     ---     0
    10     ---     3     ---     48     ---     0
    10     ---     10     ---     49     ---     0
    10     ---     17     ---     50     ---     0
    10     ---     24     ---     51     ---     0
    10     ---     31     ---     52     ---     0
    The above entries cover all the dates in calendar year 2009, that is, Jan 2009 to Oct 2009  is covered by periods 10 to 52 and Nov 01 2009 to Dec 31 2009 is covered by period 1 to 9 of the following fiscal year 2010.
    Inspite of making sure that all the days of 2009 are covered by periods 1 to 52. We are still unable to save the FYV.
    Please help!
    Susan

    Hello, I am getting this error while saving the FSV. My FSV is based on Weeks. Below is what I am inputting for this. Other details are Calender Year -  2017, No. of posting periods - 53, checked year dependent. Also, I have FSV for previous years also where weeks are 52 but configured as 53. So, hope that this is not creating this issue. Solicit your early response.
    Month
    Day
    Period
    Year Shift
    1
    7
    1
    0
    1
    14
    2
    0
    1
    21
    3
    0
    1
    28
    4
    0
    2
    4
    5
    0
    2
    11
    6
    0
    2
    18
    7
    0
    2
    25
    8
    0
    3
    4
    9
    0
    3
    11
    10
    0
    3
    18
    11
    0
    3
    25
    12
    0
    4
    1
    13
    0
    4
    8
    14
    0
    4
    15
    15
    0
    4
    22
    16
    0
    4
    29
    17
    0
    5
    6
    18
    0
    5
    13
    19
    0
    5
    20
    20
    0
    5
    27
    21
    0
    6
    3
    22
    0
    6
    10
    23
    0
    6
    17
    24
    0
    6
    24
    25
    0
    7
    1
    26
    0
    7
    8
    27
    0
    7
    15
    28
    0
    7
    22
    29
    0
    7
    29
    30
    0
    8
    5
    31
    0
    8
    12
    32
    0
    8
    19
    33
    0
    8
    26
    34
    0
    9
    2
    35
    0
    9
    9
    36
    0
    9
    16
    37
    0
    9
    23
    38
    0
    9
    30
    39
    0
    10
    7
    40
    0
    10
    14
    41
    0
    10
    21
    42
    0
    10
    28
    43
    0
    11
    4
    44
    0
    11
    11
    45
    0
    11
    18
    46
    0
    11
    25
    47
    0
    12
    2
    48
    0
    12
    9
    49
    0
    12
    16
    50
    0
    12
    23
    51
    0
    12
    30
    52
    0
    12
    31
    1
    +1
    Thanks
    Deepankar

  • Customer Exit Variable Period 000 is not valid in financial year variant Z2

    Hi all,
    I am trying to get the week number from a particular posting period. But I get this error when I execute the Query:
    Error Group
    RFC_ERROR_SYSTEM_FAILURE
    Message
    SYST: Period 000 is not valid in financial year variant Z2
    I checked in "FIRST_DAY_IN_PERIOD_GET" FM and it is not accpting period 000 for PERIV Z2. It works fine for all other periods.
    Does anyone have an idea on this?
    Thanks.

    Simon,
    So do you think that there is a problem in my Query restrictions? You ask me to restrict from 0 - 12, but this period is calculated based on the SY_DATUM in a cust. exit variable. And this period is being used to pull week number. So, do I need to change the code?
    But I already have another query which is similar to this, only ready for input options are missing in the new one. The older one is working fine but the I have problem with this.
    Any more ideas?
    Thanks!!

  • FGV003 - SYST: Period 000 is not valid in financial year variant K4

    Hello,
    I am getting the error below when trying to bring Period 000/2008 from our BCS cube into a basic cube.  I've run the "Transfer Global Settings" for our R/3 system but am still getting this error.  The BCS does have Period 000 Yr 2008 with FYV K4 and is showing in the master data for fiscal period.  Any ideas??
    SYST: Period 000 is not valid in financial year variant K4
    Thanks,
    Senthil

    Dear colleagues:
    The same problem is appearing to me. I am trying to run a job in background but the following error appears to me>
    SYST: Period 000 is not valid in financial year variant 36
    Do you know what I have to do to suprime the error?
    The job I am trying to run is for creating an evaluation in order to run the report S ALR 87012167
    Your Sincerely
    Leonardo López
    FI Consultant

  • SYST Period 012 is not valid in financial year variant R2 Msg no;FGV003

    Hi SAP Gurus,
    I have encountered with an error as following :
    SYST: Period 012 is not valid in financial year variant R2
    Message no. FGV003
    Our client following calendar year till December 2009.  They want to change to April to March , from April 2010 . So we need to define a shortened fiscal year for January to March 2010 for 3 months.
    One important thing is Depreciation should be calculated only for 3 months ie., from January 2010 to March 2010 for year 2010. For year 2011 u2013 April 2010 to March 2011 be calculated.
    I have done the following settings :
    Current fiscal year variant = K4, i.e. the standard variant with 12 periods (calendar year)
    -the current fiscal year must be closed on 31.12.2009
    -this change have to be done in the next month, i.e. on 01.01.2010
    -on 1.1..2010 starts the new fiscal year 2010
    -the fiscal year 2010 ends on 31.03.2010 and have 3 posting periods
    1) Create a new Fiscal Year Variant for the shortened fiscal year u2013 e.g. "R2" (OB29).
    2) R2 to be made Year Dependent. Current Period Configuration
    Month Days Period Year Shift
    1 31 1 0      
    2 28 2 0
    3 31 3 0
    4 30 4 0
    5 31 5 0
    6 30 6 0
    7 31 7 0
    8 31 8 0
    9 30 9 0
    10 31 1 +1
    11 30 2 +1
    12 31 3 +1
    3) Company Code assignment (OB37): K4 to be replaced with R2 .
    4) Controlling Area (OKKP): K4 to be replaced with R2.
    5) Fiscal Year to be shortened for Depreciation Areas in Asset Accounting customization (OAYP).
    6) Table T093C to be viewed to check whether the field XRUMPF (Shortened Fiscal Year) has been activated with u201CXu201D..(SE 11 Check Table) Done manually
    Other Problem : 1. The system calculates deprecation for period 3 ( Full year deprecation) as seen from AW01n for one asset.
    2. When I run AFAB for 2010 period 1 the error is displayed
    SYST: Period 012 is not valid in financial year variant R2
    Message no. FGV003
    Please anybody help me in this issue .
    Subbu

    Have you maintained the Year Shift Properly in OB29
    For e.g if Financial Year is from July to June, year shift will be as follows:
    Month      Days        Period       Year Shift
    1     31     7     0
    2     29     8     0
    3     31     9     0
    4     30     10     0
    5     31     11     0
    6     30     12     0
    7     31     1     +1
    8     31     2     +1
    9     30     3     +1
    10     31     4     +1
    11     30     5     +1
    12     31     6     +1
    Check also FI period and aseet periods are open through OB52 and AJAB

  • SYST: Period 012 is not valid in financial year variant V3 Message no. FGV0

    Hi!
    While I am going to create Asset it is giving me following error :
    SYST: Period 012 is not valid in financial year variant V3
    Message no. FGV003
    I checked in OB29, I have maintained 12 period,
    can you please tell me what will be the problem.
    Rakesh

    Have you maintained the Year Shift Properly in OB29
    For e.g if Financial Year is from July to June, year shift will be as follows:
    Month      Days        Period       Year Shift
    1     31     7     0
    2     29     8     0
    3     31     9     0
    4     30     10     0
    5     31     11     0
    6     30     12     0
    7     31     1     +1
    8     31     2     +1
    9     30     3     +1
    10     31     4     +1
    11     30     5     +1
    12     31     6     +1
    Check also FI period and aseet periods are open through OB52 and AJAB

  • "SYST: Period 012 is not valid in financial year variant Z4"

    Hi
    Iam getting this error  "SYST: Period 012 is not valid in financial year variant Z4"
    in Asset accounting  when using the shortend fiscal yr with 9 periods in 2010.
    Generated the period control OA84 for this variant Z4  but still getting the error.
    Please advise.
    Thanks in advance

    Srini,
    Our FY is Apr 2 march.
    For 2010 , i put below and in shortend fiscal yr tab i put 9. still having this error.
    1     31     10     -1
    2     28     11     -1
    3     31     12     -1
    4     30     1     0
    5     31     2     0
    6     30     3     0
    7     31     4     0
    8     31     5     0
    9     30     6     0
    10     31     7     0
    11     30     8     0
    12     31     9     0
    Please help
    Thanks,
    Heera

  • BEX Error: SYST: Period 053 is not valid in financial year variant M2

    Hi All,
    We have a merchandising report which bring the data for current year and previous year. While I execute the data for Fiscal Year/Period - 011.2011, I get the output. But when I execute the report for Fiscal Year/Period - 012.2011, I receive the below error.
    SYST: Period 053 is not valid in financial year variant M2
    We have variants M4 and M2.
    M4 is month wise where are M2 is weekly.
    In table T009B, we have a record for week 053 for year 2011 whereas we don't have a record for week 053 in year 2010. This is obvious as there are only 52 weeks in 2010 but 53 in 2011.
    I'm not able to track the exact reason for this error.

    Hi All,
    Thanks for the reply.
    I have tried maintaining entry for week 053 against year 2010 in T009B but this didn't work. I checked the 'Check Table' button for any dependencies and I saw T009 table.
    I maintained the entry as below in T009 table and it worked. Can someone explain how this work?
    Earlier entry for which I received the error:
    Fi.Year Variant    Year-dependent     Posting period    Special        Periods Description
    M2                            X                      052                     00              Retail Calendar Weekly
    Changed entry for which the error stopped appearing
    Fi.Year Variant    Year-dependent     Posting period    Special        Periods Description
    M2                            X                      053                     00              Retail Calendar Weekly
    Please help me understand so that if I transport the entry to Production, I don't face any serious issues.
    Regards,
    Murthy

Maybe you are looking for