<?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 get time taking into account breaks in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-time-taking-into-account-breaks/m-p/9241992#M1719823</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oscar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no standard function module that suits your requirement&lt;/P&gt;&lt;P&gt;But refer to Standard function module CATT_ADD_TO_TIME and you can copy this function module to a custom function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module has the code as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;LOW&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DATE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;D &lt;SPAN class="L0S52"&gt;VALUE &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'19000101'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;S&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;16&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;P&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;S &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;IDATE &lt;SPAN class="L0S70"&gt;- &lt;/SPAN&gt;LOW&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DATE &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;* &lt;SPAN class="L0S32"&gt;86400 &lt;/SPAN&gt;+ ITIME&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;S &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;S + STDAZ * &lt;SPAN class="L0S32"&gt;3600&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;EDATE &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;LOW&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DATE &lt;/SPAN&gt;+ &lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;S &lt;SPAN class="L0S52"&gt;DIV &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;86400 &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;ETIME &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;S &lt;SPAN class="L0S52"&gt;MOD &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;86400&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will just need to replace the seconds 86400 to the seconds of the shift hours 5 hrs ( 18000 seconds).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. Let me know if additional info is required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tooshar Bendale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2013 11:30:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-02-01T11:30:40Z</dc:date>
    <item>
      <title>Function module to get time taking into account breaks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-time-taking-into-account-breaks/m-p/9241990#M1719821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know any function module to retrieve a finish date and finish time according to the initial date, the initial time &lt;SPAN style="text-decoration: underline;"&gt;and the shift time&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Initial date DD/MM/YYYY&lt;/LI&gt;&lt;LI&gt;Initial time HH:MM:SS&lt;/LI&gt;&lt;LI&gt;Time: minutes&lt;/LI&gt;&lt;LI&gt;Shift time: the job can only be scheduled from 8:00 -13:00 and 14:45-18:00&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to get:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Finish date DD/MM/YYYY&lt;/LI&gt;&lt;LI&gt;Finish time: HH:MM:SS&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if the job begins at:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Initial date: 31/01/2013&lt;/LI&gt;&lt;LI&gt;Initial time: 17:55&lt;/LI&gt;&lt;LI&gt;Time to finish: 30 minutes&lt;/LI&gt;&lt;LI&gt;Shift time: 8:00 -13:00 and 14:45-18:00&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module should give the following result:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Finish date: 01/02/2013&lt;/LI&gt;&lt;LI&gt;Finish time: 8:25&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Oscar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 16:16:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-time-taking-into-account-breaks/m-p/9241990#M1719821</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-31T16:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get time taking into account breaks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-time-taking-into-account-breaks/m-p/9241991#M1719822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No answers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 10:46:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-time-taking-into-account-breaks/m-p/9241991#M1719822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-01T10:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get time taking into account breaks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-time-taking-into-account-breaks/m-p/9241992#M1719823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oscar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no standard function module that suits your requirement&lt;/P&gt;&lt;P&gt;But refer to Standard function module CATT_ADD_TO_TIME and you can copy this function module to a custom function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module has the code as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;LOW&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DATE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;D &lt;SPAN class="L0S52"&gt;VALUE &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'19000101'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;S&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;16&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;P&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;S &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;IDATE &lt;SPAN class="L0S70"&gt;- &lt;/SPAN&gt;LOW&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DATE &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;* &lt;SPAN class="L0S32"&gt;86400 &lt;/SPAN&gt;+ ITIME&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;S &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;S + STDAZ * &lt;SPAN class="L0S32"&gt;3600&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;EDATE &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;LOW&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DATE &lt;/SPAN&gt;+ &lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;S &lt;SPAN class="L0S52"&gt;DIV &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;86400 &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;ETIME &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;S &lt;SPAN class="L0S52"&gt;MOD &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;86400&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will just need to replace the seconds 86400 to the seconds of the shift hours 5 hrs ( 18000 seconds).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. Let me know if additional info is required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tooshar Bendale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 11:30:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-time-taking-into-account-breaks/m-p/9241992#M1719823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-01T11:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to get time taking into account breaks</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-time-taking-into-account-breaks/m-p/9241993#M1719824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Tooshar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 13:41:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-get-time-taking-into-account-breaks/m-p/9241993#M1719824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-01T13:41:27Z</dc:date>
    </item>
  </channel>
</rss>

