<?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 between the fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183918#M1199899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,The threads helped to solve my requirement.But unfortunately the requirement has changed slightly by changed.Now they  days and hours format.&lt;/P&gt;&lt;P&gt;ex : &lt;STRONG&gt;5 days 15 hrs 16mins 2 secs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please Help me.This needs to be finished my tomorrow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Feb 2009 12:47:43 GMT</pubDate>
    <dc:creator>nivaskumar2</dc:creator>
    <dc:date>2009-02-19T12:47:43Z</dc:date>
    <item>
      <title>Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183911#M1199892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two date fields &lt;STRONG&gt;from_date and to_date&lt;/STRONG&gt; .I have to time fields &lt;STRONG&gt;from_time  and to_time&lt;/STRONG&gt;.I need to calculate the difference in hours between   &lt;STRONG&gt;(from_date,from time ) and (To_date,to_time)&lt;/STRONG&gt; in hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used various function modules to get the difference.i used GET_DELTA_TIME_FROM_DT it worked but it will convert the output to zero if the hours exceeds 240000 hrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you Please help to get my requirement.As this stopping my work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 09:19:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183911#M1199892</guid>
      <dc:creator>nivaskumar2</dc:creator>
      <dc:date>2009-02-19T09:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183912#M1199893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SD_CALC_DURATION_FROM_DATETIME: Find the difference between two date/time and report the difference in hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check whether this cud help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 09:22:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183912#M1199893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-19T09:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183913#M1199894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FM &lt;STRONG&gt;SD_DATETIME_DIFFERENCE&lt;/STRONG&gt; u2013 Difference in days and time for two dates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 09:24:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183913#M1199894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-19T09:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183914#M1199895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FM  &lt;STRONG&gt;/SDF/CMO_DATETIME_DIFFERENCE&lt;/STRONG&gt; and convert into hrs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 09:27:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183914#M1199895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-19T09:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183915#M1199896</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;Test the following Sample Code hope will solve out your problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: t1 TYPE t,
      t2 TYPE t,
      def TYPE p.

t1 = '080808'.
t2 = '090909'.

BREAK-POINT.
CALL FUNCTION 'SD_DATETIME_DIFFERENCE'
  EXPORTING
    date1                  = '20090101'
    time1                  = t1
    date2                  = '20090101'
    time2                  = t2
 IMPORTING
*   DATEDIFF               =
   TIMEDIFF               = def
*   EARLIEST               =
 EXCEPTIONS
   INVALID_DATETIME       = 1
   OTHERS                 = 2
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


WRITE: / t1, / t2, / def.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 09:31:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183915#M1199896</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-02-19T09:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183916#M1199897</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;try these function modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SD_CALC_DURATION_FROM_DATETIME&lt;/P&gt;&lt;P&gt;SD_DATETIME_DIFFERENCE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jyothi CH.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 09:34:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183916#M1199897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-19T09:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183917#M1199898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TRY &lt;/P&gt;&lt;P&gt;fm : ISHMED_CALC_DATE_TIME_DIFF&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shashi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 09:34:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183917#M1199898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-19T09:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183918#M1199899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,The threads helped to solve my requirement.But unfortunately the requirement has changed slightly by changed.Now they  days and hours format.&lt;/P&gt;&lt;P&gt;ex : &lt;STRONG&gt;5 days 15 hrs 16mins 2 secs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please Help me.This needs to be finished my tomorrow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 12:47:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183918#M1199899</guid>
      <dc:creator>nivaskumar2</dc:creator>
      <dc:date>2009-02-19T12:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183919#M1199900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put on your spider man dress and there you go!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 12:59:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183919#M1199900</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-02-19T12:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183920#M1199901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: from_date TYPE d,
      to_date TYPE d,
      diff_date TYPE p DECIMALS 2,
      from_time TYPE t,
      to_time TYPE t,
      diff_time TYPE p DECIMALS 2.
from_date = sy-datum - 5.
to_date = sy-datum.
from_time = 120000.
to_time = 115555.
CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'
  EXPORTING
    date1                  = from_date
    time1                  = from_time
    date2                  = to_date
    time2                  = to_time
 IMPORTING
   datediff               = diff_date
   timediff               = diff_time.
WRITE: diff_date, diff_time.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2009 14:35:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183920#M1199901</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-19T14:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Time Difference between the fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183921#M1199902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                   Your suggestions and recomendations has helped me solve my requirement. Thank you all for your support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2009 07:33:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-difference-between-the-fields/m-p/5183921#M1199902</guid>
      <dc:creator>nivaskumar2</dc:creator>
      <dc:date>2009-02-20T07:33:54Z</dc:date>
    </item>
  </channel>
</rss>

