Current calday or fiscal period to fiscal quarter

Dear Experts,
Is sy-datum calendar day date or fiscal day date?
How to derive the fiscal period or quarter from sy-datum?
Is there a function module to use to convert from current day (either fiscal day or calendar day) to derive the current Fiscal Quarter?
I am not sure which function module can be used. Unable to find in the forum as well.
Please could you provide me some clues?
Thanks.
Best regards
Bass

hi Steve,
try function module 'UMC_FISCPER_TO_CALQUARTER'.
following is sample code in transfer rules, in update rules use COMM_STRUCTURE for TRAN_STRUCTURE.
hope this helps.
data : l_fiscvar type PERIV,
l_fiscper type UMC_Y_FISCPER,
l_quarter like UMC_YS_DIMVALS.
l_fiscvar = TRAN_STRUCTURE-fiscvarnt.
(infoobject 0fiscvarnt)
by default fiscal variant = K4 if not specified
l_fiscper = TRAN_STRUCTURE-fiscper.
call function 'UMC_FISCPER_TO_CALQUARTER'
exporting
I_PERIV = l_fiscvar
I_FISCPER = l_fiscper
importing
ES_CALQUARTER = l_quarter.
RESULT = l_quarter.
ABAP Code Needed to convert Fiscal Period/Year to Quarter
hope this helps.

Similar Messages

  • 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

  • DP Planning in Fiscal Periods and Fiscal Weekly Periods

    Hi,
    We are using fiscal calnedar that starts on first Sunday of Nov with 4 weeks in each period i.e., fiscal year 2009 started on Nov 2nd (Sunday) and first period goes from Nov 2nd (Sunday) to Nov 29th (Saturday) and so on.
    So, our fiscal week also starts on Sunday and ends on Saturday i.e., in first period of 2009 the following are the fiscal weeks
    1 fiscal week - Nov 2nd to Nov 8th
    2 fiscal week - Nov 9th to Nov 15th
    3 fiscal week - Nov 16th to Nov 22nd
    4 fiscal week - Nov 23rd to Nov 29th
    1 fiscal period  - Nov 2nd to Nov 29th
    In storage bucket profile we are able to assign only one fiscal period profile. There is no place to consider fiscal weeks.
    Created two planning books as follows
    1. Planning book with time bucket profile of fiscal periods. It is allowing me to plan in fiscal periods and works as expected
    2. Planning book with time bucket profile of fiscal weeks. It is not allowing me to plan in fiscal weeks
    How to make the fiscal weeks planning book work?
    Thanks in advance,
    Srini

    What version are you using? We asked for this in 2003 at ASUG and although it was delivered in 4.1 we never got it to work, but when we upgraded to 5.1 it works perfectly.
    Define 1 storage bucket profile with fiscal weeks and 2 planning bucket profiles, one with fiscal weeks and the other with fiscal months. Then define your planning area with the SBP fiscal week. Within interactive planning, turn on the header functionality. Choose the first icon on the upper left corner of the planning grid and choose "change periodicity" and you can switch from "fiscal weeks" to "fiscal months".

  • Assignment of different fiscal periods

    Hi all,
    I´m seeking for a solution for different fiscal periods and how it is possible to configure them for reporting.
    My current configuration is that data in BW is assinged
    Sep 10 to Sep 10
    Okt 10 to Okt 10
    Dec 10 to Dec 10
    and so on.
    The correct assignment should be
    Sep 10 to Dec 10
    Okt 10 to Jan 11
    Nov 10 to Feb 11
    Dec 10 to Mar 11
    and so on.
    How and where could this assignment be realized?
    In the DataWarehouse or is it more for Business Explorer or Query Designher definition?
    Thanks for your help.
    Edited by: saplaz on Sep 23, 2010 10:24 AM

    Githen Ronney wrote:
    > You have to map your Calendar Month to Fiscal Period and put Fisacal Variant as M4 at the transformation level.
    Do I have to do it in one transformation? For example: map calendar month to fiscal period and in this transformation I can set also the fiscal variant as M4 (M4 means?)?
    Or is each field mapped separately? Calendar month to fiscal period and fiscal variant to fiscalvariant?
    Because at the moment I´dont have a fiscal variant in my data source which I could use for mapping. The fiscal variant is actual taken out of the accounting area and mapped to 0FISCVARNT at transformation level.

  • Want to make fiscal quarters from fiscal periods in Info design tools

    Dear Gurus:
    I have new reporting requirement for fiscal quarters, currently I have fiscal periods and fiscal years in my business layers. I have two questions from you guys.
    1) Which is the better way to achieve this. Should I try to make it in IDT or Should we make it in BW and then load data again. Also if there is an impact on performance choosing any of the options.
    2) If I made it IDT how should I achieve this, considering I need prompt on fiscal quarters dimension.
    Best Regards:
    Jawad K. Sheikh

    Hi
    If BW as back-end of your dashboard, as per the best practice, pushed down to database level all the predefined time periods and include at the Bex Query level.
    So in the BO dash board we can just drag and drop. So it’s will improve the performance also.
    Please find the below like’s  Universe Optimization Techniques, pushed down all the calculation to database level
    http://scn.sap.com/community/semantic-layer/blog/2014/05/14/universe-optimization-techniques

  • Fiscal period to calender month FM

    Hi Friends,
        Is there any function module to pass the fiscal period and fiscal year value and get calender date, month and year.
    Thanks & Regards,
    Vallamuthu.m

    Hi,
    There are FMs for fetching first and last day of fiscal period.
    * This Function Module will get Start date based on the Period, Year and
    * Fiscal Year Variant
      CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = rlv_gjahr
          i_periv        = rlv_periv
          i_poper        = rlv_poper
        IMPORTING
          e_date         = lv_mfdate
        EXCEPTIONS
          input_false    = 1
          t009_notfound  = 2
          t009b_notfound = 3
          OTHERS         = 4.
    * This Function Nodule will get End date based on the Period, Year and
    * Fiscal Year Variant
      CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = rlv_gjahr
          i_periv        = rlv_periv
          i_poper        = rlv_poper
        IMPORTING
          e_date         = lv_mldate
        EXCEPTIONS
          input_false    = 1
          t009_notfound  = 2
          t009b_notfound = 3
          OTHERS         = 4.
    Ganga

  • Extracting fiscal period

    Hi ,
    Can you please let me know the way of extracting the Fiscal Period(Month/Year) from r/3 as we don't have fiscal Period existing in bw so as per the requirement we have to add the Fiscal Period to all reports in bw.
    I have investigated in R3 and found there is a function module bapi_controllingarea_getperiod which returns Fiscal Period and Fiscal Year based on our company fiscal calendar ,so can we call this function module in a program and concatenate these 2 field to get Fiscal Period(Month/Year) and import this into BW?,If yes then please let me know the procedure to do this.
    Can you tell me if any R3 table holding Fiscal period .
    Main condition is that we have to calculate Fiscal Period thru R3 not in BW .
    Thanks & Regards,
    Rashmi.

    Simplest way to do this
    Depending on whether you have multiple fiscal year variants
    if you do then
    Enhance 0comp_code to get the fiscal year variant per co code
    add this to the cubes along with fiscper 3, fiscper and fiscyear
    then look up to comp code to get the fisc year variant
    then take whatever posting data/cal day has been used for fiscla reporting and put this into the automatic time conversion (you dont need to do a lookup
    if however you are lucky and in 99% of cases - there is always a hard coded fiscal year variant
    then just do the same as above but hard code the fiscal year variant in the update rules or the infoprovider properties
    The difficult thign is tryign to identify th base date for use for the automatic fiscal period time conversion
    FI is easy its cal day - but MM? gr date? po date? ir date?

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

  • 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

  • How to get total number of days in current Fiscal period/year

    Hi,
    I need to get total number of days in current Fiscal period/year (current month) and assign it to an infoobject. I need a routine for this. Is there any function module to get this.If possible pls paste the ABAP code also for this task. Thanks in advance

    here is the FM:
    LAST_DAY_IN_PERIOD_GET
    KJ!!!

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

  • 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

  • Function module reqd for fiscal period using current date

    Hi,
    Is there any function module which gives fiscal period using current date.
    Thnaks,
    Maheedhar

    Hi Maheedhar,
    Try the code below.
    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
    Regards,
    Amit.

  • 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

  • Error when using SAP Exit Variable for Current Fiscal Period (0FPER)

    Hi Friendz,
    My requirement is to execute a query for the current fiscal period. I am using the SAP Exit Variable 0FPER.
    I placed this variable on char. Fiscal year/period 0FISCPER.
    When I execute the Query, it is returning the error: No value could be determined for variable ZVBSYCUR; Variables Contain Invalid Values.
    Please give inputs on how to use this variable.
    Regards...
    Ganesh

    Hello Dipika,
    I am also getting the same error.
    ERROR: Variable 0FPER could not be replaced.
    Yesterday we created one customer exit. But this should not affect the SAP Exit right? Till yesterday the 0FPER variable was working fine. I tried re-installing from BI content, but still getting the same error. If anybody has a clue please let me know.
    Thanks,
    Harshal

Maybe you are looking for

  • Please help me install backup assistant plus

    please help me install backup assistant plus

  • Color Saving Issues with PSE11

    I have Windows 8 and just installed PSE 11. When I save an edited image in PSE11, I lose the color vibrancy severly - it does not seem to matter to what extention (jpeg, bmp, tiff, etc.) I also am using the sRGB profile. Finally, I have also calibrat

  • Sample  Units

    Dear Experts i want to see alternate units of measure in which sample is calculated other then it shows base unit of measure in manual inspection lot screen. Thanks to all

  • What are the css available in OAF?

    Hi, We use CSS in item static styled text. For example CSS=OraInstructionText. May I know like that what kind of CSS available. Thanks, Lavan

  • [JDev11g]: ADF Security and Weblogic 10.3

    Hi i using my owen custom loginmodule configured jps-config.xml using ADF security.. how to deploy to Weblogic 10.3 , is it supported directlly ? where can i put the jps-config.xml , or how to configure? can any body share some steps? thanks