<?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: Time Difference in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference/m-p/2269795#M492961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here my solution, may not be sleek but serves the purpose :).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zsa_temp2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_end_time TYPE uplend VALUE '140000',&lt;/P&gt;&lt;P&gt;       lv_seconds  TYPE sytabix,&lt;/P&gt;&lt;P&gt;       lv_total_seconds TYPE sytabix,&lt;/P&gt;&lt;P&gt;       lv_rem_seconds TYPE sytabix,&lt;/P&gt;&lt;P&gt;       lv_temp_hours TYPE uplend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_total_seconds = 5 * 60 * 60.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SWI_DURATION_DETERMINE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    start_date = sy-datum&lt;/P&gt;&lt;P&gt;    end_date   = sy-datum&lt;/P&gt;&lt;P&gt;    start_time = sy-uzeit&lt;/P&gt;&lt;P&gt;    end_time   = lv_end_time&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    duration   = lv_seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_rem_seconds = lv_total_seconds - lv_seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_rem_seconds = lv_rem_seconds MOD 86400.&lt;/P&gt;&lt;P&gt;lv_temp_hours = lv_rem_seconds.&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; lv_temp_hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sunil Achyut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 May 2007 17:46:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-22T17:46:01Z</dc:date>
    <item>
      <title>Time Difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference/m-p/2269792#M492958</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;Am trying to find out time difference and add hours to it. The following is what I am trying to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the following case lets assume the system time to be 12:30:20'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_end_time TYPE uplend VALUE '130000',&lt;/P&gt;&lt;P&gt;lv_total_hours_to_add type i value 5,&lt;/P&gt;&lt;P&gt;lv_hours_done type uplend,&lt;/P&gt;&lt;P&gt;lv_hours_left type ???????.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_hours_done = lv_end_time - sy-uzeit. (will have '00:29:40').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to subtract this from the lv_total_hours_to_add and store the result in &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in my lv_hours_left, I want the value 4 hours 30 minutes and 20 seconds, how would I do this.  I tried all the function modules suggested in the forum but still am unable to figure it out, guess its that part of the day where my mind goes to hibernation :).  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would appreciate help with the above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sunil Achyut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 17:17:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference/m-p/2269792#M492958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T17:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference/m-p/2269793#M492959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found out the answer myself.  Easier than what I thought, will post the solution I have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunil Achyut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 17:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference/m-p/2269793#M492959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T17:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference/m-p/2269794#M492960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could make lv_total_hours_to_add and lv_hours_left the same type as the other time fields (uplend) and set the value to '050000'.  Then you should be able to just use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_hours_left = lv_total_hours_to_add - lv_hours_done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps. &lt;/P&gt;&lt;P&gt; - April King&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 17:25:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference/m-p/2269794#M492960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T17:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference/m-p/2269795#M492961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here my solution, may not be sleek but serves the purpose :).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zsa_temp2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_end_time TYPE uplend VALUE '140000',&lt;/P&gt;&lt;P&gt;       lv_seconds  TYPE sytabix,&lt;/P&gt;&lt;P&gt;       lv_total_seconds TYPE sytabix,&lt;/P&gt;&lt;P&gt;       lv_rem_seconds TYPE sytabix,&lt;/P&gt;&lt;P&gt;       lv_temp_hours TYPE uplend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_total_seconds = 5 * 60 * 60.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SWI_DURATION_DETERMINE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    start_date = sy-datum&lt;/P&gt;&lt;P&gt;    end_date   = sy-datum&lt;/P&gt;&lt;P&gt;    start_time = sy-uzeit&lt;/P&gt;&lt;P&gt;    end_time   = lv_end_time&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    duration   = lv_seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_rem_seconds = lv_total_seconds - lv_seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_rem_seconds = lv_rem_seconds MOD 86400.&lt;/P&gt;&lt;P&gt;lv_temp_hours = lv_rem_seconds.&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; lv_temp_hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sunil Achyut&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 17:46:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference/m-p/2269795#M492961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T17:46:01Z</dc:date>
    </item>
  </channel>
</rss>

