<?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: Current date + 1 year in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585065#M863222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ya thanks ....&lt;/P&gt;&lt;P&gt;sorry to ditrub i just gone to the data elements structure of mara  i found it out..&lt;/P&gt;&lt;P&gt;hi swetha kindly provide full marks to ramiro.....&lt;/P&gt;&lt;P&gt;really thanks once again&lt;/P&gt;&lt;P&gt;sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Mar 2008 17:19:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-21T17:19:47Z</dc:date>
    <item>
      <title>Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585055#M863212</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;Can anyone please tell me what is the easy method to calculate current date + 1 year?&lt;/P&gt;&lt;P&gt;Is there any function module available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Swetha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 14:57:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585055#M863212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T14:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585056#M863213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;use this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_date type sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data:p_out type sy-datum.&lt;/P&gt;&lt;P&gt;       p_out = sy-datum + 365.&lt;/P&gt;&lt;P&gt;       write:/ p_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or use this fm ISM_ADD_YEAR_TO_PERIOD&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: venkat  appikonda on Mar 21, 2008 4:06 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 15:04:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585056#M863213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T15:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585057#M863214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can work.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
  work_dt      TYPE d.

START-OF-SELECTION.
  work_dt = sy-datum.
  work_dt(4) = work_dt(4) + 1.

  IF work_dt+4(4) = '0229'.
    work_dt+4(4) = '0228'.
  ENDIF.

  WRITE:/ work_dt.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 15:38:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585057#M863214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T15:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585058#M863215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sy-datum+365 works well&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 15:46:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585058#M863215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T15:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585059#M863216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Beware of Leap Years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Tried this and it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data date type sy-datum.
data i_date type sy-datum value '20080229'.
CALL FUNCTION 'ADD_TIME_TO_DATE'
  EXPORTING
    I_IDATE                     = i_date
    I_TIME                      = '1'
    I_IPRKZ                     = '3'
*   I_RDMHD                     =
 IMPORTING
   O_IDATE                     = date
* EXCEPTIONS
*   INVALID_PERIOD              = 1
*   INVALID_ROUND_UP_RULE       = 2
*   INTERNAL_ERROR              = 3
*   OTHERS                      = 4
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

write date.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_iprkz = 3 means years and i_time is the increase&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 15:49:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585059#M863216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T15:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585060#M863217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rmairo can u plz eloborate i_uprkz i didnt get that..?&lt;/P&gt;&lt;P&gt;will u please&lt;/P&gt;&lt;P&gt;because leap years how can it judges..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 16:20:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585060#M863217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T16:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585061#M863218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Leap year is computed by &lt;/P&gt;&lt;P&gt;remainder = mod ( year / 4 ).  &lt;/P&gt;&lt;P&gt;if remainder = 0 then leap year is true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPT when year+0(2) / 4 remainder NE 0.  ie.. 2000 was leap year, but 1900 was not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 16:36:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585061#M863218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T16:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585062#M863219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i_iprkz is the unit you want to increase, you have options days, weeks, months and years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I said adding 365 days to the date is not the right answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if you have 01.01.2008 most people assume that date plus 1 year is 01.01.2009, but if you add 365 days in a leap year like 2008 you end with 31.12.2008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function adds 1 year to the date and in case you place 29.02 the function checks the plausability, if you add years that will not have a 29.02, the function places the new date in 28.02 of the years you added, but in case you add any multiples of 4, it will put the date in 29.02 of that year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same thing most people born in 29.02 do with their birthdays, must countries have legislastion to place their birthdays in 28.02 in non-leap years an 29.02 in leap years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 16:47:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585062#M863219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T16:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585063#M863220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK Ramiro ,&lt;/P&gt;&lt;P&gt;Thanks for taking efforts to answer my question on behalf of miss swetha.&lt;/P&gt;&lt;P&gt;so i am going to fix this...&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ADD_TIME_TO_DATE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt; I_IDATE                     = i_date&lt;/P&gt;&lt;P&gt; I_TIME                      = '1'  --&amp;gt; only accepts how many years&lt;/P&gt;&lt;P&gt;I_IPRKZ                     = '3'  --&amp;gt; specified for only leap years?&lt;/P&gt;&lt;P&gt;*I_RDMHD                     =&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will u agree with my comments mentioned..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i mean can we use this same function module for weeks or days like 4 weeks later what is the date or after 5 months what is the date ?&lt;/P&gt;&lt;P&gt;If so how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: saslove sap on Mar 21, 2008 6:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 17:12:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585063#M863220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T17:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585064#M863221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No. Maybe something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'ADD_TIME_TO_DATE'
  EXPORTING
    I_IDATE                     = i_date "Original date
    I_TIME                      = '1'  " Ammount to add
    I_IPRKZ                     = '3'  " unit: 'blank'-days 1-weeks 2-months 3-years
*   I_RDMHD                     =
 IMPORTING
   O_IDATE                     = date "new date
* EXCEPTIONS
*   INVALID_PERIOD              = 1
*   INVALID_ROUND_UP_RULE       = 2
*   INTERNAL_ERROR              = 3
*   OTHERS                      = 4.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you can use the same function to add days, weeks or months also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ramiro Escamilla on Mar 21, 2008 6:18 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 17:17:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585064#M863221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T17:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585065#M863222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ya thanks ....&lt;/P&gt;&lt;P&gt;sorry to ditrub i just gone to the data elements structure of mara  i found it out..&lt;/P&gt;&lt;P&gt;hi swetha kindly provide full marks to ramiro.....&lt;/P&gt;&lt;P&gt;really thanks once again&lt;/P&gt;&lt;P&gt;sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 17:19:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585065#M863222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T17:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Current date + 1 year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585066#M863223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2008 18:26:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/current-date-1-year/m-p/3585066#M863223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-21T18:26:25Z</dc:date>
    </item>
  </channel>
</rss>

