Last Day of Fiscal Calendar

Hi All,
Im am trying to modify an initialization block to get the start dates and end dates of Prior Fiscal Year and Prior Fiscal Year - 2 Years Ago.
Fiscal Year starts on 01-JUN each year and ends on 31-MAY of following year
I already have a field called fiscal_year_start_date and using select statement
SELECT ADD_MONTHS(fiscal_year_start_date,12) FROM TABLE.
Im not getting the last day of the fiscal year which should be 31-MAY but instead getting 01-JUN. How can I change this.

Hi,
If you want to get a day before 1-Jun i.e. 31-May then you can subtract 1 from the date.
SELECT ADD_MONTHS(fiscal_year_start_date,12) - 1 FROM TABLE
Thanks

Similar Messages

  • 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

  • Customer Exit to get last day of month from Year/month

    Hi Experts,
    I need to create a customer exit to get the last day of month from Cal Year month input variable.
    Examples
    1)
    User input period: 12.2008
    I need from the customer exit: 31.12.2008
    2)
    User input period: 02.2009
    I need from the customer exit: 28.02.2009
    Can someone help me with the ABAP code to achieve this with a customer exit?
    Help will be appreciated.

    Hi,
    Please use the following code,
    Second one is the suitable solution for you, I can understand that, if it leafe year then you have the problem so use the secon one.
    First one is using Period i.e. 010.2008 (December 2008).
    Secodn one is based on Date/Month.
    Note: Insted of SY-DATUm, you give your variable name
    *******To get the Last day of the Fy Period entered by User in ZFYP***
        WHEN 'ZLDAY_FI'.
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZFYP'.
            zbdatj = loc_var_range-low+0(4).
            zbuper = loc_var_range-low+4(3).
            CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
              EXPORTING
                i_gjahr = zbdatj
                i_periv = 'V3'
                i_poper = zbuper
              IMPORTING
                e_date  = zzdate.
            CLEAR: l_s_range.
            l_s_range-low = zzdate.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
          ENDLOOP.
    Note: in the below code I given SY-DATUM, so you change to your Month Variable like using  
    LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'XXXX'.
    ** Last Day of Current Calendar month
          zzdate = sy-datum.
          CALL FUNCTION '/OSP/GET_DAYS_IN_MONTH'
            EXPORTING
              iv_date = zzdate
            IMPORTING
              ev_days = znum.
          CLEAR: l_s_range.
          l_s_range-low+6(2) = znum.
          l_s_range-low+0(4) = sy-datum+0(4).
          l_s_range-low+4(2) = sy-datum+4(2).
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
    Thanks
    Reddy
    Edited by: Surendra Reddy on Jan 27, 2009 2:47 PM
    Edited by: Surendra Reddy on Jan 28, 2009 6:12 AM

  • Transfer on last day allowed only in closed fiscal year

    Hi Guru,
    Client kept asset transfer date as 31/10/2010 first, uploaded some asset on this date, due to some reason asset uploading was not completed for all the asset. so all the asset value which was uploaded on 31/10/2010 was done as zero.
    Client took decision to upload all the asset on last day of FY 10-11 i.e 31-03-2011. transfer date was changed as 31-03.2011 and moved up to quality, unfortunatly rquest was not moved to PRD and while uploading to PRD again 25 asset got uploade  by transfer date as 31/10/2010, when realized transport req of change transfer date is moved to PRD and abt 50000 asset of total 70000 asset got uploaded.F.Y 2010 was closed while uploading this assets
    Year 2010 was again open for posting of cj88 transaction.
    When we are uploading balance  assets in the system  getting error message Transfer on last day allowed only in closed fiscal year
    When tried to close FY 2010, system is giving message ' Depreciation not posted completly' for 25 assets.
    i tried to do value as zero for these asset through as92 but system agiain giving message Transfer on last day allowed only in closed fiscal year
    so situation is we are not able to close FY 2010 and thus assets are not getting uploaded. if we run depreciation for said 25 assets for year 2010 it is not proper because actual  transfer date is 31.03.2011
    Please Help
    Regards,
    Shekhar

    hi,
    go to customizing and under asset data transfer - parameters for data transfer - date specifications - specify transfer date/last closed FY--- you need to place the last day of the period where you have last run depreciation for the legacy system and make sure that I am assuming at this stage will be the previous period or this period.
    rgds,
    jay

  • How to get the same period last year value using Fiscal Calendar?

    Hi there,
    I am using DAX in a Tabular Model project but I am getting stuck trying to get the following:
    We are using a Fiscal Calendar (from 01 April to 31 March). 
    Previous Period Value
           Value
    2012
    April
    15
    May
    10
    Jun
    20
    2013
    April
    15
    30
    May
    10
    20
    Jun
    20
    25
    I have tried to use sameperiodlastyear but there is an error saying that this function cannot be used for non contiguous dates. DATEADD is given the same error...
    Could anyone help me getting the right measure expressions for [Previous Period Value]?
    Thanks and best regards,
    Joss

    Hi Joss,
    In SQL Server Analysis Services, we can can compare revenue with the hierarchy periods (year, month, day) by using the PARALLELPERIOD function, and now you want to compare with custom periods. (NOTE: We cannot compare it with the PARALLELPERIOD function
    since
    PARALLELPERIOD function returns a member from a prior period in the same relative position as a specified member. So if the first time span not equal to the second one (such as the first period is 3 days, and the second period is 2 month)).  Here
    is a sample query about PARALLELPERIOD function for your reference.
    with
    set Hotels as
    [Hotels].[Hotel ID].&[1015],
    [Hotels].[Hotel ID].&[5640],
    [Hotels].[Hotel ID].&[8800]
    set Period as [Arrival Date].[Date].[Month].&[2012]&[1]:[Arrival Date].[Date].[Month].&[2012]&[12]
    member [Arrival Date].[Date].[0] as sum({ Period })
    member [Total Amount N-1] as (PARALLELPERIOD([Arrival Date].[Date].[Year], 1, [Arrival Date].[Date].[Year].&[2012]), [Measures].[Total Amount])
    select
    [Measures].[Total Amount],
    [Measures].[Total Amount N-1]
    } on 0,
    nonemptycrossjoin
    Hotels,
    Hotels.[Hotel].children,
    *{[Arrival Date].[Date].[0]}
    } on 1
    from [Booking_Cube]
    Regards,
    Charlie Liao
    TechNet Community Support

  • How do I set a recurring event for the last day of the month on iphone 4s calendar?

    I want to set a recurring event for the last day of every month - regardless of the date/number of days in the month. I'd prefer not to have to use an app to do this.

    Hi,
    You can do this using the custom repeat in iCal. You'll need two events to cover the second and fourth Mondays.
    Create the event on the second Monday of the month. In Repeat select Custom... > Frequency: Monthly > On the: second Monday.
    Do the same for the Fourth Monday.
    Best wishes
    John M

  • Hot to select last month sales using fiscal calendar

    Hi All,
    I have the following query listed below
    select DISTINCT
    -1,
    vODS_GLBalance_test.Page,
    vODS_GLBalance_test.FiscalYearId,
    vODS_GLBalance_test.FiscalMonthOfYearId,
    GLAmount
    From ODS.Staging.vODS_GLBalance_Test
    Left Outer Join Ods.JJill.tODS_GLBalance
    ON tODS_GLBalance.FiscalYearId = vODS_GLBalance_Test.FiscalYearId
    AND tODS_GLBalance.FiscalMonthOfYearId = vODS_GLBalance_Test.FiscalMonthOfYearId
    AND tODS_GLBalance.Page = vODS_GLBalance_Test.PAGE
    where vODS_GLBalance_Test.fiscalyearid = YEAR(GETDATE())
    AND vODS_GLBalance_Test.fiscalMonthofyearId = MONTH(GETDATE())-1
    The query runs fine and gives me the exact data if we are in lets say 2014 and months > 3.But my issue here is i am using a fiscal calendar and fiscal calendar months is not always MONTH(GETDATE())-1, for ex if we are in feb 2014 then the logic above will
    give us Jan 2014 but it should give me jan 2013 as the fiscal year starts from feb and ends in jan.
    Can someone please help me with any suggestions?
    Thanks. 

    Hi Naomi,
    Thanks for the reply as i was waiting for the answer i tried this one and looks like its working as our calendar month is always +1 of fiscal month 
    select DISTINCT
    -1,
    vODS_GLBalance_test.Page,
    vODS_GLBalance_test.FiscalYearId,
    vODS_GLBalance_test.FiscalMonthOfYearId,
    GLAmount
    From ODS.Staging.vODS_GLBalance_Test
    Left Outer Join Ods.JJill.tODS_GLBalance
    ON tODS_GLBalance.FiscalYearId = vODS_GLBalance_Test.FiscalYearId
    AND tODS_GLBalance.FiscalMonthOfYearId = vODS_GLBalance_Test.FiscalMonthOfYearId
    AND tODS_GLBalance.Page = vODS_GLBalance_Test.PAGE
    where vODS_GLBalance_Test.calendaryearid = YEAR(GETDATE())
    AND vODS_GLBalance_Test.calendarMonthofyearId = MONTH(GETDATE())
    I am not sure if you have remembered but i was struggling with bringing past 3 months sales to update, do you think something of this logic may help us anyway? 
    Any suggestions please?
    Thanks

  • Currency Translation based on Last Day of the Acquistion month

    Dear all,
                Request to help me in understanding how we can calculate the currency translation rate as per the last day if the acquistion month..
    For Example if the  Acquistion date : 01/01/2008 (mm/dd/yyyy) the currency translation should happend based on the rate maintained as on 31/01/2008.
    Thanks
    Pavan Kumar Prakhya

    First, you will need to convert the actual acquisition date to the end date of the Fiscal Period. This can be done by using two separate Function Modules. First, get the actual Fiscal Period by entering the date and Fiscal Year Variant into the DATE_TO_PERIOD_CONVERT Function Module. Use the Fiscal Year and Fiscal Period from this and determine the end date of the Fiscal Period by using Function Module LAST_DAY_IN_PERIOD_GET with Fiscal Year, Fiscal Period and Fiscal Year Variant as your inputs.
    For the conversion, use the Function Module CONVERT_TO_LOCAL_CURRENCY. The inputs for this would be the last date of the Fiscal Period, the amount to be converted, the from currency code, the to currency code, blank in rate, AS01 in type of rate and X in read TCURR. This assumes, however, that month-end rates (rate type = AS01) have been loaded into your source system and these rates have been transferred to your BW environment.

  • How to get the last day of calweek

    Hi Guys,
                Is there any function module to get the last day of the calendarweek.
    I want to show that last date of calweek in my column heading.

    You can use the Calender class...
    Calendar c = Calendar.getInstance();
    and then something like...
    c.add(c.MONTH, 1);
    int dayOfMonth = c.get(Calender.MONTH);
    c.add(c.DAY_OF_MONTH, - (dayOfMonth-1) );
    other usefull functions are:
    System.out.println(" YEAR : " + c.get(Calendar.YEAR));
    System.out.println(" MONTH : " + c.get(Calendar.MONTH));
    System.out.println(" DAY_OF_MONTH : " + c.get(Calendar.DAY_OF_MONTH));
    System.out.println(" DAY_OF_WEEK : " + c.get(Calendar.DAY_OF_WEEK));
    System.out.println(" DAY_OF_YEAR : " + c.get(Calendar.DAY_OF_YEAR));
    System.out.println(" WEEK_OF_YEAR : " + c.get(Calendar.WEEK_OF_YEAR));
    System.out.println(" WEEK_OF_MONTH : " + c.get(Calendar.WEEK_OF_MONTH));
    System.out.println(" DAY_OF_WEEK_IN_MONTH : " + c.get(Calendar.DAY_OF_WEEK_IN_MONTH));
    System.out.println(" HOUR : " + c.get(Calendar.HOUR));
    System.out.println(" AM_PM : " + c.get(Calendar.AM_PM));
    System.out.println(" HOUR_OF_DAY (24-hour): " + c.get(Calendar.HOUR_OF_DAY));
    System.out.println(" MINUTE : " + c.get(Calendar.MINUTE));
    System.out.println(" SECOND : " + c.get(Calendar.SECOND));
    System.out.println();*/

  • How to get the last day of a month?

    HI,
    I want to know how to get the last day of a month.
    In my JClient form, I tried to get it by using oracle.sql.Date method, that is:
    lastday=oracle.sql.Date anydate.lastDayOfMonth();
    But it does not work. The result is lastday=anydate.
    Why?
    Stephen

    You can use the Calender class...
    Calendar c = Calendar.getInstance();
    and then something like...
    c.add(c.MONTH, 1);
    int dayOfMonth = c.get(Calender.MONTH);
    c.add(c.DAY_OF_MONTH, - (dayOfMonth-1) );
    other usefull functions are:
    System.out.println(" YEAR : " + c.get(Calendar.YEAR));
    System.out.println(" MONTH : " + c.get(Calendar.MONTH));
    System.out.println(" DAY_OF_MONTH : " + c.get(Calendar.DAY_OF_MONTH));
    System.out.println(" DAY_OF_WEEK : " + c.get(Calendar.DAY_OF_WEEK));
    System.out.println(" DAY_OF_YEAR : " + c.get(Calendar.DAY_OF_YEAR));
    System.out.println(" WEEK_OF_YEAR : " + c.get(Calendar.WEEK_OF_YEAR));
    System.out.println(" WEEK_OF_MONTH : " + c.get(Calendar.WEEK_OF_MONTH));
    System.out.println(" DAY_OF_WEEK_IN_MONTH : " + c.get(Calendar.DAY_OF_WEEK_IN_MONTH));
    System.out.println(" HOUR : " + c.get(Calendar.HOUR));
    System.out.println(" AM_PM : " + c.get(Calendar.AM_PM));
    System.out.println(" HOUR_OF_DAY (24-hour): " + c.get(Calendar.HOUR_OF_DAY));
    System.out.println(" MINUTE : " + c.get(Calendar.MINUTE));
    System.out.println(" SECOND : " + c.get(Calendar.SECOND));
    System.out.println();*/

  • How to get the last day of the previous month

    Hello Team,
    If  my input date is today , then i need to find out the last day of the previous month for the same.
    Can someone help me  to find out .. how can this be done.
    Regards,
    Ravi

    Hi,
    Try the below code.
         // get a calendar object
        GregorianCalendar calendar = new GregorianCalendar();
        // convert the year and month to integers
        int yearInt = Integer.parseInt(year);
        int monthInt = Integer.parseInt(month);
         int dayInt = Integer.parseInt(day);
        // adjust the month for a zero based index
        monthInt = monthInt - 1;
        // set the date of the calendar to the date provided
        calendar.set(yearInt, monthInt, dayInt);
        int day = calendar.getActualMaximum(GregorianCalendar.DAY_OF_MONTH);
        return Integer.toString(day);
    Regards
    Venkat

  • Birthdays a day early in Calendar on Mountain Lion

    On my Macbook Pro running Mac OS X 10.8.2 (Mountain Lion) all the birthdays from the "Birthdays" calendar are showing a day early in Calendar. E.g. When I browse to contact Joe Bloggs in Contacts it shows his birthday as 12/03/1987. When I go into Calendar, there is a full day event for Joe Bloggs' birthday on 11/03/1987.
    In Calendar I have selected the correct timezone (New Zealand Time) and have also enabled "Turn on time zone support" in the preferences. On my iPhone, I have the same settings and the birthdays display on the correct date.
    Is there anything I can do to get the birthdays to display on the correct date in Calendar on my Macbook Pro?
    Just clarifying, the date format used here is dd/mm/yyyy.

    I tried the "year" view, but it makes not difference.  A Spotlight search does not present the info in a calendar format, only in an events and reminders format. It also only seems to be finding the "today" view, but it is impossible to be sure since it only shows a time for the event but no date.  There has to be a way to find the last time or all the times I made a Dr.'s appointment without going through an entire year or more day by day.
    Tom

  • Has anyone else had the day view crash calendar in iOS 7.1 on iPad Air?

    I recently updated to iOS 7.1 on my iPad Air (128 GB cellular). When I go to the calendar app and select the new "Day" view, the calendar app crashes.
    I have iCloud calendar and two Google calendars syncing with the device. When I disable all calendars from syncing, I no longer experience a crash in the "Day" view.
    Has anyone else had similar experiences?
    Thanks,
    Fyzel

    Switching to day view doesn't crash calendar but I can't launch the calendar app in iOS 7.1 (on my iPad 2) if synch is in and it was last in day view. It crashes on launch.

  • ICal 3.0: Last day of the month repeating event

    I am migrating back to iCal after a few years using Entourage. I am trying to set up calendar events and reminders for the last day of every month, but I can't figure out how to do it. In Entourage this was easy. Any advice? Thank you.

    I would like this to be an easy feature included in iCal as I get paid on the 16 and second to last day of the month. I want iCal to show the event in the calendar, not for me to set the event and have an alarm for 24 hours before. I tried the trick found at http://www.macworld.com/article/47872/2005/11/trickical.html but that does not work with iCal 3.0.
    Any help would be appreciated or maybe Apple adding this in the repeating section of the ical event seeing it is apart of the icalendar specification.
    tim

  • First and last day of current year as a date object

    Howdy...
    can someone please help me out... i need a fast way to get the first day of the current year as a date object and the last day of the current year as a date object...
    big thanks for any sample code...

    import java.util.Calendar;
    // snip
    Calendar firstDayOfYear = Calendar.getInstance(); // will initialize it with today
    firstDayOfYear.set(Calendar.DAY_OF_MONTH, 1);
    firstDayOfYear.set(Calendar.MONTH, Calendar.JANUARY);
    Calendar lastDayOfYear = Calendar.getInstance(); // will initialize it with today
    lastDayOfYear.set(Calendar.DAY_OF_MONTH, 31);
    lastDayOfYear.set(Calendar.MONTH, Calendar.DECEMBER);Rommie.

Maybe you are looking for

  • CMR problem

    Hi friends I am using weblogic,ejb ,XDoclet...Doing one CMR relation program I have tow tables 1.Order_detail 2.Order_header In order_detail table i have PK serial number and FK po_no In order_header table i have PK po_no It is like order has many it

  • Editing text after designing a new form and converting it in to pdf

    I designed a form and converted it in to PDF format for printing. The form has some formatting errors and needs to be edited. However attempt to do so results in a message stating that it is a secure documents and can not be edited. This is inspite o

  • I just updated Acrobat Pro and now I am unable rotate and save .PDFs - Help!

    I have Adobe Acrobat 9 Pro.  I updated this via the Adobe site on Friday.  Now I am unable to do two very important editing tasks that I was previously able to do.  I am unable to rotate individual pdf pages within a larger set.  I am also unable to

  • HT5492 Can I password protect books in iBooks or delete purchased books off other devices?

    Can I password protect books in iBooks or delete them off other devices?  I have adult books on my iPad that I don't want my daughter to access on her iPad mini.

  • Lot size HB

    Hi I am having raw material with following setting in MRP VIEW. MRP- V1 lOT SIZE- HB MAXIMUM STOCK LEVEL-- 1000 REORDER POINT -- 500 Stock of above material is Zero. When Mrp is done then it created PR of 1000 Quantity And it is ok as per setting. Ia