Skip to Content
author's profile photo Former Member
Former Member

Current year /last year in reports

I need to report summarised data for range of periods and I need to compare the current year results with last year.

For example I need to report Jan to June of current year and compare in the same reports the results of last year.

How to select the last year? I tried with offset (year-1) but it does not work.

Since I am giving the range of period( 1 to 6) in selection the period , hence the offset does not populate.

Sure mark for helpful answers.

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    Posted on Jan 10, 2008 at 10:20 AM

    Mani,

    as with your other topic in the BCS forum, there are ways to use the offset for this, but it all depends what variables you use for the period/year derivation. It also depends if you are using BCS and need the YTD values.

    so, here are a couple of options:

    if you are using the fiscal year/period variable, then you will be restricted by what your FY variant is. (thus the value of your offset). I think even if you use K4, taking -12 from your value will get you to the same period prior year.

    as with other recommendations here in the forum, you can offset just the year variable if your are using two separate ones (one for posting period one for fiscal year). As BCS doesn't have the cumulative KF's, this is pretty much the only option that you have if you need to get the YTD values (since you need period 00 for the YTD values in the BS)

    You mentioned that the offsets don't work for you - double check that by using the text variables in the column headers, and you should see what data is being pulled in there. Also, make sure that you are restricting the variables (fiscal year) on each column. If you put the restriction on the entire query, it will only give you one value, so instead you need to put the fiscal year variable in each column (with appropriate offsets)

    let us know if that worked

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2008 at 12:49 AM

    Can you add another key figure that's restricted by period 12, Fiscal Year (Current Year -1)?

    If you hard code the key figures, you have more flexibility, but more maintenance if there's a change.

    Good Luck!

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 10, 2008 at 01:01 AM

    Create a Customer Exit variable with interval which populates the low and high value from the variable that the user enters . Make some modifications in SMOD code so that it populates the last year but the day and month are the same

    Now restrict the Key fiure by creating selection with the variable used for user entry. this will give the output for the Current year.

    Again Restrict the Key Fig with the Customer Eit variable. this will give you the output for the last year.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 10, 2008 at 01:21 AM

    Hi mani,

    You can just create a variable for year which is of type exit and which consists of one year less than the current year.

    In report use the two variables ... sap variable that gives you the current year value and another variable as per the above step to give you last year value....and use it in your restrictions....

    This will work as an alternative to offset...

    Hope it helps,

    Ajay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2008 at 08:28 AM

    Hi,

    do not use the offset on CALYEAR ( -1)...

    but use the offset (-12) for the periode... even if it's a range of periode it will work.

    So if you enter 001.2006 - 006.2006 your variable with offset will be 001.2005 - 006.2005.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.