<?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: find the date functions in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530175#M242373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am unablt o see any direct FM there for this.&lt;/P&gt;&lt;P&gt;But you can go like this, ?Use this FM DATE_GET_WEEK with Current date and then again with that PO date.&lt;/P&gt;&lt;P&gt;It will return you the Calender Week for both you can  subtract it and there is your result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you find it helpful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Aug 2006 06:49:58 GMT</pubDate>
    <dc:creator>amit_khare</dc:creator>
    <dc:date>2006-08-07T06:49:58Z</dc:date>
    <item>
      <title>find the date functions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530173#M242371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,how can i find the weeks pass the date what i input,if have any functions?&lt;/P&gt;&lt;P&gt;for example,i creat one PO on 2006.8.7,next time,i will judge the PO was pass 4 weeks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 06:36:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530173#M242371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-07T06:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: find the date functions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530174#M242372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here u can use a fm for a financial year. This will solve the problem but i think this is not the correct FM as u have to pass one more parameter i.e, the tax_year_begin. just check it out once if it helps u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HR_IE_NUM_PRSI_WEEKS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 06:49:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530174#M242372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-07T06:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: find the date functions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530175#M242373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am unablt o see any direct FM there for this.&lt;/P&gt;&lt;P&gt;But you can go like this, ?Use this FM DATE_GET_WEEK with Current date and then again with that PO date.&lt;/P&gt;&lt;P&gt;It will return you the Calender Week for both you can  subtract it and there is your result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you find it helpful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 06:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530175#M242373</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2006-08-07T06:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: find the date functions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530176#M242374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;   Not sure about your requirement, if you want to add or subtract no.of weeks for a date you can try using FM: HRWPC_BL_DATES_WEEK_INTERVAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Reward for helpful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 06:53:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530176#M242374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-07T06:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: find the date functions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530177#M242375</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;DATA: weeknum1 LIKE  SCAL-WEEK,&lt;/P&gt;&lt;P&gt;      weeknum2 LIKE  SCAL-WEEK,&lt;/P&gt;&lt;P&gt;      week_diff type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DATE_GET_WEEK'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    date               = '20060907'&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   WEEK               = weeknum1&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   DATE_INVALID       = 1&lt;/P&gt;&lt;P&gt;   OTHERS             = 2.&lt;/P&gt;&lt;P&gt;          &lt;/P&gt;&lt;P&gt; CALL FUNCTION 'DATE_GET_WEEK'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    date               = '20060807'&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   WEEK               = weeknum2&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   DATE_INVALID       = 1&lt;/P&gt;&lt;P&gt;   OTHERS             = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;week_diff = weeknum1 - weeknum2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : 'No of weeks pass ' , week_diff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Shakuntala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 07:41:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530177#M242375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-07T07:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: find the date functions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530178#M242376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANK YOU EVERYONE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 07:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530178#M242376</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-07T07:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: find the date functions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530179#M242377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; week_diff = weeknum1 - weeknum2.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; write : 'No of weeks pass ' , week_diff.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Rgds,&lt;/P&gt;&lt;P&gt;&amp;gt; Shakuntala&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry but this is the worst idea I can imagine. Hopefully you never used that in a productive environment. I'm now in a similar situation and found your thread while looking for some ideas to avoid unnecessary coding. Ok, it's now almost three years old, but perhaps someone might still read this.&lt;/P&gt;&lt;P&gt;Let weeknum1 be '200903' and weeknum2 be '200843' (yes, the FM returns YYYY.WW). Then the (mathematical) difference would be 60 "weeks", i.e. more than one year?? I don't think so.&lt;/P&gt;&lt;P&gt;Please be more carefully and test your coding against situations that one does not think about in the first moment, e.g. a change of year between to dates. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2008 16:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-the-date-functions/m-p/1530179#M242377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-10T16:33:25Z</dc:date>
    </item>
  </channel>
</rss>

