Last Date of the next month

Hi,
How to find the last date of the next month.
Thanks in advance
Sunitha

Use the below mentioned FM
  call function 'LAST_DAY_IN_PERIOD_GET'
    exporting
      i_gjahr              = p_finyear
      i_periv              = 'X1'
      i_poper              = lv_popere
    importing
      e_date               = p_edate
    exceptions
      input_false          = 1
      t009_notfound        = 2
      t009b_notfound       = 3
      others               = 4.
  if sy-subrc <> 0.
  endif.
Supply the proper parameters, u will get the last date in  the next month.

Similar Messages

  • How to get the last day of the next month?

    Hi all.
    I need to get the last day of the next month. E.g. if the date is 20.03.2008 I need to get 30.04.2008.
    Is there any FM for it?
    TIA, Nikolai.

    hi Nikolai,
    pls. have a look athe following piece of code:
    PARAMETERS : p_date TYPE sy-datum.
    DATA : gv_res TYPE sy-datum.
    CALL FUNCTION 'CALCULATE_DATE'
    EXPORTING
    *   DAYS              = '0'
       months            = '2'
       start_date        = p_date
    IMPORTING
       result_date       = gv_res.
    ==> Now you have (gv_res) 2 months later as today
    gv_res+6(2) = '01'. ==> gv_res is first day of next-next month
    gv_res = gv_res - 1. ==> gv_res is last day of next month
    hope this helps
    ec

  • FM for the last date of the previos month

    Hi folks
    my requirement is if we enter the calendar month say YYYYMM in the selection
    screen. it has to get the previous month last date in the format DDMMYYYY
    For eg.,  selection screen input  200704
                required output : 31/03/2007
    Is there any standard function module.
    please urgent
    Thanks in Advance
    Rao

    Hi,
    Please try this.
    data: wa_idate like sy-datum,
          wa_odate like sy-datum.
    wa_idate(6) = p_date.
    wa_idate+6(2) = '01'.
    wa_odate = w_idate - 1.
    OR
    call function 'RP_CALC_DATE_IN_INTERVAL'
      exporting
        date      = wa_idate
        days      = 0
        months    = 1
        signum    = '-'
        years     = 0
      importing
        calc_date = wa_odate.
    write: / 'Last date of the previous month: ', wa_odate.
    Regards,
    Ferry Lianto

  • In making a monthly budget how do you repeat for next month and update the dates to the next month?

    i want to make my budget speadsheet update the month and date as it goes to the next month automatically, from sheet to sheet.  is there any way to make this happen?

    You could have a cell where you enter the month and year...
    Or you could pull the month and year from the first entry in the date column.  Like Barry I would want more information regarding your  set up before proposing any other, more specific, ideas.

  • Getting last date of the previous  month

    Hi
       Am giving one date. FOr that day i hav to take previous month last date.
    How can i do. IMportant : Last date of previous month

    u can make the code work like this.
    data: date like sy-datum,
          date1 like sy-datum.
    date = sy-datum.
    CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
      EXPORTING
        day_in                  = date
    IMPORTING
       LAST_DAY_OF_MONTH       = date1
    EXCEPTIONS
       DAY_IN_NO_DATE          = 1
       OTHERS                  = 2
    add 1 to date1.
    write:/ 'next month start date:', date1.
    *to fetch the march month last date.
    date1+4(2) = 03.
    CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
      EXPORTING
        day_in                  = date1
    IMPORTING
       LAST_DAY_OF_MONTH       = date1
    EXCEPTIONS
       DAY_IN_NO_DATE          = 1
       OTHERS                  = 2
    write:/ 'last date of march:', date1.
    Please close your previous threads.

  • I have 10 gb data..the next month rolled over...

    Now I have 20gb of data since it rolled over the next more an extra 10 gigs a month . I have only 10gbs of data on my plan.Will it rolloveer another 10 gbs month next month so I'll have about 30 gbs as rollever date?if so, in total, if thats true ill have used 4gb out of 26 gb of date for next month.

    I know many people think that using your base data first makes rollover useless but it sure comes in handy when you need it. In this current bill cycle my family has for the first time used all of our base data and we are now using what rolled over from last month. So far I have avoided over $100 in overage charges. I realize I won't have any rollover data next month but I don't mind.

  • Get last date of the current month

    Hi all,
       Is there any FM used to get the last date of
    sy-datum.
    Regards,
    bala

    check..
    RE_LAST_DAY_OF_MONTH
    SG_PS_GET_LAST_DAY_OF_MONTH
    parameters: p_fdate like sy-datum.
    DATA: M_DATE LIKE SY-DATUM,
    CALL FUNCTION 'LAST_DAY_OF_MONTHS' "#EC EXISTS
    EXPORTING
    DAY_IN = P_FDATE
    IMPORTING
    LAST_DAY_OF_MONTH = M_DATE.
    case mdate+3(2).
    when 30.
    write: '30 days'.
    when 28.
    write: '28 days'.
    when 29.
    write: '29 days'.
    when 31.
    write: '31 days'.
    endcase.

  • Please help.........how can i get the last date of the month?????

    Hello....
    I want to get the last date of the month.
    For example, the last date of Jan is 31.
    How can I get the last date of the particular month and year ????
    Thanks for help.
    Gloria

    Hi Gloria
    1. How can I compare the date???date1.compareTo(date2)
    where date1 and date2 is a java.util.Date Object
    will return 0 if it is the same date
    or
    date1.after(date2)
    where date1 and date2 is a java.util.Date Object
    will return true if date1 is after date2
    (the same for date1.before)
    2. How can I change the date format into yyyymmdd format???? I just want the year, month and date.try the java.text.SimpleDateFormat Object
    new SimpleDateFormat("yyyymmdd").format(yourdate)
    Hope this help.
    Please also have a look at a calendar I wrote, (maybe it help)
    demo & source :
    http://www.geocities.com/globe_software/java/components/
    globe_sa

  • How to find FIRST and the LAST date of the month.

    Hello,
    I want to find the first and the last date of the current month through query. How is it possible please help.
    For example if the current month is july. The first date should be 01-JUL-2006 and the last date would be 31-JUL-2006.
    Please help me.
    Regards,
    Imran Baig

    Like this?
    SQL> select trunc(sysdate,'MM') "First_Day",
      2        last_day(sysdate) "Last_Day" from dual;
    First_Day Last_Day
    01-JUL-06 31-JUL-06
    SQL> select trunc(to_date('10-FEB-04'),'MM' ) "First_Day",
      2       last_day(to_date('10-FEB-04')) "Last_Day" from dual;
    First_Day Last_Day
    01-FEB-04 29-FEB-04

  • Terms of Payment to determine due date as last date of the month

    Hi Experts,
    Does any one know how to configure a Terms of Payment to determine due date as last date of the month ?
    I tried by puting fixed date as 31 in the Terms of Payment in FI but when I am creating in FI-CA it gives me an error "_Term of payment Z003 is inconsistent/not planned_"
    Please advice.
    Thanks & Regards
    Satyajeet

    Hi Satyajeet,
    It seems the settings that you have maintained in FI are correct.
    When you are assigning the payment terms in FI-CA, you need to assign a factory calendar as well to the payment terms in the following config-
    IMG->Financial Accounting ->Contract Accounts Receivable and Payable->Postings and Documents->Document->Maintain Payment Terms
    If you have already assigned the factory calendar and still the problem persists, can you give the message ID and the message number of the error that you are getting?
    Thanks,
    Amlan

  • Want last date of the month as default basic finish date for the Proc order

    For forward scheduling type in process order, irrespective of the start date i want last date of the month as my  basic finish date.
    Ex start date can be 01/10/2009 or 15/10/2009, but the basic finish date should be 31/10/2009.

    Hi Sam,
    sorry to say , its not possible in standard SAP.
    1) If, on order creation, a planned order exists for the production order/ process order, the basic dates are copied from the planned order.
    2)If no planned order exists on order creation, you must specify at least one basic date.
    The scheduling type determines the basic dates that you must specify. and it useses timings from routings for scheduling.
    so may be you need some work around.
    explain your requirement why do you want to fix it for the last day of month and other constraints, may be we can find some way.
    Regards
    Ritesh

  • To display Last Date of the Month in Financial Reporting studio 9

    Hi
    I want to display last date of the month in header in Financial Reporting studio 9 . Is there any function which displays the last date of the month as per user selection .
    for example
    If user select month of Jan it should display Jan 31st, 2009
    If user select month of Feb it should display Feb 28th 2009
    Thanks

    Unless you name your Months like that you cannot do it. A large team from a major consulting firm told me for a year that it was not possible and convinced management that financial statements don't need dates.
    Management decided that we do need dates (because all financials need dates, look at any text book). I figured out a pretty sweet solution that is simple and easy to use and maintain. The users love it. Management loves it.
    I'm not giving it away though.

  • Last date of the month

    Hi All,
    Can anyone tell me the logic to get the last date of the month for vbrk-fkdat. The date format is dd/mm/yyyy. i need the output on the same format.
    for ex: if vbrk-fkdat = 17/12/2007 the output should be 31/12/2007.
    Thanks,
    Madhu

    actually the FM only takes date like sy-datum. but my variable is
    i had made the changes like -
    data: gv_date(10) TYPE c,
            gv_date1(10) TYPE c.
    CONCATENATE wa_vbrk-fkdat6(2) wa_vbrk-fkdat4(2) wa_vbrk-fkdat+0(4) INTO gv_date SEPARATED BY '/'.
      REPLACE ALL OCCURRENCES OF '/' IN gv_date WITH '.'.
          CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
            EXPORTING
              day_in            = gv_date
            IMPORTING
              last_day_of_month = gv_date1.
    REPLACE ALL OCCURRENCES OF '.' IN gv_date1 WITH '/'.
    but its showing the error as the variable declaration is different as it is in FM, i.e FM contains date type sy-datum.
    please reply ASAP.
    Thanks,
    madhu

  • Formula to calculate the last day of the subsequent month

    Hi - I am trying to create a formula in CR9 that will take a date field and translate it to the last day of the subsequent month.  For example, I have a date of today, 2/3/2009.  I need it to print on the report 3/31/2009.  I have made some progress to get me the 1st day of the subsequent month, but I need it to be the last day of the subsequent month.
    The formula I am have currently is:
    DateSerial(Year({Name.JOIN_DATE}), Month({Name.JOIN_DATE}) + 1, 0)+1
    this will give me 3/1/2009, but I need 3/31/2009.
    Any help appreciated. 
    Thanks!

    Hi Joe,
    You can use the following logic which also takes into account the extra day in a leap year.  You will need 5 formulas for this:
    First create a formula that calculates current month, call it @Current Month MM
    Month(Name.JOIN_DATE)+1
    Next create another formula called @Current Month Start Date which will give you the beginning of the month.
    totext(Date (year(currentdate),tonumber({@Current Month MM}) ,1 ))
    Next create another formula called @Current Year yyyy
    Year(Name.JOIN_DATE)
    Next, create a formula called @DaysofMonth with the following logic:
    if tonumber({@Current Year yyyy}) mod 4 = 0 then
    choose(month(date({@Current Month Start Date})),31,29,31,30,31,30,31,31,30,31,30,31) else
    choose(month(date({@Current Month Start Date})),31,28,31,30,31,30,31,31,30,31,30,31)
    Lastly create a formula called @Ending Date of Month
    totext(Date (year(currentdate),tonumber({@Current Month MM}) ,{@DaysOfMonth} ))
    I hope this information proves useful.
    Regards,
    Zack H.
    Edited by: Zack H on Feb 3, 2009 5:34 PM
    Edited by: Zack H on Feb 3, 2009 5:38 PM

  • Call object was called with start date in the previous month

    We have a single cycle maintenance plan for 30 days.
    Shift Factor Late Compl.   : 100%
    Tolerance                    :  10%
    Shift Factor Early Compl. :  100%
    Tolerance                    :    10%
    Cycle modification factor:    1
    Factory calendar            :  NIL
    Call horizon                    : 100%
    Scheduling period          :  90 DAY
    Scheduling indicator       : Time
    Call no . 11 was a plan date of 14.08.2009 has completion date 14.08.2009. Schedule type/status has "scheduled complete".
    Call no. 12 was called on 13.09.2009 which is in the past.
    Can someone explain why the system called the order with a starting date in the previuos month , that is , 13.09.2009.
    And how to rectify it to make it current date for the next call object?
    Thanks,
    Manohar

    I checked the algorithm for call no. 12
    Start of Cycle                07.08.2008
    Last planned date         14.08.2009
    Compl.Predecess           14.08.2009        Absolute shift                +   0 Da
    Planned cycle/offset      +    30 Da          Relative shift            0 % =   0 Da
    Shift                                 +     0 Da           erance value           0 % =   0 Da
    Planned Dates Due   13.09.2009    Completed on
    Last call on              15.10.2009    Called by               IP1020091015
    Workorder generated has start date 13.09.2009.
    Should we restart this plan , as the start dates in call object are at least 1 month old ?
    Thanks,
    Manohar

Maybe you are looking for