<?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: function module to find the working days between two dates. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548188#M853632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we us a comination of the following functions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE_CONVERT_TO_FACTORYDATE&lt;/P&gt;&lt;P&gt;RKE_SELECT_FACTDAYS_FOR_PERIOD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Mar 2008 10:12:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-24T10:12:08Z</dc:date>
    <item>
      <title>function module to find the working days between two dates.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548182#M853626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want a function module which calculates for me&lt;/P&gt;&lt;P&gt;the actaul working days between two dates.&lt;/P&gt;&lt;P&gt;for eg the working days between 9th march 2008 and 16th march is 5.&lt;/P&gt;&lt;P&gt;i tried a lot of searching...but havent still found one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i will continue searching but is anyone knows the FM please let me know.......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 09:51:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548182#M853626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T09:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: function module to find the working days between two dates.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548183#M853627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 10:00:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548183#M853627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T10:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: function module to find the working days between two dates.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548184#M853628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HOLIDAY_CHECK_AND_GET_INFO&lt;/P&gt;&lt;P&gt; Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the date is a holiday by checking the parameter HOLIDAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it may solve ur problem partially&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 10:00:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548184#M853628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T10:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: function module to find the working days between two dates.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548185#M853629</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;&lt;/P&gt;&lt;P&gt; Try with Fm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;K_ABC_WORKDAYS_FOR_PERIODS_GET&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 10:03:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548185#M853629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T10:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: function module to find the working days between two dates.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548186#M853630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi aditya ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   try this function module ..... &lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;WEEK_GET_NR_OF_WORKDAYS......&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;   i guess it will solve your problem....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont forgot to reward points.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Sreenivasa sarma k.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 10:07:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548186#M853630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T10:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: function module to find the working days between two dates.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548187#M853631</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 the below FM,&lt;/P&gt;&lt;P&gt;FORM add_working_days USING p_days&lt;/P&gt;&lt;P&gt;                      CHANGING p_paydate TYPE sy-datum.&lt;/P&gt;&lt;P&gt;  DATA: gd_factorydat LIKE scal-facdate,&lt;/P&gt;&lt;P&gt;        gd_resdate    LIKE sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            date                = p_paydate  "Starting date&lt;/P&gt;&lt;P&gt;            factory_calendar_id = 'GB'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            factorydate         = gd_factorydat. "Factory calender date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add n number of days to factory date, ignors non working days&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  gd_factorydat =  gd_factorydat + p_days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Convert factory date back to actual date&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'FACTORYDATE_CONVERT_TO_DATE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            factorydate         = gd_factorydat&lt;/P&gt;&lt;P&gt;            factory_calendar_id = 'GB'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            date                = gd_resdate. "Actual date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  p_paydate = gd_resdate.&lt;/P&gt;&lt;P&gt;ENDFORM.      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACTORYDATE_CONVERT_TO_DATE - In the factory calendar the working days are numbered sequentially from the first working day. The numbers of the working days are called factory dates. This function module calculates the date for a factory date.&lt;/P&gt;&lt;P&gt;DATE_CONVERT_TO_FACTORYDATE-In the factory calendar, the working days are numbered sequentially fromthe first working day. The working day numbers are called the factory date. This function module calculates the factory date for a calendar date. If the date passed is not a working day, the next or previous working day is calculated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewards points  if useful.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sandhya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 10:09:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548187#M853631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T10:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: function module to find the working days between two dates.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548188#M853632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we us a comination of the following functions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE_CONVERT_TO_FACTORYDATE&lt;/P&gt;&lt;P&gt;RKE_SELECT_FACTDAYS_FOR_PERIOD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 10:12:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548188#M853632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T10:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: function module to find the working days between two dates.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548189#M853633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the FM &lt;STRONG&gt;RKE_SELECT_FACTDAYS_FOR_PERIOD&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Pass I_DATAB as 01.01.2007
         I_DATBI as 31.12.2007
         I_FACTID as '01' 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my system 01 in table &lt;STRONG&gt;TFACD&lt;/STRONG&gt; indicates 5 working days in a week and the holiday calender &amp;lt;blank&amp;gt;. This will not consider holidays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to exclude holidays also, find a suitable factory calender id which has holiday calender id also included. In my system i could find one factory calender say US.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Pass I_DATAB as 01.01.2007
         I_DATBI as 31.12.2007
         I_FACTID as 'Z1' 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM will return all the days in an internal tbl. To get the count of the days, get the number of records returned in the internal table by using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; DESCRIBE &amp;lt;tbl&amp;gt; LINES &amp;lt;lines&amp;gt; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 10:34:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548189#M853633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T10:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: function module to find the working days between two dates.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548190#M853634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 10:53:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-find-the-working-days-between-two-dates/m-p/3548190#M853634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-29T10:53:11Z</dc:date>
    </item>
  </channel>
</rss>

