<?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: Need a Function Module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-a-function-module/m-p/4338897#M1033516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by weekend do you mean u want to exclude 1 weekend or 2 days of a weekend.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get day of week number for date using following logic...(the FM is /ITSAM/HC_DATE_TO_WEEK but if you don't have it..here is the code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA l_year TYPE i.&lt;/P&gt;&lt;P&gt;  DATA l_month TYPE i.&lt;/P&gt;&lt;P&gt;  DATA l_day TYPE i.&lt;/P&gt;&lt;P&gt;  DATA l_day_of_week TYPE i.&lt;/P&gt;&lt;P&gt;  DATA l_temp TYPE f.&lt;/P&gt;&lt;P&gt;  l_year = i_date(4).&lt;/P&gt;&lt;P&gt;  l_month = i_date+4(2).&lt;/P&gt;&lt;P&gt;  l_day = i_date+6(2).&lt;/P&gt;&lt;P&gt;  IF l_month &amp;lt; 3.&lt;/P&gt;&lt;P&gt;    l_year = l_year - 1.&lt;/P&gt;&lt;P&gt;    l_month = l_month + 12.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day.&lt;/P&gt;&lt;P&gt;  l_temp = 153 * l_month - 457.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week + ( l_temp ) DIV 5.&lt;/P&gt;&lt;P&gt;  l_temp = '365.25' * l_year.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week + FLOOR( l_temp ).&lt;/P&gt;&lt;P&gt;  l_temp = l_year * '0.01'.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week - FLOOR( l_temp ).&lt;/P&gt;&lt;P&gt;  l_temp = l_year * '0.0025'.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week + FLOOR( l_temp ).&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week + 2.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week MOD 7.&lt;/P&gt;&lt;P&gt;  IF l_day_of_week &amp;lt; 0.&lt;/P&gt;&lt;P&gt;    l_day_of_week = l_day_of_week + 7.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  e_day_of_week = l_day_of_week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i_date is the input date and e_day_of_week is the number for weekday (eg monday will be 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after getting this number....get weekday names with numbers using WEEKDAY_GET function module...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you can find that against 1, there will be monday , 2-tuesday and so on..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use this logic to go further&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Aug 2008 09:43:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-14T09:43:51Z</dc:date>
    <item>
      <title>Need a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-a-function-module/m-p/4338895#M1033514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need a function module which can find out the weekends in between 2 dates. I need this to count the days between the two given dates &lt;STRONG&gt;excluding&lt;/STRONG&gt; the weekends.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 09:37:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-a-function-module/m-p/4338895#M1033514</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T09:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-a-function-module/m-p/4338896#M1033515</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;       Check the following functional modules.&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;&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;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;DATE_TO_DAY : Returns the Day for the entered date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is helps,,,&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;T.D.M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 09:40:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-a-function-module/m-p/4338896#M1033515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T09:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need a Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-a-function-module/m-p/4338897#M1033516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by weekend do you mean u want to exclude 1 weekend or 2 days of a weekend.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get day of week number for date using following logic...(the FM is /ITSAM/HC_DATE_TO_WEEK but if you don't have it..here is the code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA l_year TYPE i.&lt;/P&gt;&lt;P&gt;  DATA l_month TYPE i.&lt;/P&gt;&lt;P&gt;  DATA l_day TYPE i.&lt;/P&gt;&lt;P&gt;  DATA l_day_of_week TYPE i.&lt;/P&gt;&lt;P&gt;  DATA l_temp TYPE f.&lt;/P&gt;&lt;P&gt;  l_year = i_date(4).&lt;/P&gt;&lt;P&gt;  l_month = i_date+4(2).&lt;/P&gt;&lt;P&gt;  l_day = i_date+6(2).&lt;/P&gt;&lt;P&gt;  IF l_month &amp;lt; 3.&lt;/P&gt;&lt;P&gt;    l_year = l_year - 1.&lt;/P&gt;&lt;P&gt;    l_month = l_month + 12.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day.&lt;/P&gt;&lt;P&gt;  l_temp = 153 * l_month - 457.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week + ( l_temp ) DIV 5.&lt;/P&gt;&lt;P&gt;  l_temp = '365.25' * l_year.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week + FLOOR( l_temp ).&lt;/P&gt;&lt;P&gt;  l_temp = l_year * '0.01'.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week - FLOOR( l_temp ).&lt;/P&gt;&lt;P&gt;  l_temp = l_year * '0.0025'.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week + FLOOR( l_temp ).&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week + 2.&lt;/P&gt;&lt;P&gt;  l_day_of_week = l_day_of_week MOD 7.&lt;/P&gt;&lt;P&gt;  IF l_day_of_week &amp;lt; 0.&lt;/P&gt;&lt;P&gt;    l_day_of_week = l_day_of_week + 7.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  e_day_of_week = l_day_of_week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i_date is the input date and e_day_of_week is the number for weekday (eg monday will be 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after getting this number....get weekday names with numbers using WEEKDAY_GET function module...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you can find that against 1, there will be monday , 2-tuesday and so on..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use this logic to go further&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 09:43:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-a-function-module/m-p/4338897#M1033516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T09:43:51Z</dc:date>
    </item>
  </channel>
</rss>

