<?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: Wrong Calculate Total Time in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320283#M1536791</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, your solution correct but only for one day or 24 hours. I want to calculate maybe 5 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZZ_TEST .
DATA : LV1 TYPE sy-uzeit,
LV2 TYPE sy-uzeit,
LV3 TYPE sy-uzeit,
LV4 TYPE sy-uzeit,
LV5 TYPE sy-uzeit,
LV6 TYPE sy-uzeit,
LV7 TYPE sy-uzeit,
LVT TYPE sy-uzeit.

LV1 = '003000'.
LV2 = '003000'.
LV3 = '220000'.
LV4 = '004000'.
LV5 = '005000'.
LV6 = '002500'.
LV7 = '003000'.

LVT = LV1 + LV2 + LV3 + LV4 + LV5 + LV6 + LV7.
WRITE : LVT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Result : 00:25:00 (I think wrong) &lt;/P&gt;&lt;P&gt;             25:25:00 (I want to show this time)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Oct 2010 06:43:42 GMT</pubDate>
    <dc:creator>former_member212713</dc:creator>
    <dc:date>2010-10-05T06:43:42Z</dc:date>
    <item>
      <title>Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320276#M1536784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote a program. My purpose is calculate total time. But I dont know, this program calculate wrong total time. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZZ_TEST .
DATA : LV1 TYPE FAHZTD,
       LV2 TYPE FAHZTD,
       LV3 TYPE FAHZTD,
       LV4 TYPE FAHZTD,
       LV5 TYPE FAHZTD,
       LV6 TYPE FAHZTD,
       LV7 TYPE FAHZTD,
       LVT TYPE FAHZTD.
LV1 = 3000.
LV2 = 3000.
LV3 = 10000.
LV4 = 4000.
LV5 = 5000.
LV6 = 2500.
LV7 = 3000.
LVT = LV1 + LV2 + LV3 + LV4 + LV5 + LV6 + LV7.
WRITE : LVT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result : 3:05 (wrong)&lt;/P&gt;&lt;P&gt;             4:25 (correct)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for helping.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 05:41:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320276#M1536784</guid>
      <dc:creator>former_member212713</dc:creator>
      <dc:date>2010-10-05T05:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320277#M1536785</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;System is showing the correct time .. let us know how you arrived 4:25 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;JK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 05:58:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320277#M1536785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T05:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320278#M1536786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You have specified these values, are they seconds?&lt;/P&gt;&lt;P&gt;I mean 3000 Seconds, 10000 Seconds? is it so?&lt;/P&gt;&lt;P&gt;if it is so, then...&lt;/P&gt;&lt;P&gt;3000 Seconds / 60 = 50 Minitues and&lt;/P&gt;&lt;P&gt;50 Minutes / 60 = 0.833 Hr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am i getting right?&lt;/P&gt;&lt;P&gt;please don't mind, i am new to SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;Sachin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Updated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that we need to use SY-UZEIT while declarations, so I think Srini's codes will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sachin Bhatt IN on Oct 5, 2010 12:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 05:59:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320278#M1536786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T05:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320279#M1536787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My system showed 3:05 . Which version your SAP?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 06:06:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320279#M1536787</guid>
      <dc:creator>former_member212713</dc:creator>
      <dc:date>2010-10-05T06:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320280#M1536788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LV1 = 3000. (30 min)&lt;/P&gt;&lt;P&gt;LV2 = 3000. (30 min)&lt;/P&gt;&lt;P&gt;LV3 = 10000. (1 hour) = (60 min)&lt;/P&gt;&lt;P&gt;LV4 = 4000. (40 min)&lt;/P&gt;&lt;P&gt;LV5 = 5000. (50 min)&lt;/P&gt;&lt;P&gt;LV6 = 2500. (25 min)&lt;/P&gt;&lt;P&gt;LV7 = 3000. (30 min)&lt;/P&gt;&lt;P&gt; total : 4 h 25 min or 265 min.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 06:10:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320280#M1536788</guid>
      <dc:creator>former_member212713</dc:creator>
      <dc:date>2010-10-05T06:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320281#M1536789</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;      Write the coding as :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : LV1 TYPE sy-uzeit,&lt;/P&gt;&lt;P&gt;       LV2 TYPE sy-uzeit,&lt;/P&gt;&lt;P&gt;       LV3 TYPE sy-uzeit,&lt;/P&gt;&lt;P&gt;       LV4 TYPE sy-uzeit,&lt;/P&gt;&lt;P&gt;       LV5 TYPE sy-uzeit,&lt;/P&gt;&lt;P&gt;       LV6 TYPE sy-uzeit,&lt;/P&gt;&lt;P&gt;       LV7 TYPE sy-uzeit,&lt;/P&gt;&lt;P&gt;       LVT TYPE sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LV1 = '003000'.&lt;/P&gt;&lt;P&gt;LV2 = '003000'.&lt;/P&gt;&lt;P&gt;LV3 = '010000'.&lt;/P&gt;&lt;P&gt;LV4 = '004000'.&lt;/P&gt;&lt;P&gt;LV5 = '005000'.&lt;/P&gt;&lt;P&gt;LV6 = '002500'.&lt;/P&gt;&lt;P&gt;LV7 = '003000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LVT = LV1 + LV2 + LV3 + LV4 + LV5 + LV6 + LV7.&lt;/P&gt;&lt;P&gt;WRITE : LVT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 06:29:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320281#M1536789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T06:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320282#M1536790</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 can use systtimlo instead of fahztd. Any particular reason you are using the same?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 06:38:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320282#M1536790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T06:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320283#M1536791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, your solution correct but only for one day or 24 hours. I want to calculate maybe 5 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZZ_TEST .
DATA : LV1 TYPE sy-uzeit,
LV2 TYPE sy-uzeit,
LV3 TYPE sy-uzeit,
LV4 TYPE sy-uzeit,
LV5 TYPE sy-uzeit,
LV6 TYPE sy-uzeit,
LV7 TYPE sy-uzeit,
LVT TYPE sy-uzeit.

LV1 = '003000'.
LV2 = '003000'.
LV3 = '220000'.
LV4 = '004000'.
LV5 = '005000'.
LV6 = '002500'.
LV7 = '003000'.

LVT = LV1 + LV2 + LV3 + LV4 + LV5 + LV6 + LV7.
WRITE : LVT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Result : 00:25:00 (I think wrong) &lt;/P&gt;&lt;P&gt;             25:25:00 (I want to show this time)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 06:43:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320283#M1536791</guid>
      <dc:creator>former_member212713</dc:creator>
      <dc:date>2010-10-05T06:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320284#M1536792</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;It is very Basic Question i am Replying because every one is Confuse. Check the Bellow Sample Code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: LV1 TYPE p,
      LV2 TYPE p,
      LVT TYPE sy-uzeit.

LV1 = 3000 . " = 50 min
lv2 = 6000 . " = 100 min
LVT = LV1 + LV2. " 50 + 100 = 150 / 60 = 2 Hours and 30 Min 
"         (SY-UZEIT use Seconds for Calculation)
WRITE : LVT." here the output will (02:30:00) &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Oct 5, 2010 9:25 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 06:58:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320284#M1536792</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2010-10-05T06:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320285#M1536793</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;I want to calculate a lot of time. For example monthly machine downtime. Maybe one machine downtime total 48 hours. My customers want to see downtime items and total downtime on ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 06:59:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320285#M1536793</guid>
      <dc:creator>former_member212713</dc:creator>
      <dc:date>2010-10-05T06:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320286#M1536794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please new code again run. If total time &amp;gt; 24 hours then reset time. But I dont want to reset time.  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
REPORT ZZ_TEST .
DATA: LV1 TYPE p,
      LV2 TYPE p,
      LVT TYPE sy-uzeit.

LV1 = 83000. " = 50 min
lv2 = 6000. " = 100 min
LVT = LV1 + LV2. " 50 + 100 = 150 / 60 = 2 Hours and 30 Min (SY-UZEIT
"use Seconds for Calculation)
WRITE : LVT." here the output will (02:30:00)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 07:09:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320286#M1536794</guid>
      <dc:creator>former_member212713</dc:creator>
      <dc:date>2010-10-05T07:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320287#M1536795</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 need to write a small program using FM TIMESTAMP_DURATION_ADD.&lt;/P&gt;&lt;P&gt;      For this declare a dummy variable with some timestamp say '20000101000001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DATA : TIMESTAMP_OUT TYPE  TIMESTAMP ,&lt;/P&gt;&lt;P&gt;                   TIMESTAMP_IN TYPE  TIMESTAMP  ,&lt;/P&gt;&lt;P&gt;                   duration type i value  1440 . "  duration should be in minutes only .... &lt;/P&gt;&lt;P&gt;                   diff(10) type C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TIMESTAMP_IN = '20000101000001'.  &amp;lt;-- a dummy value for input&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TIMESTAMP_DURATION_ADD'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   TIMESTAMP_IN          = TIMESTAMP_IN&lt;/P&gt;&lt;P&gt;   TIMEZONE              = 'UTC'&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;DURATION              = duration    "&amp;lt;---  add all your minutes and pass here&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    UNIT                  = 'MIN'          "  &amp;lt;-- MIN  .. &lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   TIMESTAMP_OUT         = TIMESTAMP_OUT&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   TIMESTAMP_ERROR       = 1&lt;/P&gt;&lt;P&gt;   OTHERS                = 2&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  diff = TIMESTAMP_OUT - TIMESTAMP_IN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; diff.  &amp;lt;-- now this has the time in Days , Hours , Minutes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 11:53:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320287#M1536795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T11:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong Calculate Total Time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320288#M1536796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please see &lt;SPAN __jive_macro_name="thread" id="1170968"&gt;&lt;/SPAN&gt; before posting. Do not ask basic date/time questions - post locked

Rob&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 13:25:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-calculate-total-time/m-p/7320288#M1536796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T13:25:31Z</dc:date>
    </item>
  </channel>
</rss>

