Offset Variables

Hi
I have a doubt and need to know if the offset functionality (replacement path) for variables (start and length) could be used?
I have the following business requirement:
There are two selection variables on the initial selection screen for a report. The first selection variable is planning year and the second selection variable is fiscal year. The values that can be shown in fiscal year variable dropdown depends on the value selected for plan year by the user.
For example, if the user selects 2007 for the plan year variable then the drop down for fiscal year should show only five years from 2007 i.e. 2007,2008,2009,2010,2011.
If the user selects plan year = 2010 then fiscal year dropdown should show only values from 2010 to 2014 i.e. 5 years from 2010.
Can offset functionality on variables (found in replacement path option) be used in this situation? I am doing the following things:
<b>Variable name for plan year:</b> ZPLANYR
<b>Variable name for Fiscal Year:</b> ZFISCYR
When creating the variable ZFISCYR I define the following properties for the variable:
<b>Processing by:</b> Replacement path
<b>Replace Variable from variable:</b> ZPLANYR
<b>Replace varibale with:</b> Key
<b>Offet:</b> 0 (so that it starts with the same year as plan year)
<b>Length:</b> 5 (and this would give the required 5 years from plan year)
<b>I have the option "Use for Intervals" <u>disabled</u>.</b>
Please comment.
Thanks,
Ameya Kulkarni

Reposting the question for any suggestions.
Thanks,
Ameya Kulkarni

Similar Messages

  • Offset variable to restrict by last 4 quarters on multiprovider (0FIAR_O03)

    I have a requirement where I have to show debit/credit amount for last four quarters. The data granularity is at doc date, posting date level. The time chars in the multiprovider (built on 0FIAR_O03 and 0FIAR_O06) are fiscal year, fiscal year variant, fiscla year/period.
    I plan to use offset variables to get the four quarters data, but I do not know what time char I should use to restrict the debit/credit amount on to get the quarters data. With the available time chars is it possible to do this?
    Any help is greatly appreciated.
    Thanks,
    Vijayini

    Hi,
    Create a Structure in the Columns area.
    Create a new selection(one for each quarter) with the following.
    1. Debit/Credit Amount
    2. Fiscal period/yr - restrict on customer exit variable which returns the last quarter.
    Create the second selection with the following.
    1. Debit/Credit Amount
    2. Fiscal period/yr - restrict on customer exit variable which returns the last quarter and set offset value as -1.
    Repeat the same for other quarters. Hope this helps.
    Regards,
    Suzitha.

  • Offset variable

    Hi everybody,
    Can anyone tell about how to create offset variable for sales (steps)?
    Thanks,
    Swetha

    Hi,
    you can achieve this by 0Calmonth info object... but if you want to create variable with offset then steps are:-
    -->Right click on Key Fig.
    >Edit>Drag Date Info object
    -->Right Click on that and Restrict
    -->in Show Select Variable
    -->Click on Create New Variable
    -->Enter Tech name and Description
    -->in Details, select Single and mandatory
    -->Select Value Ranges in stead of Variable
    -->Select that variable in as lower and upper limit
    >transfer it (>)
    -->right click on that and select Set Offset  for Variable
    -->it will prompt two time one for lower and another upper.
    Best Regards
    Obaid

  • Year Change by the offset variable

    Hi,
    I'm using a offset variable, does the offset variable take care of the year change. For example if have a calweek 200804 and if i use a variable offset of -10, does the offset take care of the calweeks in 2007.
    Thank You!
    AM

    Hi Mayank,
    Thank You for the reply. I haven't yet executed the query. I will post once i execute the query.
    Thank You!
    AM

  • Variable offset for date - a year ago

    I have this sales report with the following columns:
    1. Current Day Sales
    2. Month to Date Sales (this Year)
    3. Month to Date Sales (last Year)
    I'm using a range variable for 0CALDAY for column 2 (Month to Date Sales this year).  i'm having problem with column 3.  how is it possible such that the date is automatically assigned to last year's values?  using offset would mean -365, however, this may not work during leap years?
    please help

    Hi,
    Refer the 'Examples for using Variables' in 'Bex Query designer' of sap help..
    Examples for Offset Variables
    You want to use a query to carry out a comparison of two years.
    Year Comparison
    You want to compare the costs of a year of your choice with the costs of the previous year.
           1.      In the Query Designer, create a new structure and add a new Selection for each year that you require.
           2.      Only use one key figure (for example revenue) in this example query. Add this key figure to the filter or add it to the selection.
           3.      Use a characteristic value variable for the characteristic Calendar Year (0CALYEAR):
    Select the characteristic value variables for Calendar Year and, from the context menu (right mouse click), choose New Variables. The Variables Wizard appears.
    If you always want to reference to the current year automatically, use the SAP Exit variable 0CALYEAR (or as appropriate for another time characteristic).
           4.      Move the defined characteristic value variable into the selection.
           5.      Select the characteristic value variable and from the context menu (right mouse click), choose Restrict.
                                a.      Select the characteristic value variable and from the context menu, choose Enter Variable Offsets.
                                b.      Enter –1 as the offset and choose OK.
           6.      Choose OK.
           7.      Enter a description.
    Example: Use the name of the key figure, for example, revenue, for the name and use a text variable for the name of the calendar year. See Using Text Variables.
    When creating a new text variable, enter Replacement Path as the processing type, and choose calendar year 0CALYEAR as the characteristic with display as key.
           8.      Create a second selection with the same characteristic value variable and do not set an offset here.
    Also use a text variable in the description in this case.
           9.      Move the required characteristic into the rows.
       10.      Save the query.
    After execution, the query should appear as follows:
    Variable screen entry: 2002 (or no entry when using the SAP Exit Variable).
    Year Comparison
    A characteristic
    Revenue 2001
    Revenue 2002
    Value 1
    100.000
      90.000
    Value 2
    200.000
    180.000
    Value 3
    300.000
    400.000
    Comparison with Cumulative Previous Year Period
    For example: You want to compare the periods 1-8 of a particular year with the same periods for the previous year.
           1.      Create a new structure in the Query Designer and add a new Selection.
           2.      Move a key figure, for example, Revenue, into the selection.
           3.      Use a characteristic value variable for the characteristic Fiscal Year/Period (0FISCPER):
    Select the characteristic value variables for Fiscal Year/Period and from the context menu, choose New Variable. The Variables Wizard appears.
    Use the SAP Exit variable Current Fiscal Year/Period (0FPER) if you always want to reference to the current year.  If you set the variable as entry-ready in the Variable Editor, after executing the query, the variable screen then appears with which you can change the default values were necessary.
           4.      Move the characteristic value variable, such as OFPER, into the selection.
           5.      Select the characteristic value variable and from the context menu (right mouse click), choose Restrict.
           6.      Under Selection, choose Value Area and choose the tab page Variables.
           7.      Add the characteristic value variable, for example 0FPER, to the selection once again for the second value of the interval.
           8.      Select the characteristic value variable and from the context menu, choose Enter Variable Offsets.
                                a.      As an offset, enter -3 as the from value and 0 as the to value. Choose OK.
                                b.      Choose OK.
           9.      Enter a description, such as Revenue for current year.
       10.      Choose OK.
       11.      Select the selection and from the context menu, choose Copy and then Paste.
       12.      Now select the second selection and from the context menu, choose Edit.
       13.      Select the characteristic value variable and from the context menu (right mouse click), choose Restrict.
       14.      Select the characteristic value variable again and from the context menu (the right hand button), choose Enter Variable Offsets.
                                a.      As an offset, enter -15 as the from value and -12 as the to value. Choose OK.
                                b.      Choose OK.
       15.      Enter a description, for example Revenue for previous year.
    Also use a text variable in the description in this case.
       16.      Choose OK.
       17.      Move the required characteristic into the rows.
       18.      Save the query.
    After execution, the query should appear as follows:
    Variable screen entry: 01. 2002 to 08. 2002
    Comparison with Cumulative Previous Year Period
    A characteristic
    Revenue 01. – 08. 2001
    Revenue 01. – 08. 2002
    Value 1
    100.000
      90.000
    Value 2
    200.000
    180.000
    Value 3
    300.000
    400.000
    Two text variables replaced with characteristic values were used for the descriptions here. One is filled with the from-value for the column with an offset of 0 and a length of 3, the other filled with the to-value with an offset of 0 and a length of 7. You can find additional information under Example for Variable Replacement.
    Comparison of Cumulated Values for Two Years
    You may want to compare the cumulated values up to the current period of the current year with those of the previous year.
    For this example, use the variable 0FPER (current fiscal year period) and the variable 0P_FPER (your chosen fiscal year period). You use these two variables to set the interval limits.
           1.      In the Query Designer, create a structure with two selections:
    ¡        1. selection: Cumulative Amount for current year
    ¡        2. selection: Cumulative amount for previous year
           2.      With the first selection (cumulative amount for current year) , move the time characteristic 0FISCPER into the selection and select it.
           3.      Choose Restrict from the context menu (right mouse click).
           4.      Choose Value Area between as the selection and go to the tab page Variables.
           5.      Double click to choose the variable 0P_FPER as the from value and variable 0FPER as the to value. The result is an interval from the chosen period to the current period.
           6.      Define the second selection (cumulative amount for previous year) and proceed as for the first selection.
    ¡        Add the variable 0P_FPER as the from value and variable 0FPER as the to value here.
    ¡        Set an offset of –12 for both the from and the to values:
    Select the interval and from the context menu (right click), choose Enter Variable Offsets. Enter –12 for each.
    The result is an interval that has been moved 12 periods ahead.
           7.      Add the key figures and additional characteristics for the query.
    After executing the query, you get a variable screen for the variable 0P_FPER. You need to enter the start period in the current fiscal year.
    You can also suppress this entry by deactivating the indicator Entry-ready in the Variable Editor for the variable 0P_FPER and entering a default value (for example, 001.2001 for 2001). You only have to change this value once per year.
    You have now defined a query that compares the cumulative values for two years.
    The variables with SAP Exit delivered by SAP have the following behaviors:
    Variable 0FPER (current fiscal year period): Displays the values of the current fiscal year period.
    Variable 0P_FPER (any fiscal year period): Displays the values of any fiscal year period. You can set the fiscal year period in the variable screen when executing the query in any way you require.
    Variable 0FYTCFP (fiscal year up to current fiscal year period): Displays the values of the first period up to the current period of the current fiscal year.
    Variable 0FYTLFP (fiscal year up to previous fiscal year period): Displays the values of the first period up to the previous period (current period –1).
    You need to use the variables 0FPER and 0P_FPER in the above example for the comparison of cumulative values for two years.  When using the variables 0FYTCFP and 0FYTLFP, only values for one month are displayed for year transitions with an offset of –12.
    Regards,
    Prema

  • Variable Offsets

    I have got a query in Query Analzyer with 2 key figures both looking at the same thing (Number of Orders).
    I would like the 1st key figure to be the value for the current month (based on a variable entry - i.e. 09.2009) and the 2nd value to be the last 3 months based on the variable entered for the 1st Key Figure (i.e. 07.2009 - 09.2009).
    I have tried restricting the 1st Key Figure with the variable 0I_CMNTH on 0CALMONTH and then restricting the 2nd key figure with a value range of [0I_CMNTH -2 - 0I_CMNTH] but this comes up with the following error:
    Variable 0I_CMNTH (5E4II2344I3JG4R6ACMYQ441Z) was found in the query but in the meantime it has been deleted, or it has been used incorrectly.
    It this possible & if so how would I go about doing it?
    Any help would be greatly recieved.
    Kind Regards
    Carly

    Hi,
    You can achive this by using Offset variable.
    If you are using 0calday create a offset variable -90 days( use Calday and Calday - 90 in the  selection i mean you need to use the same variable twice )
    If you are using 0CALWEEK create a Offset varialbe -12 ( use Calday and 0Calweeks - 12 in the  selection i mean you need to use the same variable twice )
    and restrict them with the Key figure
    and about the error ( relese the request in the transport collection (se09) and delete the variable and recreate it once again
    or
    else create a customer exit vatiables var1 and var2 one with user input and another without user entry
    write a logic in EXIT_SAPLRRS0_001 . compare with Sy-datum and -90
    use LOWVALUE - 90 and use I_step=2 so that at the run time it calculates current date - 90 days and gives you current date and 3 months back date
    hope this helps
    santosh

  • Offset a Variable

    Hello friends
                      Can you tell me how we can offset a variable. For e.g. I have a variable "Latest date" (Customer exit) which gives me the latest date. Now I also want a date in the last week so I just want to offset this variable by 7. Also, can I use both of them i.e the original variable and the offset one simultaneously

    Hi Rishi,
    Offset a variable can be done by right clicking the variable after you have selected it.
    You can use both the variable and the offset variable e.g.:
    restict from offset variable (e.g. current moth - two months ago) to variable (current month)
    Udo

  • Creating Restrictions in BEx query designer for (1-a), where a is variable.

    Dear All,
    >>  Suppose for the variable in the BEx query designer, I've created restriction for 0FISCPER to the variable 0P_PER (as 0P_PER-1) by right clicking 0P_PER3, from that a dialog box appears.  In that I've selected 0P_PER3 and then clicked on offset variable and when I set the offset variable, it works for (0P_PER-1.etc, 0P_PER+1,etc..)
    But if I want to have (1-0P_PER), then plz tell me how to define this restriction?
    Plz explain me the steps to perform (1-0P_PER) restriction in BEx query designer in BW1.
    I'm using SAP BI 7.2 gui.
    Expecting your reply soon,
    with Regards,
    Jerald

    My requirement is that I want to have " 1-fiscal year"., But this I could not define using offset variables, since using offset we can define "fiscal year +1" or "fiscal year -1". 
    So there would be some other way to define "1-fiscalyear".  So Please help me to define "1-fiscalyear"  by giving me the steps.
    Thank you,
    with Regards,
    Jerald

  • Problem in using offset value in streams

    hi friends,
    I have been having this problem far few hours. I am unable to understand why this exception is comming, although I know the cause of exception as I have figured it out by now but unable to remove it.
    here is a simple file copy program using character streams wrapped around Buffered streams.
       import java.io.*;
    public class CopyBytes {
        public static void main(String[] args) throws IOException {
            BufferedReader in = null;
            BufferedWriter out = null;
            char []buff=new char[5];
            int offset=0,length=5;
            try {
                in = new BufferedReader(new FileReader("Factorial.java"));*
                out = new BufferedWriter(new FileWriter("outagain.java"));            
                while (true) {
                    in.read(buff,offset,length);     //this line causing error
                    out.write(buff,offset,length);
                    offset+=length;
            } finally {
                if (in != null) {
                    in.close();
                if (out != null) {
                    out.close();
    }when I ran the program I got following exception java.lang.IndexOutOfBountException
    I know the exception is at commented line, but I am not sure wheather this is coming due to offset or length variable
    by the way, first 5 characters from source file have been copied to destination file as I saw.
    thanks in advance

    san_4u wrote:
    how can I skip offset variable as this method must pass one char[] and two int variables.
    would you please explain how these three parameters are being used. I have read it many times but still unable to understand the use of offset and length variables.For the read method, the offset parameter specifies at which index of buff to start writing data.
    For the write method, the offset parameter specifies from which index of buff to start reading data.
    Since you are using buff as temporary buffer only, you can always read stuff into buff at its beginning (i.e. index 0).
    Of course, when writing data to the stream from buff, you should write the data previously stored. So, you should (obviously) use the same offset for writing to the stream as you previously used when reading from the stream. To be able to write exactly the data you previously read, you also need to know how many chars were read and stored in buff. Luckily, that is exactly what the return value of read does tell you (with -1 being a special flag for "no more data available").
    Hope you can figure it out now.

  • How to Create a Text Variable

    Hi Experts...
    Can you please explain me how to create a Text variable...
    In my Cube i had 3 different date fields....
    and as per my requirment i need to create a rolling report for which will display data for 6 months rolling.
    As the date field which i need to use is not mapped to Time Char's (Cal Year,Cal Month...etc)
    For that reason i created below customer exit variable and used offset variables to achieve the rolling 6 months report
    Code used for Customer Exit VAriable:
    WHEN 'ZC_Cmonth1'. " Current Cal Month Car Expiry
    IF i_step = 2.
          CLEAR l_s_range.
    determine date
        LV_SYDAT     =  SY-DATUM.
        LV_YEAR_ACT  =  SY-DATUM+0(4).
        LV_MONTH_ACT =  SY-DATUM+4(2).
    Set begin date of intervall
    CONCATENATE LV_YEAR_ACT LV_MONTH_ACT '01' INTO LV_DATE_LOW.
    Set end date of intervall
    CONCATENATE LV_YEAR_ACT LV_MONTH_ACT '31' INTO LV_DATE_HIGH.
    Fill ranges-tab with: include all values between beginning of year
    and actual date
      CLEAR E_T_RANGE.
      CLEAR L_S_RANGE.
      L_S_RANGE-SIGN = 'I'.
      L_S_RANGE-OPT  = 'BT'.
      L_S_RANGE-LOW  = LV_DATE_LOW.
      L_S_RANGE-HIGH = LV_DATE_HIGH.
      APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    Now i need to create TEXT VARIABLE that will display the Month Name in the column name
    Please update in detail step how to create a Text Variable

    In your specific requirement select the which ever the keyfigure you want  to analyse, go to edit mode of keyfigure propeties there select the newvariable type and create the Text variable by maintaining the proper offset start and length and also maintain the in whcih format u want see the month name in column headers. Maintain the Text format or key format. it totally depends on u r requirement.
    Hope it will help ful for u.
    Bye,
    Chandu.

  • Regarding Offsets

    hi
    Can i create 3 offsets for a single variable.
    actually the requriment is like follows-
    Restict by year entered in ‘TO’ range, including 3 Prior Years ( TO year entered -1 + TO year entered -2 + TO year entered -3)  Ignore the periods.
    here i created fiscal year variable(interval,mandatory)
    please help me in detail.
    thanks in advance.

    hi,
    pl chek these posts
    Regarding Variable Offset
    Offset Variables
    http://help.sap.com/saphelp_nw04/helpdata/en/af/809528939d5b4fbff7e16a5bdc0d85/content.htm
    Hope this helps.
    Pl dont foget to reward points if it helps.

  • How to get total amount between two fiscal years

    i Have a report requirement. I have created a crosstab report where I need to get amount of current year current month(10/2010), current year last month(09/2010),last year last month(10/2009). Here I'm comparing  10/2010 amount with 09/2010 and 10/2009. But now my manager asking to me create report that  compare amount between 2008 and 2009 periods.
    How to get that?
    I have a prompts and I entered  1)fiscal year=2009
                                    2)fiscal period= 9;10
                                    3) account numbers=x;y;z;p;q;r;s
    I entered fiscal year:2009 in the prompt but I need to compare  fiscal year 2009(i.e 10/2009) amount with fiscal year 2008(10/2008).              
                                                                2009/09    2009/10   2008/10
    Account number  account name         amount     amount     amount
    In advance,Thanks for your response

    Is your universe based on a BEx query? If so, create the offset variables in the BEx query.
    If the universe is not based on a BEx query, you will need to create these variables in your universe. I do not believe you can do this directly in Webi.

  • How to create a dynamic sum of month in webi

    Hello, i am afraid because i could realize easily a report in BEx and i don't arrived to do that in Webi (XI R2)....
    To simplify i want to do that:
    Month _____________| January_|  Feb_|_March_|_Apri_|_May_|_June_| ...
    Sales __________ ___|_10_____|_30__|_15___|_12___|_16___|_20__| ...
    sum of next 2 month |_55_____|_57__|_43___|_48___|_36___|_20__| ...
    The sum have to choose dynamically the month of the date (like a restrict ratio with an offset variable on the month).
    Thanks by advance for the answer!

    Have I missed something that the Adobe Bridge Output Module didn’t seem to offer a printing option?  Tried the older plug-in which is what I was familiar with, but that seems to download all the plug ins, not just contact sheets. Do I have to download the whole shebang?

  • New Key Figure Requrinment

    hellow gurus
    i'm workin on BW 3.5
    now in a report i need a new info object
    which is equal to Warranty Quanity / Sales Qty..
    But the requirnment is
    Warranty qty = Sum of all Warranty Quantities of last 12 month
    but
    Sales Qty = Sum of all Sales Quantities from last 24th month to last 11th month ..
    for that i got to know
    i need to some enhancement with CMOD using function exit for global reporting of variable..
    so can u please clearify how to proceed forward..
    thanks in advance.

    You have to restrict Warranty Quanity by 12 previous months (It can be done with offset variable from entry date).
    You have to restrict Sales Qty by 24th to 11th previous months (It can be done with offset variable from entry date).
    Then you have to do a calculate key figure or formula for Warranty Quanity / Sales Qty.
    Also in the query filter you have to avoid selecting data from 2 years, and this can impact in performance.

  • BEX Report on Fiscal Report Year

    Hello Experts,
            I have Report Year and Fiscal Period/Year as a characteristics. In one of my BEX reports, I have to use Report Year as moving Year defined by user when they run query. For example,
    In selection criteria, user may enter Fiscal Report Year like 006/2001. So, query will collect data for each Fiscal Report Year under column FRY 2002 (starting from 006/2001 to 005/2002); under column 2003 (006/2002 to 005/2003);.........;under column 2005 (006/2004 to 005/2005).
    Again, if user enters 002/2001 as a Fiscal Report Year then query will provide data like under coulmn FRY 2002 (starting from 002/2001 to 001/2002); under column 2003 (002/2002 to 001/2003);.........;under column 2005 (002/2004 to 001/2005).
    It will appear like:
              FRY 2002    FRY 2003    FRY 2004    FRY 2005
    1 Month     100        50          200         100
    2 Months    10050     5050       200100     100200
    3 Months    10050200  5050100   20010050 100200100
    and so on.
    Total of 12 Months starts from the period that user will give and doesn't follow Jan to Dec.
    Can some one please help me how can I define query with this type of moving 12 months total for given char.? Please let me know if you need more information. I will appreciate your help. Thanks.
    Regards,
    Kate

    Hi,
    Did you try using Offset variables??
    Let me know
    Ashish

Maybe you are looking for

  • How do I know if the logic board is bad?

    So the girlfriend dumped a slew of water on her 20 gig 4th gen photo. I've completely disassembled it and THOROUGHLY dried it out and all seems well from that perspective. So here is what is happening: - if I plug it into my PB it does not respond, n

  • Mac Mini with Samsung Smart TV?

    Hi gurus, I'm new to Mac. Can I connect a Mac Mini to my Samsung Smart TV as the monitor? Thank you.

  • Any external HDDs compatible with Tablet 2?

    Hello everyone, Lenovo Solution Center is reporting that the 64 GB of storage in my tablet 2 is running out, and I would like to connect an external hard drive to it and move some programs and files to the hard drive to free up space in my tablet. So

  • No Problems here with Update...

    I just wanted to post and say I did the update yesterday and had no problem at all with download or the phone after the update. After reading so many post on the problems everyone was having I was worried about updating. But I decided I would give it

  • ID toc function overrides setting in Book

    I'm using ID CS3. I have Book (.indb) consisting of two documents: the front matter and the main body of the text. I'd like to keep the page numbering separate, that is, have the page numbering start over with the first page of main body. If I desele