Adding previous Fiscal Period YTD KF

Hi Gurus,
I have data in 2 IC as below:
IC : Current
*FiscalPEriod    Amount*      YTD
2011.01          100               100
2011.02          100               200
2011.03          100               300
2011.04          100               400
2011.05          100               500
2011.06          100               600
2011.07          100               700
2011.08          100               800
2011.09          100               900
2011.10          100              1000
2011.11          100              1100
2011.12          100              1200
2012.01           100               100
2012.02          100                200
IC Forecast :
*Forecast Version     Fiscal Period     Amount*   YTD
2011.04                 2011.04       200      200
2011.04                 2011.05        200       400
2011.04                 2011.06         200           600
2011.04                 2011.07         200           800
2011.04                 2011.08      200           1000
2011.04                 2011.09      200              1200
2011.04                 2011.10      200           1400
2011.04                 2011.11      200           1600     
2011.04                 2011.12      200           1800     
2011.05                   2011.05     300       300
2011.05                   2011.06   300         600
2011.05                   2011.07    300         900
2011.05                   2011.08      300            1200
2011.05                   2011.09      300            1500
2011.05                   2011.10      300            1800
2011.05                   2011.11      300            2100
2011.05                   2011.12      300            2400
2011.05                   2012.01  300       300
2011.05                   2012.02  300        600
2011.05                   2012.03      300            900
2011.05                   2012.04      300            1200
2011.05                   2012.05      300            1500
Master Data for Forcaste Version:
Forecaste Version         FLAG
2011.04                   Prior
2011.05                   Current
Now while creating Query, I need one KF called "Current Forecast YTD", So I need to go to master data and see forecast version against 'Current' and go to forecast cube abd select YTD under that Forcast Version. I did it with the help of Customer exit variable on Forcast Version.  its displaying data as below:
2011.01    2011.02    2011.03    2011.04   ||   2011.05    2011.06   2011.07   2011.08.......... 2012.01    2012.02   2012.03
                                                    300       600     900        1200             300      600      900
But I need query output as below:
2011.01    2011.02    2011.03    2011.04   ||   2011.05    2011.06   2011.07   2011.08.......... 2012.01    2012.02   2012.03
                                                    700       1000     1300        1600             300      600      900
If you notice 700 = 300 from Forecast IC + 400 from Actuals IC for Fiscal Period 2011.04
1000 = 600 from forecast IC + 400 from Actuals IC for Fiscal Period 2011.04
so on..but when new year starts ( 2012)..it will only take data from forecaste IC. So basically we need to add YTD KF of month 2011.04     ( this reference Fiscal Period will be decided from master data) from actuals IC to coming months in forecast IC.
How can we achieve this?
Please guide me.
Regards
Aman
Edited by: AmanSharma123 on Jun 22, 2011 8:43 AM

Hi Rooki Sapbi,
Thanks again..Seems like this the way to do this, but still one more complexity. My structure of the query is as below:
                                                                Columns
                                                     |
                                                     |               fiscal year
                                                     |              Fiscalyear Period
                                                     |               KF's
                                                     |             Formula Current Forecast YTD (Formula1)
                                                     |                            |_Actual YTD filtered by FV1
                                                     |                             |_ RKF1
                                                    |
Rows                                            |
GL_ACCOUNT
By you logic, I can get Kyfigure for 2011.04 but which against GL_account? There are many GL_Account, profit centers etc in the Actuals IC, I can find Keyfigure value for Fiscal period 2011.04 with the help of formula Variable, don't i need to provide GL_Account information etc?
Thanks again for your help. Waiting for your reply!
Have a good day!
Regards
Amandeep

Similar Messages

  • Deriving previous Fiscal Period based on current date

    Hi All,
    I have a requirement wherein I need to derive the previous fiscal period based on the current date. Is there any standard FM to get the same? If not can you let me know if there is any other way of deriving it?
    Thanks
    Sundar

    Hi Srinivas, thanks for your reply. What you have suggested will work fine if I am looking for current fiscal period. I want previous fiscal period. How do I get that?
    Thanks
    Sundar

  • Routine in DTP to load data from previous fiscal period - current

    Hi Friends,
    I want to load data for previous & current fiscal period and I want to write a routine in DTP to automate this process, can any one help me with this routine!
    Thanks & Regards,
    vidiyala

    Hi Bilal,
    We cant create ABAP routine in DTP, instaed we can create in Info package.
    $$ begin of routine - insert your code only below this line -
    data : v_date like sy-datum.
    data : v_new_date like sy-datum.
    data: l_idx like sy-tabix.
    read table l_t_range with key
    fieldname = ' '.
    l_idx = sy-tabix.
    v_date = sy-datum.
    l_t_range-low = v_date+0(6).
    CALL FUNCTION 'DATE_CREATE'
    EXPORTING
    *anzahl_jahre =
    anzahl_monate = 8
    *anzahl_tage =
    datum_ein = v_date
    IMPORTING
    datum_aus = v_new_date.
    l_s_range-sign = 'BT.
    l_s_range-opt = 'I'.
    if l_idx 0.
    modify l_t_range index l_idx.
    else.
    append l_t_range.
    endif.
    p_subrc = 0.
    $$ end of routine - insert your code only before this line

  • How to get previous fiscal period(Fiscal Period-1)

    Hi ,
    According to my business scenario for reporting-(BI-7) , I want to move FISCPER by 1 . The formula for this is ,
    Formula: (Restricited key figure)Sales Order $ (Prior)=Char = Fiscal Period - 1
                                                                                  KF =  Sales Order $
    I also need a variable for fiscal period for user entry -Single value and mandatory.
    I specifically have the task of not including FISCVAR newhere into my query design.
    Please suggest how to go about implementing the above scenario ?
    Thanks

    hi
    you should create RKFs. The variable can be a exit type which givs the current period. Use offset -1
    http://help.sap.com/saphelp_nw04s/helpdata/en/f1/0a563fe09411d2acb90000e829fbfe/content.htm
    http://help.sap.com/bp_epv260/EP_EN/documentation/EP/N05_BB_ConfigGuide_EN_US.doc
    regards
    abiram

  • P & L report for current period,YTD and previous YTD

    I am trying to create a P & L report with the columns for current period,YTD and previous YTD,  I have include the measures as the key of columns, which by using period or YTD we can retrieve the current period and YTD column, is there as easy way to get the previous YTD? although I can get it  by using evtim to het every month and calculate the previous YTD.

    resolved, just need to bring both time and measures in the columns

  • How to calulate previous fiscal year from current year and periods as input

    hi all,
    i have a report where i have 2 select options as year and period.
    my period can be a range  like( Ex: 1 to 6).
    i like to know previous fiscal year from the following inputs.
    Tel me a suitable conversion routine to calculate
    depending on periods and fiscal year.
    regards
    sivaram.

    Hi
    U need to check the lower period, if it's 1 the previous fyscal year will be the year before:
    IF PERIOD = '1'.
      PREV_YEAR = YEAR - 1.
    ENDIF.
    U can also use the fm FI_PERIOD_DETERMINE, in this case you need a date, u can get it from lower current period:
    Get the first day of the period
    BUDAT(4)   = YEAR.
    BUDAT+4(2) = PERIDO_LOW.
    BUDAT+6(2) = '01'.
    Now get the last day of the previous month:
    BUDAT = BUDAT - 1.
    Use this date to get its period by fm FI_PERIOD_DETERMINE
    Max

  • Using variable 0P_FPER to calculate YTD Fiscal period

    Could someone please explain the procedure for creating a variable which will use the value entered from the variable 0P_FPER - Period/Fiscal Year (Single Value Entry, Required) to calculate the YTD Fiscal Period.
    Regards,
    Craig Stephen

    You have to create a Customer Exit variable for this :
    <b>Customer Exit - > YTD from Fiscal Period</b>
    <b>Let ZVCCYTDX be the tech name of Customer Exit Variable & 0P_FPER  be the user entered variable for Fiscal Year Period.</b>
    User Exit: ZVCCYTDX
    Input: 0P_FPER
    Output: Jan of Accident Year Range
    Logic Description:
    WHEN 'ZVCCYTDX'.
    if i_step = 2.
    clear loc_var_range.
    loop at i_t_var_range into loc_var_range WHERE vnam = '0P_FPER '.
    if sy-subrc = 0.
    curr_year = loc_var_range-low(4).
    concatenate curr_year '001' into jan_accidentyear.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = jan_accidentyear.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    append l_s_range to e_t_range.
    exit.
    **endif.
    endloop.
    endif.
    **Coding is not required if you can enhance the Datatarget with Fiscal Year and Posting Period.

  • Fiscal period problem 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

    You can create two restricted key figure (posting period, fiscal year, amount) and hide them.
    1st restricted key figure
        - posting period (restricted with interval 1 to user entered period e.g. YUSERP)
        - Fiscal year (user entered year e.g. YUSERYR)
        - Amount
    2nd restricted key figur
        - posting period (restricted with user exit e.g YPREVP)
        - Fiscal year (user exit e.g YPREVYR)
        - Amount
    Create a formula as ur final balance by adding the above two key figure and make this visible.
    user exit code for YPREVP -
    if i_step = 2.  "After Selection screen is shown
        read table i_t_var_range into l_s_var_range with key vnam = 'YUSERP'.
        if sy-subrc = 0.
          l_per = l_s_var_range-low.
            clear l_s_range.
            l_s_range-sign = 'I'.
            l_s_range-opt  = 'BT'.
         if l_per = '12'.
                 l_s_range-low  = 0.
              l_s_range-high = 0.
         else.
              l_s_range-low  = l_per + 1.
              l_s_range-high = 12.
         endif.
            append l_s_range to e_t_range.
          endif.
      endif.
    user exit code for YPREVYR -
    if i_step = 2.  "After Selection screen is shown
        read table i_t_var_range into l_s_var_range with key vnam = 'YUSERP'.
        if sy-subrc = 0.
          l_per = l_s_var_range-low.
          read table i_t_var_range into l_s_var_range with key vnam = 'YUSERYR'.
          if sy-subrc = 0.
            l_year = l_s_var_range-low.
            clear l_s_range.
            l_s_range-sign = 'I'.
            l_s_range-opt  = 'EQ'.
         if l_per = '12'.
                 l_s_range-low  = l_year.
         else.
              l_s_range-low  = l_year - 1.
         endif.
            l_s_range-high = ''.
            append l_s_range to e_t_range.
          endif.
        endif.
      endif.

  • Option to show values up to last closed fiscal period or up to current date

    Hello,
    How would I create a query that would ask if I want it to calculate values 'up to the current date' or for the 'latest closed fiscal period'.
    Currently I have setup a report, within which, has restricted key figures that will give the 'Period to date', 'Year to Date', and 'Last Year Year to Date' values for some RKFs, however, it would be very helpful if this report could be setup so that the user could choose whether the report provides:
    1. Values only through the last closed fiscal period
    or
    2. Values up to the current date.
    <b>For example</b> if we are in period 7 of 2006, the user could have the report show all values up to the last closed fiscal period, which in this case would be period 6 of 2006.
    Or the user could have the report show all the values up to the current date.
    Hopefully I have been clear,
    Thanks,
    Nick
    Message was edited by:
            Nick Bertz

    Nick,
        What is the problem you are facing? As San mentioned you can only report till Last Fiscal Period using Customer Exit Variables(Calculate Current Fiscal Period using Current Month and Fiscal Year Variant).
    Or as you mentioned you can create restricted Key Figures using Date or month (YTD etc)
    If i miss your requirement, please guide me.
    Regards,
    Nagesh Ganisetti.
    *Assign Points if it helps.

  • Last Closed Fiscal Period

    Hi All
    How can I identify the Last Closed Fiscal Period in a query variable ?
    eg. The current calendar month is Feb which is Fiscal period 11 (Variant is Z3). However Finance still have January open so they want to report YTD figures up to and including December (Fiscal periopd 9).
    I have created a user exit variable (with help from SDN) that works out the YTD range for the fiscal periods but it uses system date to calculate current period. Therefore, the current fiscal period is coming out at 11 but I need 9. When the Month End occurs on Friday the current fiscal month should become 10.
    All help appreciated.
    Asif

    Hi Surender
    I need a variable that does not have any user interaction, and will determine the range of periods that constitute the current fiscal year. The range should start at 1 and end at the last closed fiscal period as maitained on R3.
    I have decided to bite the bullet extract the table T100B from R3. It contains details on all open periods.
    I am trying to load it as master data. Its the first tme I have done this type of work so taking some time.
    I have created the extractor and a characteristic with attributes to hold this info. I then plan to read this data in the variable to work out the range.
    If there is a simpler way to do this then please advise.
    Regards
    Asif

  • How to get the last day of the current open fiscal period?

    hi folks,
         I  have to display the last date of the current open fiscal period in the selection screen. Its just a display only.
          if there is any function module vailable for getting that period, kindly suggest me?
    thanks in advance,
    cheers,
    Adi.

    hi,
    CALL FUNCTION '/BEV3/CHPERIOD_DETERMINE'
    EXPORTING
    date = sy-datum
    version = c_version
    IMPORTING
    period = l_period
    year = l_fiscal_year
    EXCEPTIONS
    period_in_not_valid = 1
    period_not_assigned = 2
    version_undefined = 3
    OTHERS = 4.
    If not use GM_GET_FISCAL_YEAR
    CALL FUNCTION 'GET_CURRENT_YEAR'
    EXPORTING
    BUKRS = '1000' " Company Code
    DATE = SY-DATUM " Date to find fiscal year for
    IMPORTING
    CURRM = w_currm " Current Fiscal Month
    CURRY = w_curry " Current Fiscal Year
    PREVM = w_prevm " Previous Fiscal Month
    PREVY = w_prevy. " Previous Fiscal Year
    Rgds
    Anver

  • Problem with BI-IP and Offsets in Fiscal Period/Year

    Hi freinds,
    I got a request that is linked to BI-IP and Query design.
    The request is that the users should always see a complete year by Fiscal Periods (001.2010...012.2010).
    Now the BI-IP should be dynamic. This means in 007.2010 the user should plan 008.2010...012.2010, the previous month are supposed to be the actuals.
    Problem: I do not want to change the query each month in order to move the planning month. I tried to use an offset with 11 month actuals. Saying "current month/Year", -1,-2,...,-11 using 11 restricted key figures. Same I did for the planning month. I now limited the Data to 2010 in the filter and anywhere I could. However, the result columns are showing all 22 Month. 001.2010...007.2010 are the only once which carry data. all other columns are empty.
    I just do not want to see the columns that do not belong to the current year.
    Any ideas or How to's I can use?
    Thanx and best regards
    Joerg

    Sorry, but I can't imagine how that should work.
    I have two Cubes combined under a Multicube. One containing the Actuals and one for the Forecasts. To show the actuals I have to create a restricted key figure that shows the actuals and for the forecast I have to select differently.
    What is the exit variable supposed to do? I could use a SAP Provided variable to find out about the first month and the actual month, but since it will be a restricted keyfigure it will be shown as sum between the two month. I need for each month of the year a column, and the "open" Month should be input ready. And this should be dynamic.
    Thanks for helping
    Joerg

  • Report to forecast based on fiscal period

    Has anyone done any financial reports which display data based on fiscal periods? The ProjectData service doesn't expose fiscal period (neither does the REST API under _api/ProjectServer). I saw a previous post (http://social.msdn.microsoft.com/Forums/en-US/7999cdf1-16fd-4efd-b7de-964bfeceb8f6/utilization-reports-by-fiscal-period?forum=projectserver2010general)
    that said to use the BI Center in PWA.
    In the case of Project Online I think what it means is that I need to use the Time entity from Timesheet actuals. Is this correct?
    Thanks,
    Roland

    Hi Roland,
    Indeed I couldn't find any fiscal year in the
    project odata references. Maybe other folks on the forum could give you a different answer. But if it turns to be true, you'll either have to deal with the time dimension, or to extract the raw data by day
    then do a transformation with Excel formula, code, VBA...
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, MCP |

  • Report for printing actuals for a fiscal period

    i have a report which prints the actuals for a fiscal year . Its like each country has their own fiscal year representation , The report is currently printing the data based on its own fiscal year representation , i have to modify the report and want it to print based on US(sep-aug) fiscal representation .. like for example for india its printing with may as fiscal period 1 , instead i want to print it with may data as fiscal period 9 and to print the data from sep-aug for all countries. I dont understand how to give the select statement and how to proceed with this. I appreciate if anyone can help me with this.
    Lets load up the yps_costplan table for loading.
    if they didn't specify a project to single load, go get them all.
    if s_objnr is initial.
    if in first fiscal month, "Sept", then get previous years data to
    fill in the last month, month 12.
    if t_t009b-poper = '001'.
    select * from yps_costplan into table i_yps_costplan
    where yyobjnr gt 'PR00000000' and yygjahr ge yprevyear and
    yygjahr lt yplus1year.
    else.
    select * from yps_costplan into table i_yps_costplan
    where yyobjnr gt 'PR00000000' and yygjahr ge p_fiscal and
    yygjahr lt yplus1year.
    endif.
    When getting all, start with 2003, when doing month, use current
    fiscal year only.
    yygjahr between t_yearm1 and t_yearp1.
    else.
    They secified 1 project, go get his data.
    if not s_objnr-LOW cs '*'.
    concatenate s_objnr-low '%' into hold_projn.
    loop at s_objnr.
    if s_objnr-high eq space.
    concatenate s_objnr-low '*' into s_objnr-low.
    s_objnr-option = 'CP'.
    modify s_objnr.
    endif.
    endloop.
    select posid objnr from prps into table t_prps
    WHERE POSID IN S_OBJNR.
    else.
    concatenate s_objnr-low(sy-fdpos) '%' into hold_projn.
    select posid objnr from prps into table t_prps
    where posid like hold_projn.
    WHERE POSID IN S_OBJNR.
    endif.
    if sy-subrc eq 0.
    loop at t_prps.
    if in first fiscal month, "Sept", then get previous years data to
    fill in the last month, month 12.
    if t_t009b-poper = '001'.
    select * from yps_costplan into table h_yps_costplan where
    yyobjnr = t_prps-objnr and yygjahr ge yprevyear and
    yygjahr lt yplus1year.
    else.
    select * from yps_costplan into table h_yps_costplan where
    yyobjnr = t_prps-objnr and yygjahr ge p_fiscal and
    yygjahr lt yplus1year.
    endif.
    if sy-subrc eq 0.
    loop at h_yps_costplan.
    i_yps_costplan = h_yps_costplan.
    append i_yps_costplan.
    endloop.
    endif.
    endloop.
    endif.
    endif.

    Hi Fris,
       You can do this using a process chain and ABAP program.
    1. Create one process chain and create abap program, include in it. Scedule this chain every day.
       Write a code in this ABAP program to check last day of fiscal period and to raise an event to execute 2 process chain or infopackge.
    From system date find currect period
    (Use FM : DATE_TO_PERIOD_CONVERT).
    Find last day of period(Use FM : LAST_DAY_IN_PERIOD_GET)
    Check system date(sy-datum) is equal to last day of period then you can raise an event(Use FM : BP_RAISE_EVENT).
    Use this event to schedule 2nd chains(contains infopackage) or direct scheduling of infopackage.
    You can create event at : SM62.
    Hope it Helps
    Srini

  • Fiscal Period ----- in BEx Report

    Hi All,
    I have a small issue.
    in my report i want to give single selection for fiscal period like 0102005.
    for these selection i want to display all previous period data in separate column
    like 0012005    0022005 ............ 0102005
         KF value   KF value             KF value
    If any know it please guide me step by step.
    Thanks
    samit

    Hi Saha,
    You can do this with the help of variable offsets. Either you can create a series of restricted key figures, or if there are more than one KF being used, you may want to create a Fiscal Period structure andplace it in the columns too.
    What you will be doing in both will be the same. Restrict the Fiscal Period char with the single entry variable, and for other columns, take the same restriction and set an offset of -1. Keep on increasing the value of offsets for each previous selection that you want.
    For more details on how to set offsets, refer to this post:
    Re: TY POS
    Look here too:
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a563fe09411d2acb90000e829fbfe/content.htm
    Hope this helps...

Maybe you are looking for