<?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: Calculate Time after 24 hours in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326674#M1030933</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;PRE&gt;&lt;CODE&gt;
DATA: T1 TYPE T,
      T2 TYPE T,
      TSUM LIKE TVRO-FAHZTD.
FIELD-SYMBOLS: &amp;lt;H&amp;gt;, &amp;lt;M&amp;gt;, &amp;lt;S&amp;gt;.

T1 = '801000'.
T2 = '303000'.

ASSIGN T1+0(2) TO &amp;lt;H&amp;gt;.
ASSIGN T1+2(2) TO &amp;lt;M&amp;gt;.
ASSIGN T1+4(2) TO &amp;lt;S&amp;gt;.
TSUM = TSUM + ( &amp;lt;H&amp;gt; * 10000 ) + ( &amp;lt;M&amp;gt; * 100 ) + &amp;lt;S&amp;gt;.

ASSIGN T2+0(2) TO &amp;lt;H&amp;gt;.
ASSIGN T2+2(2) TO &amp;lt;M&amp;gt;.
ASSIGN T2+4(2) TO &amp;lt;S&amp;gt;.
TSUM = TSUM + ( &amp;lt;H&amp;gt; * 10000 ) + ( &amp;lt;M&amp;gt; * 100 ) + &amp;lt;S&amp;gt;.

WRITE TSUM.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example time1 = 80:10:00 and time2 = 30:30:00&lt;/P&gt;&lt;P&gt;Result is 110:40&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Aug 2008 07:34:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-22T07:34:00Z</dc:date>
    <item>
      <title>Calculate Time after 24 hours</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326671#M1030930</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;In one of my report I need to calculate the total working hours for a group of employees in a particular week.&lt;/P&gt;&lt;P&gt;in this we have requirement to sort the hours like  total ordinary hours,one and half pay hours and double pay hours.&lt;/P&gt;&lt;P&gt;My issue is I want to add the total hours for two timings.&lt;/P&gt;&lt;P&gt; For Example     30:00:00( time 1)&lt;/P&gt;&lt;P&gt;                        25:30:00(time 2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The total hours should show as 55.30.00   but as the time is only 24:00:00 after 24&lt;/P&gt;&lt;P&gt;it starts with 00:00:00 and shows the output as 07:30:00&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 found a function module 'SD_CALC_DURATION_FROM_DATETIME'  to count after 24 hours but this did not help me as this is using date.&lt;/P&gt;&lt;P&gt;in my logic we first check for each day so working hours will never be over 24 hours but after &lt;/P&gt;&lt;P&gt;processing all records in  a loop we need to sum up the hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could any one please suggest me a solution to count after 24 hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Rayudu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 07:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326671#M1030930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T07:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time after 24 hours</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326672#M1030931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hope this FM can help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SD_DATETIME_DIFFERENCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 07:24:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326672#M1030931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T07:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time after 24 hours</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326673#M1030932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey i have similar code,&lt;/P&gt;&lt;P&gt;just excute it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: a type sy-uzeit,&lt;/P&gt;&lt;P&gt;      b type sy-uzeit,  c(2),d(2),e(2),f(2),g(8),h(2).&lt;/P&gt;&lt;P&gt;a = sy-uzeit.&lt;/P&gt;&lt;P&gt;b = sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  c = a+0(2) + B+0(2).&lt;/P&gt;&lt;P&gt;  d = a+2(2) + b+2(2).&lt;/P&gt;&lt;P&gt;  e = a+4(2) + b+4(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if e &amp;gt; 60.&lt;/P&gt;&lt;P&gt;  h = e / 60.&lt;/P&gt;&lt;P&gt;  e = e mod 60.&lt;/P&gt;&lt;P&gt;  d = d + h.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  if d  &amp;gt; 60.&lt;/P&gt;&lt;P&gt;    f = d / 60.&lt;/P&gt;&lt;P&gt;    d = d mod 60.&lt;/P&gt;&lt;P&gt;    c = c + f.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; CONCATENATE c ':' d ':' e into g.&lt;/P&gt;&lt;P&gt;  write:/ a,/ b,/ c,/ d, / e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write:/ 'time is',g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*if u dont get the code.use debuger'or reply me back&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 07:30:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326673#M1030932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T07:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time after 24 hours</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326674#M1030933</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;PRE&gt;&lt;CODE&gt;
DATA: T1 TYPE T,
      T2 TYPE T,
      TSUM LIKE TVRO-FAHZTD.
FIELD-SYMBOLS: &amp;lt;H&amp;gt;, &amp;lt;M&amp;gt;, &amp;lt;S&amp;gt;.

T1 = '801000'.
T2 = '303000'.

ASSIGN T1+0(2) TO &amp;lt;H&amp;gt;.
ASSIGN T1+2(2) TO &amp;lt;M&amp;gt;.
ASSIGN T1+4(2) TO &amp;lt;S&amp;gt;.
TSUM = TSUM + ( &amp;lt;H&amp;gt; * 10000 ) + ( &amp;lt;M&amp;gt; * 100 ) + &amp;lt;S&amp;gt;.

ASSIGN T2+0(2) TO &amp;lt;H&amp;gt;.
ASSIGN T2+2(2) TO &amp;lt;M&amp;gt;.
ASSIGN T2+4(2) TO &amp;lt;S&amp;gt;.
TSUM = TSUM + ( &amp;lt;H&amp;gt; * 10000 ) + ( &amp;lt;M&amp;gt; * 100 ) + &amp;lt;S&amp;gt;.

WRITE TSUM.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example time1 = 80:10:00 and time2 = 30:30:00&lt;/P&gt;&lt;P&gt;Result is 110:40&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 07:34:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326674#M1030933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T07:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Time after 24 hours</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326675#M1030934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;your table will have the time field and the select statement &lt;/P&gt;&lt;P&gt;will take all the records in to the table right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after that:&lt;/P&gt;&lt;P&gt;loop at the table and use the COLLECT command that will automatically sum up the numeric values that are in your table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement inserts the contents of a work area wa either as single row into an internal table itab or adds the values of its numeric components to the corresponding values of existing rows with the same key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Rashmi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 08:03:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-time-after-24-hours/m-p/4326675#M1030934</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T08:03:13Z</dc:date>
    </item>
  </channel>
</rss>

