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.

Similar Messages

  • 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

  • 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.....

  • 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

  • Using fiscal period and Fiscal quarter reporting seemlessly in a BI Query

    Hi,
    We have a very specific issue. Reporting the Fiscal Period( in our
    case we have 53 fiscal periods) and Fiscal Quarter( we have 4 quarters)
    in the same query seamlessly as we would have done using Calander Month
    and Calander quarter in other reports that uses SAP delivered standard
    time dimensions.
    However unlike the Calander time dimension (SAP provided all
    possible...0CALDAY, 0CALWEEK, 0CALMONTH, 0CALQUARTER, 0CALYEAR) where you have all of these inside your info provider, you can get
    aggregation on week, month, quarter etc in your query seamlessly, The Fiscal Year/Period offers a problem in doing report seamlessly.
    When we delve into Fiscal realm, SAP only provided with 0FISCVARNT,
    0FISCPER, 0FISCYEAR and a special period 0FISCPER3. It doesn't provide
    anything like 0FISCQUARTER etc and rightly so, because you can have
    only one 0FISCVARNT in the Time dimension and can have related periods
    (0FISCPER) only for a Row of data in your infocube. For example if you need to model as per the Fiscalweek, you can create a custom Fiscal year variant (Say z1) and can configure to have only 53 periods (Mapped to 0FISCPER) representing
    53 Fiscal WEEK. Similarly for mapping Fiscal Quarter you can create
    another fiscal year variant (Say Z2) and have only 4 periods (mapped to
    0FISCPER also in this case) to represent the 4 Fiscal Quarter. However
    the issue is that for one record you can only map either of those and
    not both since you can only have one Fiscal year variant in one row of
    data in the info provider.
    For example
    If I have two rows OF DATA coming from different sources (One FOR
    Fiscal Week and another for Fiscal Quarter) I can have the following in
    my info provider.
    1> Example data in Fiscal
    Char1 Char2 0CALDAY 0FISCVARNT 0FISCPER Quantity
    X  ......  y .....10/22/07 ....Z1 ....           43’2007 .......10
    X .......  Y .....10/22/07 ....Z2 ....          Q3’2007 .......20
    The issue is how do I report the Quantity in a query in Quarter Q3 as
    (10 + 20 = 30) since both the rows corresponds to FISCAL Q3’2007?
    (Please note that Fiscal week 43’2007(For VARIANT Z1 ) actually is
    Fiscal Quarter Q3’2007( For Fiscal Variant Z2) as per our
    configuration of Fiscal Year Variant configuration Z1 and Z2)
    The same is very simple when I have infoprovider with CALENDAR Time
    dimensions , for example if we don’t have any fiscal reporting
    requirement and just report on calendar time dimension the record in
    the info provider would look like the following ( example)
    2> Example Data in CALENDAR DIMENSION
    Char1 Char2 0CALDAY 0CALWEEK 0CALQUARTER Quantity
    X ........ y .......10/22/07 .......43’2007 .......Q3’2007 .......10
    X ........Y .......10/22/07 ....... 44’2007 .......Q3’2007 .......20
    Here we can use both 0CALQUARTER and get the data aggregated on the
    quarter level in addition to the 0CALWEEK.
    To solve this issue, One option that we are thinking of Using 0CALQUARTER to represent the
    Fiscal Quarter and use Update rule to populate this one. For example
    THE example 1 can be as follows.
    1A> Example of using 0CALQUARTER along with 0FISCVARNT and 0FISCPER
    Char1 Char2 0CALDAY 0FISCVARNT 0FISCPER 0CALQUARTERE Quantity
    X .......y .......10/22/07 ..............Z1 .......43’2007 .......Q3’2007 ..............10
    X .......Y .......10/22/07 ..............Z2 .......Q3’2007 .......Q3’2007 ..............20
    In this case we would populate the 0CALQUARTER by the actual Fiscal
    Quarter and then can use both as per example 2 above. But this is not a
    smooth option since we have various other info providers to join and
    report based on solely Fiscal Quarter etc…
    I am certain that this issue have already been solved by somebody as this bound to happen in any finance application.
    Would appreciate if we can get some light on this regarding the data modelling, reporting etc.
    Thanks
    Arun G.

    You have yourself suggested a solution, which is fine,
    Other option is to have a new characteristic Fiscal Qtr in all the infoproviders ans update the same using a routine in the updaterule depending on the fiscal year variant.
    for eg. for transaction with variant Z1 in one case you can say if fiscal week 01 between 01 to 13 the Fiscal Qtr should be update with1 and if it is between 14 to 26 then update fiscal qtr with 2 and so on.
    For other Variants Z2 you write a different login in the routine ans so on.
    so for all the data irrespective of the variant you will have the qtr as either 1 or 2 or 3 or 4 and you can report on this fiscal qtr.
    assign points if it helps.
    regards
    Venkata Devaraj

  • Quarter, halfyear and more for Fiscal period

    Hi experts,
    i have a query requirement to create the quarter and halfyear of the fiscal period.
    The problem is that our fiscal period does not correspond to the natural year, starting in october.
    I tried to use the standard 0CALQUART1 and 0HALFYEAR1 and doing a map from 0FISCPER in update rules, but as expected, the result was that 010.2005 = 4.
    I need to get a 010.2005 = 1, and if possible to get the year also... but this is another problem.
    Is there any standard rule to get it?
    Thanks a lot for your help
    Ignacio

    hi
    which fiscal variant ur using.
    or else you can go for update routines are Transfer routines to update the infoobjects
    Hope this helps
    Shiva

  • Fiscal Period and Calmonth issue in SSM 7.0

    In Fiscvar V3 Where Fiscal Year is not from Jan to Dec but April to Mar, PAS not reading Fiscal Period correctly.
    Workaround suggested is to Create BWFISCPERINFO document in PAS under the model and mention periodicity as
    MONTHLY
    2009001 200904 
    which means ist Fiscal Period of 2009 = 4th Month(april) of 2009.
    The BW Query with oFiscper as Time Dimension is not importing data beyond March 2009 while BW Query
    with 0Calmonth is populating upto current month of July 2009. What could be reason for this anaomaly in data import ?
    M Akhtar

    Good day M Akhtar,
    I would suggest rechecking your BW Query with oFiscper to make sure that you have set the fiscal period to start in March and not set the data to be imported to only be March. It may be that your current settings are only bringing in the data for March.
    Regards,
    Bob

  • Dynamic VARIANT FOR Fiscal Period and dates

    Hi
    We have a custom transaction with date and fiscal period as vairable parameters and need to know if we can generate a DYNAMIC VARIANT for these based on FISCAL PERIOD.
    Replies will rewarded

    Hi,
              Use transaction OB29, this is in the IMG.
    Or
    Path..
    SPRO -> SAP REFERENCE IMG -> FINANCIAL ACCOUNTING -> FINANCIAL ACCOUNTING GLOBAL SETTINGS -> FISCAL YEAR -> MAINTAIN FISCAL YEAR...
    <b>Reward points</b>
    Regards
    Message was edited by:
            skk

  • Consolidating with fiscal periods and calendar periods

    Hi, Does anyone have any information out there on how to configure the system to pull data for fiscal period for some companies and calendar period for other companies?  Or any horror stories about trying to do it that way.
    Thanks.

    Stacy,
    For consolidation as a whole only one fiscal year variant is allowed. However, there is possibility of collecting data of different fiscal year variant and using appropriate currency translation rates as per that units fiscal year variant.
    For example, if you have consolidation fiscal year variant as 31st March ending and you have one unit X as fiscal year variant 31st december ending, in this case the 12th period data of consolidation unit X will be translated using exchange rate as on 31st dec and not as on 31st March.
    Hope this might be helpful to you...though no direct response to your question.
    Best Regards,
    UR

  • Fiscal Period and MM period.

    Hi all,
    Can somebody explain the difference b/w Fiscal Period and MM Period in business context. Detail explanation will be helpful.
    thanks & regards,
    Prashant Rathore.

    Dear,
    Fiscal Year Definition
    Usually a period of twelve months for which a company regularly creates financial statements and checks inventories.
    The fiscal year may correspond exactly to the calendar year, but this is not obligatory.
    Under certain circumstances a fiscal year may be less than twelve months (shortened fiscal year).
    Fiscal Year Structure
    A fiscal year is divided into posting periods. Each posting period is defined by a start and a finish date. Before you can post documents, you must define posting periods, which in turn define the fiscal year.
    In addition to the posting periods, you can also define special periods for year-end closing.
    In General Ledger Accounting, a fiscal year can have a maximum of twelve posting periods and four special periods. You can define up to 366 posting periods in the Special Purpose Ledger.
    What is the Use of Fiscal Year
    In order to assign business transactions to different time periods, you must define a fiscal year with posting periods. Defining the fiscal year is obligatory.
    You define your fiscal year as fiscal year variants which you then assign to your company code. One fiscal year variant can be used by several company codes.
    You have the following options for defining fiscal year variants:
    Fiscal year same as calendar year
    Fiscal year differs from calendar year (non-calendar fiscal year). The posting periods can also be different to the calendar months.
    You define your fiscal year variants in Customizing for Financial Accounting as follows: Financial Accounting Global Settings ® Fiscal Year ® Maintain Fiscal Year Variant (Maintain Shortened Fiscal Year)
    MM Periods
    Closing operations are periodic tasks and can be subdivided in FI as follows:
    u2022     Day-end closing
    u2022     Month-end closing
    u2022     Year-end closing
    The closing operations component helps you prepare and carry out the activities required for day-end, month-end, and year-end closing. For this purpose, the system provides a series of standard reports that you can use to generate evaluations and analyses directly from all of the posted account balance. The system helps you carry out the following:
    u2022     (Time-based) accruals/deferrals of expenses and revenues
    u2022     Creating the balance sheets and P&L statements
    u2022     Documenting the posting data
    Prerequisites
    To carry out the closing operations in G/L accounting, you first need to carry out the closing operations in the subledger accounting areas you are using. These include:
    u2022     Accounts receivable and accounts payable accounting
    u2022     Inventory accounting
    u2022     Asset accounting
    u2022     Payroll accounting
    Regards,
    Syed Hussain.

  • How to get starting date and ending date of the given Fiscal Period

    Hi Friends,
    In my Selection screen parameter, I've Fiscal year and Period , I want to get the starting date and ending date with the Fiscal period.
    How to get and throught which FM.
    Pls advise.
    thanks&regards
    Sankar.

    Hello Sankar,
    Check the FM PERIOD_DAY_DETERMINE.
      DATA :
             l_periv     TYPE periv,
             l_blart     TYPE blart,
             l_fday     TYPE bkpf-budat,      "First day in period
             l_lday     TYPE bkpf-budat.      "Last day in period
    * Fetch the fiscal year variant from T001
      SELECT  SINGLE periv  INTO TABLE l_periv
      FROM t001
      WHERE bukrs EQ p_bukrs.
    * Get first day/last day
          CALL FUNCTION 'PERIOD_DAY_DETERMINE'
            EXPORTING
              i_gjahr              = p_gjahr
              i_monat              = p_monat
              i_periv              = l_periv
            IMPORTING
              e_fday               = l_fday
              e_lday               = l_lday
            EXCEPTIONS
              error_period         = 1
              error_period_version = 2
              firstday_not_defined = 3
              period_not_defined   = 4
              year_invalid         = 5
              OTHERS               = 6.
    Hope this helps.
    BR,
    Suhas
    Edited by: Suhas Saha on Jan 9, 2009 2:08 PM

  • Reports with variables on fiscal year and want to display the current fiscal period values

    Hi
    i wan to display the fiscal periods in one of the reports when i give input for fiscal year, let say i will pass the fiscal year  as 2012 , then i need to display the revenue for 2012.01,2012.02,2012.03,....2012.12 and in another selection i need to restrict the revenue with the previous year.
    how can we achieve that.

    Hi,
    Refer this thread:Same thing has been discussed.
    http://scn.sap.com/thread/3365593
    Regards,
    AL

  • Customer Exit for Deriving Current Fiscal Period, Period+1 and Period+2

    Hi all,
    I have created three customer exit variables in my query for custom info object ZFISCPER (Fiscal Year PEriod), Fiscal 1, Fiscal 2 and Fiscal 3. I want to write a customer exit to derive the current period, current 1 and current2 period's respectively for these variables based on the system date. The format of the period is YYYY0MM ( 2009004). Could someone give me the exact code i can plug in CMOD for these
    Thanks a lot
    Rashmi.

    Hi Rashmi,
    I think you need only one customer exit variable. Other can be derived by setting an offset to current Fiscal Period.
    Check the BI content variable for current fiscal period. Use this variable with an offset for derving the other periods (e.g. SAP Exit variables (0FPER, 0FYTCFP, 0FYTLFP). So you have to write no own code...
    Other option is to check how SAP exit is working and building own variable based on this code.
    Check the following link to get information how to do this:
    Reg Variable 0FYTCFP
    Regards
    Andreas

  • Problem with a new fiscal period

    Hello everybody,
    I got strange behaviour with my program. But first of all let me tell you that I got SAP BOne ver. 2005A SP.1 PL46, and I got fiscal period divided in month
    My program that in 2009 worked fine, but in 2010 dosn't work at all. I don't know if is related to the new fiscal period or the new series.
    The program is pretty simple, for every invoice with a commission it create a Vendor Invoice in the OPCH. So that means that I created all the agents as vendor BP. So for instance for an invoice of 50'000u20AC it create to a Supplier Service Invoice of 1'500 to that agent.
    I made test with the TaxDate in order to be sure that was related just to the 2010 fiscal period but still failed.
    Any idea why?
    Thank you
    Roberto

    Hello Roberto,
    Check the following thread Get the Current Period
    You will find out everything about series, and config of series (probably the period indicatior of your new series!)
    Regards,
    J.

  • Closing and opening in new fiscal period

    Hi
    I am going to close last fiscal period and open new period . What should I do step by step for closing inventory and BP and Accounting and Open them in new Period. does system has any facility to do these step automatically.
    Thanks in advance

    PEC is a tool to use for you to close any periods.  What it does is mainly creating certain retained earning entries.  There is no way to do anything automatically for you.  You may need to define new fiscal periods first before you do Period-End Close.
    Thanks,
    Gordon

Maybe you are looking for

  • Custom infotype creation issue

    Hi Experts, I have a requirement to create a custom infotype based on certain conditions. But there is a problem while saving data in the infotype. The infotype is populated from another infotype automatically through dynamic actions. But while savin

  • Exchange 2007 SP3 failed and cannot comeback to upgrade Menu

    Hi team, I plan to migrate from Exchange 2007 to 2013. so I wan to upgrade exchange 2007 from SP1 to SP3 I have two exchange 2007 SP1 Server, Server 1 CAS+HT. Server 2 CAS+HT+MBX. I already upgrade Server1 (CAS+HT). upgrade success without issue. but

  • Can i import .ram files to my i-Pod??

    I have some .ram files on my desktop which are downloaded from internet. If i import them to my library in i-Tunes they are not imported. No error is displayed. Cant i import .ram files to my i-Pod. Please help me M9282FE   Windows XP     Windows XP

  • Flash and IE troubles

    I've made a website in DWMX2004, but my work in flash appear with a grey square around in IE6 when you pass the mouse over it, but in FireFox doesn´t. Both have Flash Player 8 installed and the flash work were made in Flash Mx 2004. I have the site r

  • Printer Listener for all printer option happening in the system

    i want an application in such a way that if there is any printer operation happening in any of the application installed in the os. i have to popup our application before printing