<?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: #Working day count in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-day-count/m-p/2176719#M462397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GR8, THANSK &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points r given&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Apr 2007 10:51:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-25T10:51:24Z</dc:date>
    <item>
      <title>#Working day count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-day-count/m-p/2176717#M462395</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 need some help from u all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when user enter any date , i.e. 2 April 2007 output should be 1.&lt;/P&gt;&lt;P&gt;Means count of working days .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If 9 april 2007 then output should be 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont worry about Points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 09:50:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-day-count/m-p/2176717#M462395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T09:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: #Working day count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-day-count/m-p/2176718#M462396</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 want to count the working days between 2 dates right? I had created a FM a few time ago for this reason. Check it out if it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION Z_COMPUTE_WORKING_DAYS.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     VALUE(I_DATE1) TYPE  DATUM
*"     VALUE(I_DATE2) TYPE  DATUM
*"     VALUE(I_FACTORY_CALENDAR_ID) LIKE  SCAL-FCALID DEFAULT 'ZG'
*"  EXPORTING
*"     VALUE(E_DAYS) TYPE  I
*"----------------------------------------------------------------------
  DATA : LV_WORKING_DAY TYPE DATUM,
         LV_INDICATOR LIKE SCAL-INDICATOR.

  CHECK I_DATE1 GT I_DATE2.
  LV_WORKING_DAY = I_DATE2.
  CLEAR E_DAYS.

  WHILE LV_WORKING_DAY NE I_DATE1.

    CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
      EXPORTING
        DATE                 = LV_WORKING_DAY
        FACTORY_CALENDAR_ID  = I_FACTORY_CALENDAR_ID
      IMPORTING
        WORKINGDAY_INDICATOR = LV_INDICATOR
      EXCEPTIONS
        OTHERS               = 1.

    IF SY-SUBRC &amp;lt;&amp;gt; 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    CASE LV_INDICATOR.
      WHEN ' '.
        ADD 1 TO E_DAYS.
        ADD 1 TO LV_WORKING_DAY.
      WHEN '+'.
        ADD 1 TO LV_WORKING_DAY.
    ENDCASE.

  ENDWHILE.


ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 10:14:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-day-count/m-p/2176718#M462396</guid>
      <dc:creator>kostas_tsioubris</dc:creator>
      <dc:date>2007-04-25T10:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: #Working day count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-day-count/m-p/2176719#M462397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GR8, THANSK &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points r given&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 10:51:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-day-count/m-p/2176719#M462397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T10:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: #Working day count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-day-count/m-p/2176720#M462398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;there is a stanadard function module &lt;/P&gt;&lt;P&gt;RKE_SELECT_FACTDAYS_FOR_PERIOD.&lt;/P&gt;&lt;P&gt;for this you need to pass&lt;/P&gt;&lt;P&gt;I_DATAB(start date)&lt;/P&gt;&lt;P&gt;I_DATBI(enddate)&lt;/P&gt;&lt;P&gt;I_FACTID(country code like 'US','IN')&lt;/P&gt;&lt;P&gt;then this will give the number of working days in ETH_DATS( table) ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope this will be useful..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 10:53:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-day-count/m-p/2176720#M462398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T10:53:08Z</dc:date>
    </item>
  </channel>
</rss>

