<?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: Dynamic variant - time variable in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079334#M97307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I meant we can't avoid running the program past midnight most of the times. SO i was suggesting a way to come around this issue if we the past midnight scenario can't be avoided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Nov 2005 02:54:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-26T02:54:29Z</dc:date>
    <item>
      <title>Dynamic variant - time variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079328#M97301</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;I want to create a variant for an IDoc housekeeping program (rbdmani2) and I want to save the following in a program variant:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the current date (I have managed to use a dynamic variable for this) and IDocs created in the past hour, i.e. the select option for Creation time should be "from"='current time-1hour' and "to"='current time'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I express current time minus 1 hour and the current time respectively?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice. Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;::Ellen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2005 16:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079328#M97301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-25T16:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic variant - time variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079329#M97302</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;This link may help you..&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="766266"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sailaja.&lt;/P&gt;&lt;P&gt;Reward points to helpful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2005 16:08:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079329#M97302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-25T16:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic variant - time variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079330#M97303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ellen - what do you want to do if the current time is say 00:30:00 (half past midnight)? Do you need to look at the date as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2005 16:20:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079330#M97303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-25T16:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic variant - time variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079331#M97304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you may want something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztest NO STANDARD PAGE HEADING LINE-SIZE 135 LINE-COUNT 65.

DATA: cur_date LIKE sy-datum,
      pre_date LIKE sy-datum,
      cur_time LIKE sy-uzeit,
      pre_time LIKE sy-uzeit.

cur_date = sy-datum.
cur_time = sy-uzeit.

pre_date = cur_date.
IF cur_time(2) = '00'.
  pre_date = pre_date - 1.
  pre_time = cur_time + 82800.
ELSE.
  pre_time = cur_time - 3600.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2005 16:33:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079331#M97304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-25T16:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic variant - time variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079332#M97305</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't perform the dynamic calculation on the TIME selection fields. That is possible only for DATE fields. So you may have to write a custom wrapper program with same selection screen as RBDMANI2 and then call program RBDMANI2 using SUBMIT from your custom program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your custom program, you can set the time values in the Initialization block as &lt;/P&gt;&lt;P&gt;S_TIME-low = sy-uzeit - 60.&lt;/P&gt;&lt;P&gt;s_time-high = sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the variant you are going to create, for the time field select as P - "Save Field without values". This way the values maintained in the initialization blcok won't be overwritten by the variant. Hoep this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you still need to consider the issue raised by Rob for the past midnight run scenario. Whatever we do, we can't handle the midnight scenario, unless you want to break it as two runs, one for prior to midnight and another for after midnight. This can be possible by putting some logic in the custom program to check time and call the RBDMANI2 twice. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2005 16:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079332#M97305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-25T16:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic variant - time variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079333#M97306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hari - I don't see a problem using time fields in calculations. You do have to make sure that you don't go past or before midnight. And you have to remember that the basic unit is the second, so that to add an hour, you have to add 3600 to the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2005 02:04:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079333#M97306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-26T02:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic variant - time variable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079334#M97307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I meant we can't avoid running the program past midnight most of the times. SO i was suggesting a way to come around this issue if we the past midnight scenario can't be avoided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2005 02:54:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-variant-time-variable/m-p/1079334#M97307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-26T02:54:29Z</dc:date>
    </item>
  </channel>
</rss>

