Fiscal Year till date

Hello BW Experts,
I need your help.
There is a KF that I want to restrict by an interval from the first day of the current fiscal year to current day. If anyone can help me on this, it would be great. My problem is similar to if I want to restrict by last 10 days..60 to 30 days etc etc....but here I have a fixed day (first day of current fiscal year) and I have to restrict from that day to current day.
Thanking
Regards
akshat
Will be more than happy to assign points.

Hi,
You need to create a customer exit variable (with range selection) for date.
Then write the below code in CMOD enhancement for Variable.
Case I_VAR.
when 'YOURVAR'.
data:  l_year         type  /bi0/oifiscyear,
       l_first_year type sy-datum.
if i_step = 2.  "After Selection screen is shown
    l_year = sy-datum+0(4).
    read table I_T_VAR_RANGE into l_s_var_range with key vnam = 'YOURVAR'.
    if sy-subrc = 0.
      concarenate l_year '0101' into l_first_dat.
    clear l_s_RANGE.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    l_s_range-low = l_first_date.
    l_s_range-high = sy-datum.
    append l_s_range to e_t_range.
  endif.
ENDCASE.

Similar Messages

  • How to fetch year till date value for earning for current ,last and year

    hi,
    how to fetch year till date value for earning for current ,last and year before that from payroll result
    plz reply soon,
    pratyush

    Dear Pratyush,
    Pick this from CRT.
    Use LDB PNPCE & Fire event GET PAYROLL &
    then you can pick from CRT.
    Hope this helps.
    Kindly reward in case useful.
    Regards & Thanks,
    Darshan Mulmule

  • Return current period based off of current fiscal year and date

    Good Afternoon,
    Is there a way in the webi that I can create a dimension that always reflects the current Fiscal Month based of Fiscal year and date? I have a report that I am trying to show sales for a customer based off the current fiscal month. I would like this report when refreshed to be based off this fiscal month dimension instead of showing each fiscal month or changing it manually. What is the best way to do this?
    I have attached an image that shows current numbers by period (month) and then the YTD Totals. I would like to have my 'Period' column always reflect the current period and the Total column to reflect that months totals based off the period column. So for this period (3), instead of seeing 3 lines for each month I would just see the '3' and the total as $541,310.46, monthly as 412,502.09 and my YTD as 1,080,091.06.
    Any help is always appreciated!
    Thank you,
    Tiffany

    Hi,
    Create a variable
    FlagVar=If([Period]=Max([Period]) In Report;"Show";"Hide")
    And apply block filter of FlagVar=Show
    Are these coming TotalSales  MonthlyGoal YTDSales directly from universe? If they are calculated at report level then you might want to use NoFilter. like =NoFilter([YTDSales])

  • Fiscal Year to Date

    Is there a BC variable in BW that will give me the Fiscal Year to date range.  For example since we are in January, this variable would give me from the Fiscal Year variant that I have which is V6 (July - June), July 1st, 2004 to December 31st, 2004.  Of course this requires no user entry.  Also, is there one for the previous FY?  July 1st 2003 - December 31st 2003?
    Would an SAP-Exit be required for this?
    Thanks,
    Angel

    Hi Roberto,
    I 'm also facing similar kind of issue.in my report Fiscal year and Fiscal period s are the manual input and fiscal variant restricted by K4.
    For example if my user enter  fiscal year : 2009 and fiscal period: 3.
    where i need to display columns dynamically based on posting period (is the manual input).
    User manual input is 03........report should display..........Period 01 | Period 02 | Period 03 | .
    char1 char2 char3 ............................... .......................... 34578 | 569789 | 39590
    User input is 05 ...........................report should display.... Period 01 | Period 02 | Period 03 | Period 04 | Period 05|.
    char1 char2 char3 ............................... .......................... 34578 | 569789 | 39590 | 54656 | 8789
    Please help me out .........as early as possible.
    Regards
    Chandra Sekhar

  • Current month and previous months of fiscal year period data

    Hi All,
    My requirement is end user will enter month ie (fiscal year period ) and in report my requiremnt is to show data in two columns 1.Current month data  and
    2.April till date.
    Please let me know how to do this and please send the coding to be done in CMOS.
    Regards

    Hi,
    In your query, you should have following object :
    in filters:
    fiscal period object, with an user entry variable on it (UE_MONTH)
    in rows/ratios:
    Current month column, with your KF and a restriction on 0calmonth2 with an customer exit variable on it (ie: CE_VAR1)
    same for April column. (CE_VAR2)
    in your customer exit, CMOD, step 2, add these two cases :
    WHEN 'CE_VAR1'.
    READ TABLE i_t_var_range WITH KEY vnam = 'UE_MONTH' INTO
                       intern_range.
    CONCATENATE intern_range-low(6) sy-datum+4(2) INTO l_s_range-low.
    l_s_range-sign   = 'I'.
    l_s_range-opt    = 'EQ'.
    APPEND l_s_range TO e_t_range.
    Same for April, add a new case and just replace sy-datum+4(2) by '04'.
    Hope it helps,

  • FISCAL year from Date  in the Selection Screen.

    Hi Folks,
    Is there any function module which returns the Fiscal year if we provide the date in ranges.
    I mean, I have a select option for date in the selection screen.So,if a user enters the date say 01042007 01042007 it should return the corresponding fiscal year.
    Kindly let me know if anyone here has any idea regarding this.
    Thanks,
    K.Kiran.

    Hello,
    Check these FM's
    FTIS
    FTI_FISCAL_YEAR_MONTH_GET
    KBPA                           Budget/Plan - application-specific
    KBPA_GET_START_FISCAL_YEAR     Determine Start Year for Funds Management
    KBPA_GET_START_FISCAL_YEAR_OPT
    Vasanth

  • How to know fiscal year start date?

    How can I know when is the starting date of the fiscal year of my company from the tables or FM? They told me it is April 1st. Can I get this information from any SAP tables? I just don't want to hardcode that in my report.
    Thank you very much.

    U can try the FM 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
    REPORT ZEXAMPLE.
    DATA: V_FIRST LIKE SY-DATUM,
          V_LAST LIKE SY-DATUM.
    PARAMETERS: P_GJAHR LIKE T009B-BDATJ,
                P_PERIV LIKE T009B-PERIV.
    CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
         EXPORTING
              I_GJAHR        = P_GJAHR
              I_PERIV        = P_PERIV
         IMPORTING
              E_FIRST_DAY    = V_FIRST
              E_LAST_DAY     = V_LAST
         EXCEPTIONS
              INPUT_FALSE    = 1
              T009_NOTFOUND  = 2
              T009B_NOTFOUND = 3
              OTHERS         = 4.
    IF SY-SUBRC EQ 0.
      WRITE:/ P_GJAHR, '\', P_PERIV,
            / 'FIRST DAY:', V_FIRST,
            / 'LAST DAY:', V_LAST.
    ELSE.
      WRITE:/ 'COULD NOT DETERMINE DATES FOR', P_GJAHR, P_PERIV.
    ENDIF.

  • Loop through month and year till date while using a merge statement

    Hello Guys,
    I have 2 tables with the following datas in them:-
    Company
    CompanyId CompanyName
    1                 Company1
    2                 Company2
    3                 Company3
    Employees
    EmployeeId EmployeeName CompanyId StartDate
    1                  Employee1        1                 12/21/2011
    2                  Employee2        1                 01/20/2012
    3                  Employee3        2                 03/23/2012
    4                  Employee4        2                 07/15/2012
    5                  Employee5        2                 01/20/2013
    6                  Employee6        3                 12/17/2013
    Now i want to check, How many people were recruited in the team in the specified month and year? I have the storage table as follows:-
    RecruiterIndicator
    CompanyId Year Month EmployeeRecruited
    1                 2011 12      1
    1                 2012 1        1
    2                 2012 3        1
    2                 2012 7        1
    2                 2013 1        1
    3                 2013 12      1
    This should be a merge stored procedure that should update the data if it is present for the same month year and company and insert if that is not present?
    Please help me with this
    Thanks
    Abhishek

    It's not really clear where the merge to come into play. To get the RecruiterIndicator table from Employess, this query should do:
    SELECT CompanyId, Year(StartDate), Month(StartDate), COUNT(*)
    FROM   Employees
    GROUP  BY CompanyId, Year(StartDate), Month(StartDate)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Asset value date must be in fiscal year of posting date

    Hi,
    When i try to post settlement of AuC in transaction AIBU with parameters:
    document date: previous fiscal year
    asset value date: previous fiscal year
    posting date: new fiscal year
    I know that:
    The asset value date is the value date for Asset Accounting. It can deviate from the posting and document date and be in posting periods already closed for Financial Accounting. <b>However, the posting year and asset value date year must be the same.</b> (SAP documentation).
    But maybe someone knows the way, how to post such a document??
    Regards
    Gosia

    Thanks for Your replay,
    But the pravious year is opened in FI-AA and closed in FI. We can't open previous year in FI.
    Do You know another way to solve it??
    regards
    gosia

  • Restricting fiscal year

    Hi Guru's,
                     I wanna restrict fiscal year till my last year i.e in my selection screen .......if i give 2008 it should restrict till till 2007 values...........
    i created  avariable with interval & selection option ...........
    i'm not able to restrict till last year.........in restrict screen..
    when i take selection as value range........all my variable are disappearing.........
    Could you help to getrid my problem.......
    Thanks in advanc.........
    Regards,
    Vijay

    Hi,
    You can define a variable of type range and set default value for from year 1900. Now whenever you put a selection in the query, it will fetch the data from 1900 to the year which you will be putting in the selection screen.
    Try if this fits in your scenario.
    Regards,
    Yogesh

  • Extract Month & Year  From Date

    Hi All,
    I have a key figure quantity and i want the data on date,for the month and for the year.
    i create the variables for the date,for the month(ie from date to date) and for the year(ie, from date to date) seperatly that means i have three input variables which may sometimes create confusion.
    My problem is that I want to enter only date and the variable itself calculate the month and year from the date so that it returns the data as desired above.
    for eg. : Now i to enter date : 3/14/2009
              enter MTD (FROM/TO) : 3/01/2009 - 3/14/2009
              enter YTD (FROM/TO) : 4/01/2008 - 3/14/2009
    I want to enter only date : 3/14/2009
    and the variable itself extract the month and year till date.
    and also the same variable calculates number of days so that need not to take the formula variable of date difference to calculate the average qty.
    Neha..

    Hi,
    1. Create User Entry Variable on 0CALDAY : Name = ZCDAY.
    2. Craete a Customer Exit Variable on 0CALDAY: Name  = ZMTD.
    3. Craete a Customer Exit Variable on 0CALDAY: Name  = YMTD.
    Properties of Customer Exit Variables.
    Variable reporesents = Single
    Variable Entry = Mandatory
    Processing By = Customer Exit.
    Character = Calender Day
    Here I'm thinking that ZKF is your key figure.
    In columns you create two selections one is for MTD and other is for YTD.
    In MTD selection, drag and drop ZKF and Drag and Drop 0CALDAY and then Right Clcik and Restrict-->
    Selection = Value Range. (In Between) and restrict with the follwoing Variables
    []ZMTD; ZCDAY.
    In YTD selection, drag and drop ZKF and Drag and Drop 0CALDAY and then Right Clcik and Restrict-->
    Selection = Value Range. (In Between) and restrict with the follwoing Variables
    []YTD; ZCDAY.
    Then write the following code in I_STEP = 2.
    DATA: ZT_DT1 TYPE SY-DATUM,
              ZT_DT2 TYPE SY-DATUM,
              ZT_SDT TYPE SY-DATUM,
              ZT_YR(4) TYPE N,
              ZT_DY(2) TYPE N,
              ZT_MT(2) TYPE N,
              ZE_TT(2) TYPE N,
              ZPOPER TYPE POPER,
             ZRELJR TYPE RELJR.
    WHEN 'ZMTD_A'.
      LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZCDAY'.
        IF sy-subrc = 0.
          CLEAR: l_s_range.
          ZT_DY = '01'.
          ZT_SDT = loc_var_range-low.
          ZT_MT = ZT_SDT+4(2).
          ZT_YR = ZT_SDT+0(4).
          CONCATENATE ZT_YR ZT_MT ZT_DY INTO ZT_DT1.
          l_s_range-low = ZT_DT1.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
        ENDIF.
      ENDLOOP.
    WHEN 'ZYTD'.
      LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZCDAY'.
        IF sy-subrc = 0.
          CLEAR: l_s_range.
          ZT_DY = '01'.
          ZT_SDT = loc_var_range-low.
          CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
            EXPORTING
              I_DATE               = ZT_SDT
    *         I_MONMIT             = 00
              I_PERIV              = 'V3'
           IMPORTING
             E_BUPER              = zbuper
             E_GJAHR              = zbdatj
           EXCEPTIONS
             INPUT_FALSE          = 1
             T009_NOTFOUND        = 2
             T009B_NOTFOUND       = 3
             OTHERS               = 4
          IF SY-SUBRC <> 0.
             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
            EXPORTING
              I_GJAHR              = zbdatj
              I_PERIV              = 'V3'
           IMPORTING
             E_FIRST_DAY          = ZT_DT2
    *         E_LAST_DAY           =
           EXCEPTIONS
             INPUT_FALSE          = 1
             T009_NOTFOUND        = 2
             T009B_NOTFOUND       = 3
             OTHERS               = 4
          IF SY-SUBRC <> 0.
             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          l_s_range-low = ZT_DT2.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
        ENDIF.
      ENDLOOP.
    Thanks
    Reddy

  • Please advise me to generate this fiscal closing month dates as shown below

    2007      2008     2009     2010
    October               10/27/2007 10/25/2008 10/31/2009
    November               11/24/2007 11/29/2008 11/28/2009
    December               12/29/2007 1/3/2009     1/2/2010
    January               1/26/2008     1/31/2009     1/30/2010
    February               2/23/2008     2/28/2009     2/27/2010
    March               3/29/2008     4/4/2009     4/3/2010
    April               4/26/2008     5/2/2009     5/1/2010
    May               5/31/2008     5/30/2009     5/29/2010
    June               6/28/2008     7/4/2009     7/3/2010
    July               7/26/2008     8/1/2009     7/31/2010
    August               8/30/2008     8/29/2009     8/28/2010
    September          9/29/2007     9/27/2008     10/3/2009     10/2/2010
    Fiscal calendar closing dates for FY2008-2010.
    ‘Fiscal’ month and ‘Fiscal’ year closing dates will always be on Saturday so
    the fiscal month will include either 4 or 5 complete weeks and fiscal
    year will be 52 or 53 complete weeks. ‘Fiscal’ months and ‘Fiscal’
    years do not close in the middle of a week as ‘calendar’ months and ‘calendar’ years may do.
    For example, Fiscal April 2008 started on 3/30/2008 (Sunday, the day after the close of Fiscal March 2008)
    and ended on 4/26/2008 (Saturday). Fiscal Year 2008 started on 9/30/2007 (Sunday)
    and ends on 9/27/2008 (Saturday).
    thanks,

    Hi,
    try this (vers. 10g/above)
    SQL> with t as (  -- "SAMPLE DATA"
      2  select to_date('10/21/2007','mm/dd/yyyy') dt from dual
      3  ) -- "END SAMPLE DATA"
      4  select
      5  decode(to_char(add_months(dt, ctr),'Mon'),'Dec',
      6          next_day(add_months(dt, ctr-1)+35 , 'Saturday')
      7         ,next_day(last_day(add_months(dt, ctr)) - 7, 'Saturday')
      8  ) col1
      9  ,decode(ctr,0
    10        ,next_day(add_months(last_day(add_months(dt, ctr)), 12) - 7,   'Saturday')
    11        ,next_day(add_months(last_day(add_months(dt, ctr-1))+35, 12) -7,   'Saturday')
    12  ) col2
    13  ,decode(ctr,0
    14         ,next_day(add_months(last_day(add_months(dt, ctr)), 24) -7,   'Saturday')
    15         ,next_day(add_months(last_day(add_months(dt, ctr-1))+35, 24) -7,   'Saturday')
    16  ) col3
    17    from t
    18    model
    19    dimension by (0 dim)
    20    measures ( 0 ctr)
    21    rules iterate(12)
    22    (  ctr[iteration_number+1] = ctr[iteration_number]+1 )
    SQL> /
    COL1        COL2        COL3
    10/27/2007  10/25/2008  10/31/2009
    11/24/2007  11/29/2008  12/5/2009
    12/29/2007  1/3/2009    1/2/2010
    1/26/2008   1/31/2009   1/30/2010
    2/23/2008   2/28/2009   3/6/2010
    3/29/2008   4/4/2009    4/3/2010
    4/26/2008   5/2/2009    5/1/2010
    5/31/2008   5/30/2009   5/29/2010
    6/28/2008   7/4/2009    7/3/2010
    7/26/2008   8/1/2009    7/31/2010
    8/30/2008   8/29/2009   9/4/2010
    9/27/2008   10/3/2009   10/2/2010
    10/25/2008  10/31/2009  10/30/2010
    13 rows selected

  • Fiscal year 2010 Not allowed while creating Process order in COR1

    Dear Friends,
    We have gone SAP live in the month of October. The fiscal yeat we are using is 2011 as the client is Indian client. I have made the fiscal year variant for 2011 (V3). The FI document posting with Fiscal year 2011. It is also creating the Controlling document and Profit center document without any problem.
    We have also made the period open as 2011 in MMpv and MMRV. The goods receipts is working fine and the finance entry and material document gets generated for the fiscal year 2011.
    Now we are creating the process order in COR1 and getting the error message Fiscal year 2010 not allowed as below.
    Fiscal year 2010 is not allowed
    Message no. F5568
    Diagnosis
    The fiscal year entered (2010) is different from the fiscal year derived from the posting date and fiscal year variant (2011).
    System Response
    Error.
    Procedure
    Correct the fiscal year entered.
    In KP26 we have maintianed for activity price for 2010 &  2011 and the system is picking the data for the fiscal year 2010 data and not the FY 2011 data.
    I have checked in OKEQ (Costing version '0') The valide start date for FY2011 is 01.04.2010.
    Is there any other place to maintain the fiscal year in Controlling area or Prodduction Planning???
    I last my patient last 5 days doing R&D. Can any one help me where the fiscal year is picking and why it is picking FY 2010??
    Regards,
    Devendran

    Hi Ajay,
    Thank you for your comments. I have checked the Factory calendar and that is 2010 (January to December). We have tried to change to 2011 but the system automatically picking the date from January 1st 2011 to 31st December 2011. I am unable to create calendar year with date from 01.04.2010.
    I have discussed with my PP consultant about this issue, he is telling the factory calendar nowhere related to Fiscal year. Do you have any idea how to change the factory calendar of 2011 from 01.04.2010 to 31.03.2011??  Is there any there reason why my system considering the Fiscal year 2010 instead of 2011???
    Your inputs will defenitely help me to get an clue.
    Regards,
    Devendran

  • How to create a year to date filter?

    All,
    I would like to create a date range filter on the opportunity close date column so that the report retrieves records with a close date between the beginning of the current calendar year and the current date.
    I am having trouble using date/time functions to establish the first day of the current calendar year.
    Any help is appreciated.
    Thanks,
    Dan

    I'm so sorry... I missed this thread and have not replied.
    You could place a filter on the Fiscal Year column in the Date Dimension folder of your subject area to get Fiscal Year to Date (most of the time):
    Date."Fiscal Year" = VALUEOF(NQ_SESSION.CURRENT_YEAR)
    This would likely not work, however, if the current year is 2008 and you are already in Fiscal Year 2009.
    To allow for this, your filters become much more complex. I will use Opportunity Close Date in my example.
    First, we want to ensure that no data in the report is more than one year old...
    TIMESTAMPDIFF(SQL_TSI_DAY, Opportunity."Close Date", CURRENT_DATE) < 366
    With the next filter, we want to ensure that the data in the report is not from months outside of the fiscal year. You can do this with a CASE statement in a hidden column.
    CASE WHEN MONTH(Opportunity."Close Date") > 06 AND YEAR(Opportunity."Close Date") < VALUEOF(NQ_SESSION.CURRENT_YEAR) THEN 'Current Fiscal Year'
    WHEN MONTH(Opportunity."Close Date") < 06 AND YEAR(Opportunity."Close Date") = VALUEOF(NQ_SESSION.CURRENT_YEAR) THEN 'Current Fiscal Year'
    ELSE 'Not Current Fiscal Year' END
    Your Filter will be:
    CASE WHEN MONTH(Opportunity."Close Date") > 06 AND YEAR(Opportunity."Close Date") < VALUEOF(NQ_SESSION.CURRENT_YEAR) THEN 'Current Fiscal Year'
    WHEN MONTH(Opportunity."Close Date") < 06 AND YEAR(Opportunity."Close Date") = VALUEOF(NQ_SESSION.CURRENT_YEAR) THEN 'Current Fiscal Year'
    ELSE 'Not Current Fiscal Year' END = 'Current Fiscal Year'
    Assuming my code is correct, July 2007 - June 2008 evaluates as current fiscal year and July 2008+ evaluates as not current fiscal year.
    There are bound to be other ways to accomplish this, but this is one method that should work.
    Regards,
    Mike L

  • About fiscal year

    HI,
    There is one query regarding fiscal year. In our report we made fiscal year variants as a compounding object in fiscal year info-object.
    So that when we check data in report that with respect to fiscal year variant, data comes in different column.
    Like if fiscal year variant is K4 and BW then there will be different column for some particular key-figure.
    But i want these value in one column. It can be possible, if i remove compounding object (fiscal year variants ) from fiscal year,
    but i can't do this becoz this fiscal year is used in other query also.
    So can i create some different info-object for fiscal year in which fiscal year variants should not used as a compounding object.
    But value of fiscal year  should come with respect to fiscal year variants.
    Thanks
    Devesh Babu

    Hi,
    Put Fiscal year variant in the rows. Now create a formula and add all key figures which display data for diff fisc variants, like KF1 might display data for K4, KF2 might display data for V3, etc. Add KF1 + KF2 in the formula and hide the individual KF. But you should have fisc variant in rows, otherwise the data would be wrongly added.
    Best Regards,
    Murali.

Maybe you are looking for

  • Process chain failing while executing DTP

    Hi All, My process chain is failing while executing DTP. Error i got is:  OBJECTS_OBJREF_NOT_ASSIGNED Access not possible using 'NULL' object reference. The dump is occuring in method : GET_FIELD_LIST_INBOUND TRY.       CALL METHOD cl_rstran_model=>f

  • How to get a field that using variable in order to create a query

    Hi, I found a difficulty when creating a query. so, I would like to ask you some question. 1. How to get a field that using variable which that field I want to put it in my query? For example, I would like to take quantity field in inventory audit re

  • How to configure Dynamic Reloading?

    The Java Developer's Guide of iAS 6.0 describes the Dynamic Reloading feature can be turn on/off by the registry entry: SYSTEM_JAVA\Versioning\Disable Would you mind let us know the full path of this entry? We cannot find it from kregedit. Thanks! An

  • Cannon smartbase mp360 or bin it and get a budget inkjet

    Hi all, I need a really quick response if possible as I have to get a printer working on my mac by the end of next week. I have just bought a macbook with Tiger and cannot get my cannon smartbase mp360 to work. So far the only solution I have found i

  • Dataset_r

    How can we send a flat file into Application layer Say this I have flat file in this format        1234          ravi           20070102        8932          suresh      20060205 How do I send this to apllication layer . And get a <name>.txt.........