<?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 comparison in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531735#M574126</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you want to compare both times ? Can you please explian how you want ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i will tell you simple example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-uzeit = time. " Here both are time related variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whatever you have HH:MM -&amp;gt; convert them into HH:MM::SS ( as like sy-uzeit),move the value HH:MM:SS format,here SS always zero then do compare.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do always above method,explian me how you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Jul 2007 20:10:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-14T20:10:22Z</dc:date>
    <item>
      <title>Time comparison</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531731#M574122</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;is it possible to suppress the seconds of type SY-UZEIT. For a compare it is&lt;/P&gt;&lt;P&gt;important only the HOUR:and MINUTES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To keep it simple I also agree with FM's which are useful for that&lt;/P&gt;&lt;P&gt;purposes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ilhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2007 18:22:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531731#M574122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-14T18:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531732#M574123</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;Take a local variable of 5 characters and put the time in your local variable using the concept of Split and concatenate your original time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this local variable at the place where is your requirement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like...........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data ws_time(6) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate sy-uzeit&lt;EM&gt;0(2) ':' sy-uzeit&lt;/EM&gt;2(2) into ws_time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now your time will have only hrs and mins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use &lt;/P&gt;&lt;P&gt;set time = 'HH:MM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves ur issue. Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~~Guduri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2007 19:07:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531732#M574123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-14T19:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531733#M574124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here I have one simple example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data v_time type sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : v_time1(10) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : v_time2(5) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;split the 2 diffrent variable&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data : v_hh(2) type c,&lt;/P&gt;&lt;P&gt;       v_mm(2) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_time = sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move v_time to v_time1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_hh = v_time1+0(2).&lt;/P&gt;&lt;P&gt;v_mm = v_time1+2(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate v_hh ':' v_mm into v_time2.&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; v_time2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2007 19:57:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531733#M574124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-14T19:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531734#M574125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, thanks a lot of for these heplful hints.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But can you show me how a compare of two times takes place ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regeards&lt;/P&gt;&lt;P&gt;Ilhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2007 20:02:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531734#M574125</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-14T20:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531735#M574126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you want to compare both times ? Can you please explian how you want ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i will tell you simple example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-uzeit = time. " Here both are time related variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whatever you have HH:MM -&amp;gt; convert them into HH:MM::SS ( as like sy-uzeit),move the value HH:MM:SS format,here SS always zero then do compare.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do always above method,explian me how you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2007 20:10:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531735#M574126</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-14T20:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531736#M574127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you can try below FM to get time comparision or time diff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CCU_TIMESTAMP_DIFFERENCE&lt;/P&gt;&lt;P&gt;SCSM_TIME_DIFF_GET&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CBIH_LB39_TIMESTAMP_COMPARE&lt;/P&gt;&lt;P&gt;RH_WF_TIMESTAMP_COMPARE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2007 20:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531736#M574127</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-14T20:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531737#M574128</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;A simple solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In variable type TIMS, value is stored in the database as format  HHMMSS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: if you have two TIMS variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: var_time1 LIKE sy-uzeit.&lt;/P&gt;&lt;P&gt;           var_time2 LIKE sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you want to compare only HHMM of the time, you can use the normal  SAP logical operators like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sol. 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF var_time1(4) &amp;lt;any logical operator&amp;gt; var_time2(4).&lt;/P&gt;&lt;P&gt;*Your code&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;any logical operator&amp;gt; means  EQ, NE, GE, GT, LT, LE etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.soln:&lt;/P&gt;&lt;P&gt;CLEAR: var_time1,          &amp;lt;------000000&lt;/P&gt;&lt;P&gt;             var_time2.          &amp;lt;------000000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;Your time variable1&amp;gt;(4) TO var_time1.     &amp;lt;-------HHMM00&lt;/P&gt;&lt;P&gt;MOVE &amp;lt;Your time variable2&amp;gt;(4) TO var_time2.     &amp;lt;-------HHMM00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can use any noraml logical opeartors var_time1 &amp;amp; var_time2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF var_time1 [EQ, NE, GE, GT, LT, LE]  var_time2.&lt;/P&gt;&lt;P&gt;*Your code&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;A.Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jul 2007 00:50:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531737#M574128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-15T00:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531738#M574129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simply do like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: v_time1 like sy-uzeit,
      v_time2 like sy-uzeit.

v_time1+4(2) = '00'. " remove the seconds from v_time1
v_time2+4(2) = '00'. " remove the seconds from v_time2

*-- now you can compare them
if v_time1 = v_time2.
  write:/ 'The two times are same.'.
else.
  write:/ 'The two times are not same.'.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jul 2007 01:03:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531738#M574129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-15T01:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Time comparison</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531739#M574130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thank  you very very much for all your helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Long life the SAP COMMUNITY NETWORK!&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ilhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jul 2007 12:52:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-comparison/m-p/2531739#M574130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-15T12:52:53Z</dc:date>
    </item>
  </channel>
</rss>

