<?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: SAP week - Finding dates in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846438#M45324</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okay .. what i need is nothing but to subtract 13 weeks from the user input. &lt;/P&gt;&lt;P&gt;ie. suppose user inputs "200452" as sap week .. i need "200439" which is 13 weeks less than the input. HOw can i do that ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Dec 2004 08:26:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2004-12-22T08:26:47Z</dc:date>
    <item>
      <title>SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846435#M45321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have SAP week number input in my report. From that, how can we get the start date and end date for that week. Can anybody tell me the table where the details of sapweek is getting stored .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 07:43:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846435#M45321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T07:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846436#M45322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FM :  &amp;lt;b&amp;gt;WEEK_GET_FIRST_DAY&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get end date, I could not find any FM, but this is what you can do, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subtract 1 day from first day&lt;/P&gt;&lt;P&gt;Use &amp;lt;b&amp;gt;DATE_CONVERT_TO_FACTORYDATE&amp;lt;/b&amp;gt; , and use &amp;lt;b&amp;gt;CORRECT_OPTION&amp;lt;/b&amp;gt; as '-' to get last day of previous week. You need to put factory calendar as well. For plant-specific, factory calendar, you can get it from Table &amp;lt;b&amp;gt;T001W&amp;lt;/b&amp;gt;.&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Subramanian Venkateswaran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 07:50:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846436#M45322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T07:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846437#M45323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Possibly Fuba 'WEEK_GET_FIRST_DAY' may solve this.&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 07:53:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846437#M45323</guid>
      <dc:creator>former_member183804</dc:creator>
      <dc:date>2004-12-22T07:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846438#M45324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okay .. what i need is nothing but to subtract 13 weeks from the user input. &lt;/P&gt;&lt;P&gt;ie. suppose user inputs "200452" as sap week .. i need "200439" which is 13 weeks less than the input. HOw can i do that ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 08:26:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846438#M45324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T08:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846439#M45325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
p_user = '200452'.
data: lv_variable_integer type i.
data: lv_variable_character(2) type c.

lv_variable_integer = p_user+4(2).
lv_variable_integer = lv_variable_integer - 13.

lv_variable_character = lv_variable_integer.
p_user+4(2) = lv_variable_character.
&lt;/CODE&gt;&lt;/PRE&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>Wed, 22 Dec 2004 08:36:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846439#M45325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T08:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846440#M45326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But if the input is '200502' , it will create problem .. Isn't it ... If i am not wrong, i think it willnot return '2004**' ,Instead it will show error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I right ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 08:39:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846440#M45326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T08:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846441#M45327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, oversight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably you can try this.&lt;/P&gt;&lt;P&gt;From FM &amp;lt;b&amp;gt;WEEK_GET_FIRST_DAY&amp;lt;/b&amp;gt;, get value of day , in say lv_date.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
lv_date = lv_date - 91. " 13 * 7 = 91
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now call FM &amp;lt;b&amp;gt;DATE_GET_WEEK&amp;lt;/b&amp;gt;, to get the week number.&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>Wed, 22 Dec 2004 08:48:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846441#M45327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T08:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846442#M45328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A small correction to Subramaniam's code. This takes care of inputs such as 200401 to 200413.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
parameters: p_user(6) type c obligatory.

data: lv_year type i,
      lv_week type i.

lv_year = p_user+0(4).
lv_week = p_user+4(2).

subtract 13 from lv_week.

if lv_week le 0.
  add 52 to lv_week.
  subtract 1 from lv_year.
endif.

p_user+0(4) = lv_year.
p_user+4(2) = lv_week.

write p_user.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. Of course you will have to take care of the user-input validation in the At-Selection Screen Event. otherwise you are likely to get a short dump.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 08:52:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846442#M45328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T08:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846443#M45329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But it will not work sometimes.. ie some years will have 53 weeks whereas some others will have 52 only . Hope u understood the problem ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 10:28:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846443#M45329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T10:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846444#M45330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 2nd solution that I have stated should work. Why don't you try that out ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for letting us know about this 52/53 issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regads,&lt;/P&gt;&lt;P&gt;Subramanian V.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. Just thought that Y2K bug was interesting, but this is even better&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 10:44:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846444#M45330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T10:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846445#M45331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Shankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not agree with you completely on this one. No year has 53 &amp;lt;i&amp;gt;Weeks&amp;lt;/i&amp;gt;. 52 * 7 = 364. A normal year has 365 days. So there will be one day which will occur 53 times. A leap year has 366 days. So two days will appear 53 times. &lt;/P&gt;&lt;P&gt;Now, if you want to allow for that possibility, that a user can enter the 53rd week as input, then you will also have to consider whether the week would begin on the 365th or the 366th day, as the case may be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the following example :&lt;/P&gt;&lt;P&gt;1. the week is assumed to begin on a sunday&lt;/P&gt;&lt;P&gt;2. In the year 2000 (which was a leap year), Dec 31st is a Sunday. So a Sunday has occurred 53 times. This can easily be determined by considering the year (first 4 characters of the input) and finding out whether Dec. 31st falls on a Sunday (or on the day on which the week is supposed to begin).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the above logic, you can determine whether the magic number is 52 or 53.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 10:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846445#M45331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T10:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846446#M45332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Shankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets Assume input from user in 3 situation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If week 200514.&lt;/P&gt;&lt;P&gt;Extract 14 from 200514 and deduct 13 from it.&lt;/P&gt;&lt;P&gt;you get 200501.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the deducted value comes to Zero or negative.&lt;/P&gt;&lt;P&gt;Call function BKK_GET_LASTWEEK_OF_YEAR by inputing the pev year which we will get by reducing 1 from input year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function retrive Last week of the prev year now reduce rest from that week number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Ex:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input = 200502&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year = 2005 week = 02&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normal case.&lt;/P&gt;&lt;P&gt;02 - 13 = -11.&lt;/P&gt;&lt;P&gt;when it becomes -ve&lt;/P&gt;&lt;P&gt;call function which will take input as 2004 which we can get by 2005 - 1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FM retrieve last week of 2004 as 200453.&lt;/P&gt;&lt;P&gt;Get week part.. 53&lt;/P&gt;&lt;P&gt;Now add -11 to 53 = 42.&lt;/P&gt;&lt;P&gt;concatenate with the year 2004.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will solve your problem.&lt;/P&gt;&lt;P&gt;Please Let me know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lijo Joseph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 10:56:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846446#M45332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T10:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846447#M45333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Poornanand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to differ on your statement, "No year has 53 weeks". Year 2004 has 53 weeks. You can try by calling FM 'DAY_GET_WEEK' and pass 31/12/2004 as date.&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>Wed, 22 Dec 2004 11:02:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846447#M45333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T11:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846448#M45334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Subramaniam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had intended a week to be a set of seven days. The normal English meaning. I though this was clear from the explanation I have given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coming to your function Module, I assume you meant DATE_GET_WEEK. Executing this Function Module for a set of dates has produced the following results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;31.12.2000	Sunday	   200052&lt;/P&gt;&lt;P&gt;31.12.2001	Monday	   200201&lt;/P&gt;&lt;P&gt;31.12.2002	Tuesday	   200301&lt;/P&gt;&lt;P&gt;31.12.2003	Wednesday  200401&lt;/P&gt;&lt;P&gt;31.12.2009	Thursday   200953&lt;/P&gt;&lt;P&gt;31.12.2004	Friday     200453&lt;/P&gt;&lt;P&gt;31.12.2005	Saturday   200552&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm yet to find out what this means.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 11:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846448#M45334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T11:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846449#M45335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Poornanand,&lt;/P&gt;&lt;P&gt;I still work in SY-LANGU = 'E' and a week still has 7 days. What I did is manually count the number of weeks in the year 2004 and the number of weeks are 53.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My colleague had a very good explanation for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;365 = 52 * 7 + 1&lt;/P&gt;&lt;P&gt;Assume this is a non-leap year.&lt;/P&gt;&lt;P&gt;1st year - Non-Leap Year - Remainder day - 1&lt;/P&gt;&lt;P&gt;2nd year - Non-Leap Year - Remainder day - 1&lt;/P&gt;&lt;P&gt;3rd year - Non-Leap Year - Remainder day - 1&lt;/P&gt;&lt;P&gt;4th year - Leap year     - Remainder day - 2&lt;/P&gt;&lt;P&gt;5th year - Non-Leap Year - Remainder day - 1&lt;/P&gt;&lt;P&gt;6th year - Non-Leap Year - Remainder day - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore in the sixth year, if you see this accumulation of days has added an entire new week in that year, that is 7 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that clears your doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shankar - Do let us know if the 2nd option that I have provided has worked for you ?&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>Wed, 22 Dec 2004 11:33:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846449#M45335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T11:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846450#M45336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;As per my knowledge, it is very simple problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reduce 13 from the given week no. if value comes to 0 or -ve add it into last week of the prev year.&lt;/P&gt;&lt;P&gt;to get last week of the year we have FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am i correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lijo Joseph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 11:48:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846450#M45336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T11:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846451#M45337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joseph : What you have said is true. The actual problem can be solved very easily. The purpose of this discussion is to get some additional points clarified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shankar :  Please note that the latter part of this discussion is purely academic and does not concern your actual requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;--&lt;/STRONG&gt;&lt;DEL&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;This part of the discussion is purely out of academic interest--&lt;HR originaltext="-------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subramaniam: To be honest I'm not very satisfied with your explanation. What you say seems to be making some sense w.r.t. the way SAP defines its calendar and performs the date operations, but I still do not understand how a 53-week year can be detected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following are all the years which contain 53-weeks.&lt;/P&gt;&lt;P&gt;2004 2009 2015 2020 2026 2032 2037 2043 2048 2054 2060 2065 2071 2076 2082 2088 2093 2099.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only observation that I could make is that the difference between two consecutive years above is either 5 or 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mathematically, can you give me some generic formula which will always tell me whether a year has 52 or 53 weeks ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 12:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846451#M45337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T12:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846452#M45338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Anand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Years that start on a Thursday and leap years that start on a Wednesday have 53 weeks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If still not clear, Pls Let me know.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lijo Joseph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2004 13:40:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846452#M45338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T13:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846453#M45339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Poornanand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To start with , what seemed like an innocuous post, has turned once again interesting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Poornanand, weeks are calculated based on ISO 8601:2004 standard. I found this today while searching in Google.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What Lijo has said is true and to support that these are some of the URLs, you would like to visit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html" target="test_blank"&gt;http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.personal.ecu.edu/mccartyr/isowdcal.html" target="test_blank"&gt;http://www.personal.ecu.edu/mccartyr/isowdcal.html&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://zijlema.basicguru.com/weeknbr.html" target="test_blank"&gt;http://zijlema.basicguru.com/weeknbr.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;http://personal.ecu.edu/mccartyr/ISOwdALG.txt&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.cl.cam.ac.uk/~mgk25/iso-time.html" target="test_blank"&gt;http://www.cl.cam.ac.uk/~mgk25/iso-time.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The URL which is in bold has an algorithm as well.&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>Wed, 22 Dec 2004 14:46:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846453#M45339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-22T14:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAP week - Finding dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846454#M45340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joseph and Subramaniam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a trillion for the valuable information. I have added a little more to my knowledge repository &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2004 05:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-week-finding-dates/m-p/846454#M45340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-12-23T05:25:37Z</dc:date>
    </item>
  </channel>
</rss>

