Variable offset issue.

Hi,
I have a query with 12 columns. I am using variable 0P_FPER. I am doing an offset in each of the columns. Still, all columns return same values. The offset is not working. Please  help.
Tthanks...

For offsets instead of creating 12 different selection you should give range.
e.g. variable-12 to variable
Restrict -> value ranges -> between
Then select same variable in both from and to input boxes.
Once you transfer it to right and select the offset, it will ask offset two times.
One for - from variable
next for - to variable
Select -12 and 0 respectively.
It should give you prior 12 period offset.
It will increment/decrement according to values of master data. So if you have master data fro 13/2008 then only it will go to that period, otherwise 01/2009 will be selected.
Abhijeet

Similar Messages

  • Variable Offset not working in BI 7.0

    Hi ,
    I am facing an issue with variable offsets in queries in BI 7.0.
    I created simple keyfigures with variable offset for fiscal year period with -1,-2,-3...etc to show different periods but I am getting 0 values for the same.
    Just to inform, we are on SAP GUI 7.10 and support pack 0.Are thre any issues in variable offsets with front end patch ?
    If so, pls let me know.Pls also let me know if we need to apply any notes to resolve this issue.
    Regards,
    Kumar

    Hi Joke,
    Thanks for ur reply. I just now downloaded and installing and after that I will test the variable offsets.
    Wond,
    Just to tell you that variable offsets are not also working in the web.Let me install this patch and try one more time...
    Regards,
    Kumar

  • Variable Offset for Fiscal Year Not Working

    Hello,
    My fiscal year variable offsets are not working. I have an input-ready query setup with 3 restricted key figures.
    1) Restricted by FY Variable 0P_FYEAR, 0VTYPE = 20, KF = 0QUANTITY
    2) Restricted by FY Variable 0P_FYEAR (variable offset -1), 0VTYPE = 20, KF =0QUANTITY
    3) Restricted by FY Variable 0P_FYEAR (Variable offset -2), 0VTYPE = 10, KF= 0QUANTITY
    I have in my filter selections Fiscal Year Variant = K4
    Rows have 0STKEYFIG
    Columns have 0FISCPER3 (Posting Period) and the 3 Restricted Key Figures.
    When I run the query, the offsets are not being accepted.  Only the selected FY variable.  The first and second restricted kfs show 2009 data and not 2009, 2008 as it should.  Has anyone else had issues with this?  I am not using 0FISCPER but 0FISCPER3 but I am not sure how that would make a differnce.
    I have created new variables, tried to do positive offsets, tried to include and exclude values int the filter to no avail.
    Thanks,
    Cherie

    I kept my variable offsets in the restricted key figure and they aren't working.  When I just put fiscal year in the column and put the 0P_FYEAR and 0P_FYEAR-1 I get the 2 columns and the offsets filter through just fine.  It seems to only be messing up when they are in the restricted key figures themselves.

  • Variable Offsets-Bit Tricky

    Dear Friends,
    It is very surprise with variable offsets (0CalWeek) in my Query. 
    I have a query where I have 2 structures.
    In Rows, I have 3 selections in structure and one characteristic. The three selections are Different Product Groups let say <b>A, B., C</b> and characteristic is <b>Product</b>. So the Products are listing in the report according to <b>A, B</b> and <b>C</b>.
    In Column, I have a Key Figure structure where I have <b>Stock,</b> <b>Age</b> (in No. of Months). The stock and Age are displayed against to Product.
    Apart from the stock and Age, The User want to separate the Product Ages in to 4 categories like <b><6 Month Age Product Stock, <12 Month Age Product Stock, <24 Month Age Product Stock, >24 Months Age Product Stock</b>. I created these selections using Boolean operators taking in to consideration of Age and Stock.
    I have two variable selections for this query, <b>Country</b> (Mandatory) and <b>Cal Week</b> (Mandatory, User Entry/default). The <b>Stock</b> Key Figure is restricted with Variables <b>Calweek</b> and <b>Country</b>. Up to now the Report is working fine.
    Now the User has new requirement is to calculate <b>Previous 12 weeks Sale</b> (in Units) of Product and then he wants to compare <b>Previous 12 weeks Sale</b> with each of <b><6 Month Age Product Stock, <12 Month Age Product Stock, <24 Month Age Product Stock and >24 Months Age Product Stock.</b>
    To Calculate <b>Previous 12 Weeks Sale</b> I have <b>Actual Sales</b> as Key Figure in Cube. In Selection, I restricted sales with <b>0Calweek variable</b> with offsets and like that I made 12 selections. I created formula for <b>previous 12 Weeks Sale</b>.
    Now my problem is When I introduced this <b>Previous 12 Weeks Sale</b>, The other columns <<b>6 Month Age Product Stock, <12 Month Age Product Stock, <24 Month Age Product Stock, >24 Months Age Product Stock</b> are not populating with Stocks but <b>Previous 12 Weeks Sale</b> is working fine.
    If I remove <b>Previous 12 week Sal</b>es and all 12 selections then all the ageing Columns are working.
    This is bit tricky, Please suggest me a suitable solution for this. Your help is highly appreciated.
    Thanks,
    SB

    Hi,
    12 weeks means 3 months.Right?
    try by creating selections month wise. i.e. create 3 selections by restricting sales with offsets on months instead of 12 weeks .
    Hope this helps!
    (what about your previous thread?issue is resolved?if so,pl close it by assiging points )
    Message was edited by: Murali

  • Problem with variable offset for 0CALMONTH

    Hello Community,
    I have a problem with using variables offset for time characteristic 0CALMONTH
    Let's say my current query looks like this:
    ...................01.2006..........02.2006..........03.2006   (0CALMONTH)
    Sales ..............100..................125................200   (Keyfigure)
    What I want do now is to add a previous year comparison. So that it should look this way:
    ...................01.2006..........02.2006..........03.2006   (0CALMONTH)
    Sales ..............100..................125................200   (selected months)
    LY_Sales...........50..................100................100   (selected months - 12)
    (LY_Sales should show figures of 01.2005, 02.2005 and 03.2006 in this example)
    I used new selection for LY_Sales with variable offset for 0CALMONTH -12 but that didn't work. Figures in second line are zero. The desired figures would show up (if I expand the selected time intervall wide enough) in 01.2005, 02.2005 and 03.2005 but that's of course not what I want.
    Please help if you can!
    Regards,
    Ulrich

    Hi,
    We can get an an other way by using CELL editor caoncept.
    First create teh query like this:
    ...................01.2006..........02.2006........12.2006.....01.2005...02.20005...12.2005  Sales ..............100................125..............200.............50...........100.........100 
    Sales ..............100................125..............200.............50...........100.........100
    Then hide the 2005 years' kf:
    ...................01.2006..........02.2006........12.2006
      Sales ..............100................125..............200 
    Sales ..............100................125..............200
    Though the call editor concept overwrite the second rows(selection) content with hidden columns of second row(selection) one by one .i.e first cell of 2nd row will be overwritten by 13 th cell of second column.similarly second cell of 2nd row will be overwritten by 14 th cell of second column........
    First row(selection) : Cal year Charactertic with restriction 2006.
    second row(selection) : Cal year Charactertic with restriction 2005.
    With rgds,
    Anil Kumar Sharma .P

  • Variable offset not working

    Hello Experts -
    I have a structure and a variable with single-value entry. The variable is on 0CALMONTH.
    If user input 06/2007, I wanted to see information for 06/2007, 05/2007, 04/2007. I'm using a variable offset. But my report output is always for 06/2007. I have data for 05/2007 and 04/2007 also.
    In the column header, it shows 04/2007, 05/2007 and 06/2007 but there's not data.
    Can someone please help me with this? What am I doing wrong?

    If you can see the offset result in header then it will surely work for data also.
    If u have a key figure amount.
    Then you need to restrict this figure for user inputed months variable - offset.  i.e different restricted figures for different months.
    I hope this is clear to you, if not then do let me know.
    Thanks
    Dipika

  • 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 Offset for Customer Exit??

    Hi,
    is it possible to have a variable offset for customer exit time variables?
    E.g. I have a variable current month but can I also create a one-year offset of that?
    In our system that doesn't work (but also the current month variable doesn't work...)
    thanks
    Sabine

    Hi,
    As it is mentioned by Mr.Voodi,it definately works.
    You only has given the answer for your problem .i.e you need to make sure the Customer exit variable is working proper.So take a look on the code used for it.
    With rgds,
    Anil Kumar Sharma .P

  • Variable Offsets are working only partially

    Hello experts, at first I thought that an offset I placed on a variable for 0FISCPER was not working. I am trying to do a report which gives me the value of couple of Key Figure "Earnings", for a certain Fiscal Period and this same Period but for the last year. That is (please consider each "/" as a blank space):
    ////////////              Earnings  //////////////////               Earnings
    ///////////           on FiscPer   ///////////        on LastFiscPer
    ///////////           (E.G. 01.2008)  ////////      (E.G. 01.2007)
    Char1 /////////         $       ////////////////////////////                      $
    Char2 ////////         $       /////////////////////////////                      $
    Char3 ///////         $        //////////////////////////////                     $
    I am using a variable that I created, which takes a user input. On Selection "Earnings on FiscPer" I placed the variable with no offset. On Selection "Earnings on LastFiscPer" I placed the same variable, with a -12 offset.
    The problem I have is that it is not working. The offset is not working, it just displays the value for the Fiscal Period given by the user, not last year's Fiscal Period. However, the funny thing is that if I place the offset as +12 and give as input las year's Fiscal Period, the offset works and displays the value for the next year's Fiscal Period. So the variable offset works only on one side, with possitive offset values. I have tried different approaches (some coming from other posts from this forum) but I cannot get the offset to work with negative values.
    How can I manage to get this to work? Any ideas?
    Edited by: Pedro Olvera on Apr 28, 2008 6:17 PM

    Hi Pedro,
    i will try to answer your questions:
    a) range of values instead of individual value for variables:
    -> if u use a range of values for one KF u will always get cumulated values for this range
    -> for example: 0FISCPER3 with range 001-016 and 0FISCYEAR 2008 -> u get the sum of all periods for year 2008
    Idea : i have a query where i have a KF with a range. I defined a solid start period (0FISCPER3) for example 001 and have an input ready variable for end period, called "Period to". Also u have input ready variable for 0FISCYEAR. This KF shows me the sum until the defined end period for a user defined year.
    b) 0FISCPER3 in lines or columns:
    IF u now drop 0FISCPER3 in free characteristics in query designer, u are able to do a breakdown in BEx Analyzer for 0FISCPER3 in lines or columns.
    Szenario:
    1) u have created your KF as i descriped in IDEA
    2) u have dropped 0FISCPER as free characteristics in query designer
    3) At BEx Analyzer u go to query properties -> put 0FISCPER3 in columns (-> maybe u change with properties display options for 0FISCPER to text -> it dispays for 0032008 -> Mar 2008)
    4) Press ok
    5)  Right click on your KF and choose "Add drill down according to" -> Choose "posting period" (0Fiscper3)
    6) Do a horizontal drilldown for posting period with drag and drop
    -> Now u have a drill down for posting period in your KF, but also for all other KF too
    -> To avoid this u can customize workbook settings
    1) Change to design mode
    2) open properties for analysis grid and disable display options for "Hierarchy icons"
    Another way is to delete the hierachy icon
    -> u now only see a drilldown with posting period for these KF u wanted to have a drilldown to.
    If u now only want to see posting periods which have values and disable all which have no values, u can activate zero suppression for lines and columns in query properties.
    Voila, u have a worbook which now shows for your KF all availble posting periods in one year without creating 16 monthly key figures. In addition u can change the inner year range of summation of period values
    Hope it helps
    Regards
    Edited by: Tobias on Apr 30, 2008 8:35 AM
    Edited by: Tobias on Apr 30, 2008 8:36 AM
    Edited by: Tobias on Apr 30, 2008 8:36 AM

  • Text Variable (offsets)

    Hi,
    Please I will like to confirm if it is possible to make use of a variable offset in a text variable. How can I do this from the query designer ?
    I have already restricted the charateristic with a variable and offset, but I'm not sure if this will automatically affect the text variable (of the same chracteristic) used in the description of the selection or whether it requires a text variable offset (??) to achieve this.
    Any suggestions will be appreciated.
    Regards,
    Uche

    hi Uchenna,
    if you have created text variable (with replacement path from that characteristic), the offset on characteristic variable will reflect to the text variable, e.g
    you have zyear with offset +1 and +2 and the year itself,
    then your report may look like
    zchar    2006 2007 2008
    a        xx   xx   xx
    b        xx   xx   xx
    hope this helps.

  • Variable Offsets for Weeks

    We have a custom created infoobject for fiscal week, which is basically week number within fiscal variant, fiscal year, and fiscal period. So fiscal period 1 contains weeks 1-4, period 2 contains weeks 5-8, etc.
    Our problem is in the use of variable offsets in query definitions. If we use 0FISCPER, BEx knows that the "-1 offset" for 2005001 is 2004012, not 2004999. Similarly, for 0CALWEEK, the week before 200501 is 200452, not 200499. So for our custom infoobject, how do tell BEx that the fiscal week before 200501 is 200452? Anyone know how we can set this up?
    Thanks in advance for any info you can provide.
    Rachel McGregor

    Yes, we figured we would probably need to do something in the user exit. We did not create the infoobject with reference to anything else since we added some custom attributes.
    What exactly should we do in the user exit? We want to create a structure with a whole bunch of selections for week number, week number-1, week number-2, week number-3, etc. all the way back to week number-104 (i.e. we want 2 years' worth), with a single prompt to the user for week number.
    Any suggestions?
    Rachel

  • Special Periods and Variable Offset

    Our fiscal year variant includes 12 periods and one special period (Period 13).  I created a rolling 12 month query which uses variable offsets to define each column.  If the user enters 3/2006, I would expect to see the next columns to show 2/2006, 1/2006, 13/2005, 12/2005....
    Instead the query ignores the special period and jumps directly from 1/2006 to 12/2005 - therefore the postings for Period 13, 2005 are not displayed.  From what I've found so far this is standard SAP BW functionality, but has anybody had any luck getting around this?
    Thank you.

    Jeff,
    If I enter 13/2005 into the leading column variable, I can see that there are transactions posted to Period 13 which are not included in the results of Period 12.  We have another query where the user can enter a period range using an interval variable for 0FISCPER (i.e. from Period 10/2005 to Period 2/2006) and it brings back results for Period 13/2005.  However this other query that uses the variable offset to define the rolling periods does not return the Period 13 results.  I thought about adding Period 13/2005 to Table T009B, but I would prefer not to set this up in BW without doing the same in R/3, and I'm not quite sure about the implications of adding an extra (not special) period to the Fiscal Year variant in R/3.
    Sven,
    I use 0FISCPER for posting period, and I created a structure for the twelve periods.  There is a variable (0P_FPER) for current posting period in the first column, and the rest of the columns use offsets to go back the 12 months.  For example the second column is (0P_FPER - 1), the third column is (0P_FPER - 2), etc.  It seems that my problem is related to the fact that the offset ignores the special periods, while the fiscal period interval variable recognizes these periods.
    Thanks very much to both of you for your replies!
    Janet

  • In a big trouble(offset issue)

    Hi gurus,
    while upgrading from 4.6c to 6.0 i am gettin this error.
    please help me in reolving this offset issue
    thanks in advance.
    error :
    "RM11P" and "WA+49(719)" are not mutually convertible in a Unicode          program . . . . .          
    line in which error is coming :
    MOVE WA+49    TO RM11P.
    structure of wa is :
    DATA: BEGIN OF WA,
            WA1(256),
            WA2(256),
            WA3(256),
          END OF WA.
    and rm11p is a database structure.

    is this a custom program ?   looks like ..
    then se38 > attributes>  unicode check active  (check box ) - uncheck this.

  • . application of variable offsets

    hi this ramireddy

    Hi ram,
    18. U check the data in the cube using manage option.
    19. When you find some records missing when deltas are running then instead of going for re-init and again deltas you can go for repair full request giving selection conditions for those missing records, without affecting your delta laods
    In Infopackage manage screen in menu bar you have the option to mark the request as repair full request and then you will have selection criteria also in IP.
    20. when one infoobject depends on other infoobject then we go for compounding ex : 0sourcesystem
    21.variableoffset: with variableoffsets u can get data of previous months & next months data from the current data.
    example:if u have six months data in cube.
    now create variable for 0calmonth.
    take offset value as-2&+2.then it gives u previous 2months data andnext 2month data from the current month.
    suppose if u enter 2005 as current month then it for specifying variable offsets it displays 2003&2007 data also.
    22.replacement path is used for trending reports.

  • Is variable offsets can be used for characteristics, text and formulas?

    hi all,
    can anyone let me know whether variable offsets can be used for characteristics, text and formulas.
    if so cany one send me examples of using offsets to my email id [email protected]
    regds
    hari

    You use offsets on dates (0CALMONTH, 0FISCYEAR, 0DAT and so on) and of course the corresponding texts.
    If you have 0CALMONTH in your query and you want to do the same thing not only for the current month but for the past twelve months, they you just minus 1, 2....11,12 for each selections, and at the same time you can create text variable for the description of each month.
    thanks.
    Wond

Maybe you are looking for