<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CALCULATE_DATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187544#M759159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Lieven,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls. note the out date has to be date type as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : in TYPE sy-datum,
&amp;lt;b&amp;gt;       out TYPE sy-datum.&amp;lt;/b&amp;gt;

in = sy-datum.

CALL FUNCTION 'CALCULATE_DATE'
 EXPORTING
*   DAYS              = '0'
   months            = '1'
   start_date        = in
 IMPORTING
   result_date       = out.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Dec 2007 13:05:16 GMT</pubDate>
    <dc:creator>JozsefSzikszai</dc:creator>
    <dc:date>2007-12-10T13:05:16Z</dc:date>
    <item>
      <title>CALCULATE_DATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187540#M759155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I call the function module CALCULATE_DATE with input MONTHS=1 and START_DATE=20080131, I get RESULT_DATE=00000000, where one would expect the last date of February to be returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I not using this function correctly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 12:53:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187540#M759155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-10T12:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATE_DATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187541#M759156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Use this function Module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        months  = '2'&lt;/P&gt;&lt;P&gt;        olddate = lv_date&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        newdate = lv_newdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 12:54:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187541#M759156</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-12-10T12:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATE_DATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187542#M759157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Sir,&lt;/P&gt;&lt;P&gt;Please do reward if useful.&lt;/P&gt;&lt;P&gt;Thankx.&lt;/P&gt;&lt;P&gt;Please see the FM below :&lt;/P&gt;&lt;P&gt;data: wa_date like sy-datum.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;call function 'RP_CALC_DATE_IN_INTERVAL'&lt;/P&gt;&lt;P&gt;         exporting&lt;/P&gt;&lt;P&gt;              date      = '20080229'&lt;/P&gt;&lt;P&gt;              days      = 0&lt;/P&gt;&lt;P&gt;              months    = 24&lt;/P&gt;&lt;P&gt;              signum    = '-'&lt;/P&gt;&lt;P&gt;              years     = 0&lt;/P&gt;&lt;P&gt;         importing&lt;/P&gt;&lt;P&gt;              calc_date = wa_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YOu could also use the function module 'CCM_GO_BACK_MONTHS'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Func mod will return the date six months before current date&lt;/P&gt;&lt;P&gt;          call function 'CCM_GO_BACK_MONTHS'&lt;/P&gt;&lt;P&gt;            exporting&lt;/P&gt;&lt;P&gt;              currdate   = w_curr_date&lt;/P&gt;&lt;P&gt;              backmonths = c_number_of_months&lt;/P&gt;&lt;P&gt;            importing&lt;/P&gt;&lt;P&gt;              newdate    = w_six_months_old_date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 12:57:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187542#M759157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-10T12:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATE_DATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187543#M759158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use these function modules too for calculating the future date :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Modules related to Date and Time Calculations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALCULATE_DATE : Calculates the future date based on the input .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE_TO_DAY : Returns the Day for the entered date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE_COMPUTE_DAY : Returns weekday for a date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE_GET_WEEK : Returns week for a date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MONTH_NAMES_GET : Get the names of the month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WEEK_GET_FIRST_DAY : Get the first day of the week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;L_MC_TIME_DIFFERENCE : Find the time difference between two date/time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LAST_DAY_OF_MONTHS : Returns the last day of the month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you will try with these function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sakthi C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;&lt;/STRONG&gt;&lt;DEL&gt;&lt;STRONG&gt;Rewards if useful&lt;/STRONG&gt;&lt;/DEL&gt;*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 13:02:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187543#M759158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-10T13:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: CALCULATE_DATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187544#M759159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Lieven,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls. note the out date has to be date type as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : in TYPE sy-datum,
&amp;lt;b&amp;gt;       out TYPE sy-datum.&amp;lt;/b&amp;gt;

in = sy-datum.

CALL FUNCTION 'CALCULATE_DATE'
 EXPORTING
*   DAYS              = '0'
   months            = '1'
   start_date        = in
 IMPORTING
   result_date       = out.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 13:05:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-date/m-p/3187544#M759159</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-12-10T13:05:16Z</dc:date>
    </item>
  </channel>
</rss>

