<?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: Leap year in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796757#M40524</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM DATE_CHECK_PLAUSIBILITY will check if a date is valid. You can either use this FM to check 28.02.xxxx for a given year, or copy the piece of coding which checks for a leap year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Oct 2004 13:03:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2004-10-29T13:03:55Z</dc:date>
    <item>
      <title>Leap year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796756#M40523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any function modules which on passing YEAR as parmeter gives us whether it a leap year or not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2004 12:37:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796756#M40523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-29T12:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Leap year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796757#M40524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM DATE_CHECK_PLAUSIBILITY will check if a date is valid. You can either use this FM to check 28.02.xxxx for a given year, or copy the piece of coding which checks for a leap year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2004 13:03:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796757#M40524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-29T13:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Leap year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796758#M40525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I shall just correct that &amp;lt;b&amp;gt;28.02.XXXX&amp;lt;/b&amp;gt; to &amp;lt;b&amp;gt;29.02.XXXX&amp;lt;/b&amp;gt;, but that is a great tip, John.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Never occured to me, of using FM &amp;lt;b&amp;gt;DATE_CHECK_PLAUSIBILITY&amp;lt;/b&amp;gt;, this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Subramanian V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2004 13:47:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796758#M40525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-29T13:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Leap year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796759#M40526</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 FM NUMBER_OF_DAYS_PER_MONTH_GET by passing '02' as month and YEAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Oct 2004 15:54:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796759#M40526</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-29T15:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Leap year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796760#M40527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if sap delivers such a function module but writing one yourself should be quite easy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Posibility one: implement the correct algorithm&lt;/P&gt;&lt;P&gt;leap years are years which can be divided by 4 (e.g. 2004) but are no centuries (e.g. 1900). But years which can be devided by 400 are leap years although they are centuries (e.g. 2000 was a leap year).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Posibility two: try the following (bases on the fact that sap can calculates the leap years correct in the date datatype)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- define a function module&lt;/P&gt;&lt;P&gt;  - importing parameter iv_year (NUMC 4)&lt;/P&gt;&lt;P&gt;  - exporting parameter ef_leap_year (CHAR 1)&lt;/P&gt;&lt;P&gt;- coding&lt;/P&gt;&lt;P&gt;  data:&lt;/P&gt;&lt;P&gt;    lv_date like sy-datum value '00000228'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lv_date(4) = iv_year. " set the year to the date&lt;/P&gt;&lt;P&gt;  ADD 1 TO lv_date.     " calculate the next day &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF lv_date+4(4) EQ '0229'. " get the MMDD part of date&lt;/P&gt;&lt;P&gt;    ef_leap_year = 'X'. " yes it is a leap year&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    ef_leap_year = ''.  " no it is not a leap year&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  kind regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Roman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Oct 2004 18:19:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796760#M40527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-31T18:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Leap year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796761#M40528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For this calculation you could generally simplify the equation to, is the year divisible by 4. Forward planning to the year 2100 is nonsense. And any date before 1st march 1900 is fixed and probably only useful for asset management.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2004 14:58:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/leap-year/m-p/796761#M40528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-11-01T14:58:54Z</dc:date>
    </item>
  </channel>
</rss>

