<?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 and Date condition. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-and-date-condition/m-p/4669831#M1098434</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;Sample code for your requirement;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data :   lv_date type d, "date
         lv_time type t, " time
         lv_time_x type t, "time after x minutes
         X type i. " minutes

lv_time = sy-uzeit. " current time
lv_time_x = sy-uzeit + ( X * 60 ).  "convert minutes to seconds and add to time
lv_date = sy-datum. " current date.

* Now you can check as
if MKPF-CPUDt EQ lv_date and ( MKPF-CPUTM GT lv_time and MKPF-CPUTM LE lv_time_x )
* Statements here
Endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to substitute sy-uzeit with CPUTM of the current order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert back if you have any doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Oct 2008 06:11:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-23T06:11:30Z</dc:date>
    <item>
      <title>Time and Date condition.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-and-date-condition/m-p/4669830#M1098433</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;         The secanrio is like I have to update the time and date.Like in MKPF table i have fields CPUTM  and CPUDT.so when an internal order get created it should check for the next "X" mins so that for next "X" if there is any new order has been created or not (i.e Sy-uzeit + X mins) and also display date that is eauql to sy-datum.How to code this in a very simple manner.Your answer will be very helpful.&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;Swathi.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2008 05:38:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-and-date-condition/m-p/4669830#M1098433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-23T05:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Time and Date condition.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-and-date-condition/m-p/4669831#M1098434</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;Sample code for your requirement;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data :   lv_date type d, "date
         lv_time type t, " time
         lv_time_x type t, "time after x minutes
         X type i. " minutes

lv_time = sy-uzeit. " current time
lv_time_x = sy-uzeit + ( X * 60 ).  "convert minutes to seconds and add to time
lv_date = sy-datum. " current date.

* Now you can check as
if MKPF-CPUDt EQ lv_date and ( MKPF-CPUTM GT lv_time and MKPF-CPUTM LE lv_time_x )
* Statements here
Endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to substitute sy-uzeit with CPUTM of the current order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert back if you have any doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2008 06:11:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-and-date-condition/m-p/4669831#M1098434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-23T06:11:30Z</dc:date>
    </item>
  </channel>
</rss>

