Get Fiscal Period based on Fiscal Year

Hello Experts,
I have one query. I wanted to get fiscal period based on fiscal year entered in selection screen.
I tried to find the FM for it but didn't get it. Can you suggest me any FM which gives in Fiscal period based on fiscal year in FI?
Regards,
Neha

Hi,
Check the following link:
How to get fiscal period based on date and Fiscal year?
http://www.sapdev.co.uk/fmodules/fms_fiscalyr.htm
Regards,
Bhaskar

Similar Messages

  • To get Fiscal period based on Fiscal Year

    Hi Guys,
               Can anybody tell me how to get Fiscal period based on Fiscal Year?
    Thanks,
    Arpan

    Hi Anshu,
    Have a good day.
    I need to convert fiscal year(2011) to fiscal period(2011001).
    Fiscal year(key field in data source) mapped to the fiscal period(key field in infoprovider).
    But in the transformation when I have mapped these fields, data is not coming propperly into the infoprovider because in the transformation its not converting fiscal year to fiscal period.
    This is the scenario. Please help.
    Thanks,
    Arpan

  • How to get fiscal period based on date and Fiscal year?

    Hi Guys,
               Can anybody tell me how to get Fiscal period based on date and Fiscal Year or fiscal year variant?
    Thanks,
    Gopi.

    Hi,
    Please refer the code below:
    *: Report:  ZFISCALYR                                                  :
    *: Date  :  2004                                                       :
    *: Description: Demonstrates how to return the corresponding fiscal    :
    *:              year and posting period for a company code and posting :
    *:              date or posting date and fiscal year variant.          :
    REPORT  zfiscalyr NO STANDARD PAGE HEADING.
    TABLES: ekko.
    PARAMETERS:     p_bukrs TYPE ekko-bukrs,
                    p_bedat TYPE ekko-bedat.
    DATA: gd_fiscalyr  TYPE bapi0002_4-fiscal_year,
          gd_fiscalp   TYPE bapi0002_4-fiscal_period.
    DATA: gd_fiscalyr2 TYPE T009B-BDATJ,
          gd_fiscalp2  TYPE bapi0002_4-fiscal_period.
    DATA: gd_periv     TYPE t009-periv.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    * get fiscal year and period - (requires date and company code)
      CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
        EXPORTING
          companycodeid = p_bukrs
          posting_date  = p_bedat
        IMPORTING
          fiscal_year   = gd_fiscalyr
          fiscal_period = gd_fiscalp.
    * Alternative fiscal year function module
    * - (requires date and fiscal year variant code from T009 table)
    * gets first entry in fiscal year variant table (will need to choose
    * correct one from table rather than just using first entry)
      SELECT SINGLE periv
        FROM t009
        INTO gd_periv.
    * get fiscal year and period
      CALL FUNCTION 'DETERMINE_PERIOD'
        EXPORTING
          date                      = p_bedat
    *    PERIOD_IN                 = '000'
          version                   = gd_periv
       IMPORTING
          period                    = gd_fiscalp2
          year                      = gd_fiscalyr2
       EXCEPTIONS
          period_in_not_valid       = 1
          period_not_assigned       = 2
          version_undefined         = 3
          OTHERS                    = 4.
    *END-OF-SELECTION.
    END-OF-SELECTION.
      WRITE:/ 'From function module: BAPI_COMPANYCODE_GET_PERIOD',
            / 'Fiscal year is:', gd_fiscalyr,
            / 'Fiscal period is:', gd_fiscalp.
      SKIP.
      WRITE:/ 'From function module: DETERMINE_PERIOD',
            / 'Fiscal year is:', gd_fiscalyr2,
            / 'Fiscal period is:', gd_fiscalp2.
    Thanks,
    Sriram Ponna.
    Edited by: Sriram Ponna on Apr 17, 2008 8:59 PM

  • 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

  • FM to get open period based on company code

    Could you pls tell me the FM which can get open period based on the company code?
    right answer will be rewared for sure.
    Sujatha

    Hi,
    I m not sure. Just check this out.
    CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
        EXPORTING
          companycodeid = p_bukrs
          posting_date  = p_bedat
        IMPORTING
          fiscal_year   = gd_fiscalyr
          fiscal_period = gd_fiscalp.
    CALL FUNCTION 'DETERMINE_PERIOD'
        EXPORTING
          date                      = p_bedat
    *    PERIOD_IN                 = '000'
          version                   = gd_periv
       IMPORTING
          period                    = gd_fiscalp2
          year                      = gd_fiscalyr2
       EXCEPTIONS
          period_in_not_valid       = 1
          period_not_assigned       = 2
          version_undefined         = 3
          OTHERS                    = 4.
    check this link.
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    Regards
    Vadi
    Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 5:41 PM

  • 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])

  • How to get the last day according to fiscal period input in selection scree

    Hello expert
    how to get the last day of fiscal period input.
    the fiscal period inculdes 1-16
    when fiscal period is greater than 12, only calculate the last day of 12nd month
    your solution will be apprecaited, FM existing?
    thank you
    Kevin

    Hi,
    when you give a particular date in any month
    the following fm will give you the last date of that month
    here you can give
    R_FDATE-HIGH  as 01 and month as the period you wnat and year for current year
    concatenates '01'  month year  into r_fdate-high separated by '.'.
    then it will give g_ltdt for that month and year which wil be the last date of that month
        CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
          EXPORTING
            DAY_IN            = R_FDATE-HIGH
          IMPORTING
            LAST_DAY_OF_MONTH = G_LTDT
          EXCEPTIONS
            DAY_IN_NO_DATE    = 1
            OTHERS            = 2.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    thanks & regards,
    Venkatesh

  • Offset for Fiscal Period

    Hi All,
    I have 2 columns in my report. When variable window pops-up, user enters value for 2 mandatory field. (From Fiscal Period and To Fiscal Period). Once i get the value of range, i generate one column based on business logic. Now, in the second column I want to show the results for the same period but for previous yr.
    So, if user entry is 001.2007 to 002.2007, first column would display result for 001.2007 to 002.2007, while second column should display result for 001.2006 to 002.2006. I have 2 saperate variables for user entry and i have restricted my KF based on "Value Range" & "Between".
    When I m trying to give offset of '-12' for second KF, it accepts the offset for both the variable in the range, but it displays the result for 001.2006 to 002.2007. So, basically it manipluates offset for just one variable.
    Can anybody tell me what should i do??

    Hi Danny,
    In the mentioned link, read Selecting value range limits
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a563fe09411d2acb90000e829fbfe/content.htm
    This is what I was thinking of...

  • Two Fiscal Period in Infocube :? possible

    Hi Experts
    I have two fiscal variants one for weekly periods  and other for monthly periods in R/3
    In BW I want to do reporting on fiscal week and fiscal month .In BW we can use one fiscal variant in one infocube which determines the period whether it is weekly or monthly
    But If your reporting requirement is to Report fiscal week and Fiscal month from one Infocube how to do that
    Also I am aware of Function module who gives to 1st  day of period based on first fiscal variant and then you can use this day and find out the second period based on second fiscal variant
    but how to use these function modules as this convert one period into other period based on fiscal variant in a infocube as infocube will have one fiscal period

    This is solved

  • Allow two fiscal periods

    I have the following situation:
    My company fiscal period now used is from Jan - Dec.
    However my HQ uses fiscal period from Apr - Mar.
    When we try to enter budget entry in Tcode 7KE1, KP06, FSE5, it only allows to process for half fiscal periods, ie Jan - June and Jul - Dec. However, I would like to maintain the figures for up to Mar the following year to meet my HQ reporting.
    Is there anyway to maintain to fiscal year variants. One main and the other for reporting purposes?
    regards
    Shakeer

    Hi Expert,
    Your company fiscal period is using Fiscal Year -  Jan - Dec - K4.
    However your HQ wants to use Fiscal Year -  Apr - Mar - V3.
    Scenario - 1:
    If you are using ECC6.0 Version, then just create one Non-Leading ledger for your HQ, which is to be assigned with Fiscal year - V3 and it leads to post the transaction parallel to the HQ Fiscal year.
    Scenario - 2:
    Use Special Purpose Ledger to use Fiscal Year - V3, which need to customize the Special Purpose ledger.
    Regards,
    GK
    SAP

  • Issues with statistical modeling in calendar months vs 13 fiscal periods

    In our demand planning, we plan at the fiscal period level (13 fiscal periods across a year - not matching with calendar months or year).  We are having issues (strange results) trying to run the statistical modeling at the fiscal period level versus the calendar month level.  Is there a way to run the stat modeling over fiscal periods rather than calendar months?  Can we run stat modeling over a specific date range rathn than including the current month?

    Hi Stephen, I guess I can assume the following:
    1) In the master forecast profile, you have maintained the period indicator and the fiscal year variant
    2) You are choosing a forecast strategy in univariate profile (?) that makes use of seasonality, and you are trying to maintain the number of periods in a season as 13 (in our case, our periods are custom, but there are still 12 periods, so different from your case)
    3) Your history horizon in master forecast profile is more than the number of periods in the season i.e. history has more than 13 periods of data
    If above things are already done and you still face issue when you try to use 13 periods in a season, looks to me like a SAP bug, and it would be best to raise an OSS message to SAP.

  • Fiscal Period in 0PA_C01

    The cube 0PA_C01 works on the basis of calmonth and it is easy to map it to fiscal period if each fiscal period corresponds to a whole calendar month.
    But we are facing a peculiar situation where the Client's fiscal periods are irregular and do not correspond to exact calendar months.For example Fiscal Period 01.2009 corresponds to the period 02.04.2009 to 29.04.2009 and not to Calendar month April'09.
    In such a case it is becoming a challenge to extract the headcount on the basis of fiscal period from the cube 0PA_C01.
    Could any one offer a clue as to how this could possibly be achieved?

    Hello Rajeev,
    you can always use FM DATE_TO_PERIOD_CONVERT during extraction in ZXRSAU01 or in transfer/update rules on BW. Remember to transfer Global Settings from source system to BW when using second method. Don't forget about transfer data to 0FISCVARNT as well.
    Thanks = points.
    Best Regards,
    Maciej Janik

  • Scheduling process chain once every fiscal period (4/4/5)

    I'd like to schedule a process chain to run on the second day of each fiscal period. Our fiscal periods are 4 weeks/4 weeks/5 weeks, so specifying a period of 4 weeks wouldn't work. Any ideas?
    Jason

    Hi,
    A crude way of doing this would be add an ABAP program as the first step which will check whether it is the second day of a new fiscal period or not.
    You can schedule this program as the first step of your process (I assume you can add an ABAP program as a step), and only if it is successful you shall proceed with the rest of the process chain.
    You can then schedule it every second day of every week, so it will run the process chanin completely only as required (in start of fiscal periods) and stop at first step in all other weeks.
    Not very elegant, but may do the job.
    Or an ABAP program can call your process chain. This program can be scheduled everyweek. In its logic it will check for the date-validity logic before it proceeds with triggering the process chain. This will also work as well.
    I am not very familiar with process chains so what is mentioned above may not entirely be applicable for them (It will work in standard R/3 jobs I know).
    hope this helps,
    cheers,
    Ajay
    Message was edited by: Ajay Das

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

  • To get last year Net Value by fiscal period

    Dear experts,
    Since yesterday am trying to get solution where still unable to succeed.The report requirement is that they need Planned sales and actual sales qty of current fiscal year/period wise and in first column to get last year Actual sales for same period.(Ex:009.2006 to 011.2006 is input and in first coloumn 009.2005 to 011.2005)
    This is the situation:
    I have kept restricted W2 for fiscal year varient in filter and have created quantity sales(for last year) RKF with variable as "From fiscal year/period-13 and To Fiscal year/period-1"(with offset) and have placed in Key Figure structure in column section.Above this Structure have kept Fiscal year/period info object with variable "From Fiscal Year/period to To Fiscal year/period.This is because i need period wise breakup.
    I understand that above we have "From Fiscal year/period infoobject" and below that in key figure structure u have the above quoted key figure with quantity sales of previous year.I want period wise it has to show me last year(period wise) quantity with current year Planned aty and sales Qty
    Have gone through all threads and now it feels that i should to for variable exit ?...Do i have any option apart from variable exit?...If so could anybody can provide code for the same...Kindly gimme solution.
    Maximum points will be awarded..
    Thanks and Rgds
    Chandru

    Hi,
    I hope, you are entering  values 009.2006 to 011.2006 for the variable "From Fiscal Year/period to To Fiscal year/period". Am I right?
    If so, Donot restrict the fiscal year period with "From Fiscal Year/period to To Fiscal year/period like as you mentioned:--
    <i>Above this Structure have kept Fiscal year/period info object with variable "From Fiscal Year/period to To Fiscal year/period.This is because i need period wise breakup.</i>
    To get the break up Priod wise, taking Fiscal year period characterstics above  the structure is sufficient with ou any restriction.
    Under the characterstic fiscal year period take two KF (same kf called SALES QTY two times with different heading like " last year Actual sales" and "current year Actual sales ") . First KF will be restricted with customer exit varible on Fiscal year period characterstic. Second KF will be restricted with user entry varible on Fiscal year period characterstic.
    In case if you enter the value 009.2006 to 011.2006 as the iput to user entry varible, the code should generate the value 009.2005 to 011.2005 to Customer exit varible.
    With rgds,
    Anil Kumar Sharma .P
    With rgds,
    Anil Kumar Sharma. P

Maybe you are looking for

  • Problem with ASUS laptop and Windows 8

    Hii I have a problem with my ASUS vivo LAPTOP. Its running on Windows 8 and going pretty well, but sometimes when I use the Google chrome browser and open multiple pages the computer freezes and does nothing which requires me to shut it down by long

  • How to use "Number of segments in a message" macro

    When we export an EDIFACT document guideline file to Oracle 2.0 format, we have an option of enabling several macro nodes. One of them is "Number of segments in a message", which can be populate UNT+0074 element. However, in transforming XML for an E

  • Emergency help needed re media manager

    Hi all, Hopefully somebody can help me with this. I am due to start an audio mix on a project for a client tomorrow. He currently has the FCP project on his Mac Pro but due to recording to a tascam portable recorder on set all his audio files are cal

  • Transferring CS6 to a new computer

    After successfully transferring Lightroom and Elements 10 to my new PC, I could not get CS6 to load, due to lack of a program to open the .7Z file, evidently. I loaded a couple of Zip programs, to no avail. My registration key was accepted. Any help

  • Editing Working Days/Non Working Days in the base Project Calendar PWA

    Hello Experts, I am attempting to edit working days/non working days in the base project calendar PWA 13. I receive an error message when I attempt to open the base project schedule. I click the "edit" button under "Enterprise Calendars" page.  The e