<?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: capturing system time and date and the time difference and date difference. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087341#M1506769</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;As per my understanding you want to fetch those data which are created between the program last run date time and current date time.&lt;/P&gt;&lt;P&gt;If I am right please follow the below procedure.&lt;/P&gt;&lt;P&gt;1. Create one custom table to store program name and program execution last date time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. at event INITIALIZATION populate to fields date and Time using the statement sy-datum&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;  v_curr_time = sy-uzeit.           " Current time&lt;/P&gt;&lt;P&gt;  v_curr_date = sy-datum.           " Current date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Get the last run date and time from the above custom table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Do your logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. at last Update the custom table with current date and time based on the step two (Here do not take sy-datum like that, take the value in the global variable populated in step 2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Subhankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jul 2010 10:20:36 GMT</pubDate>
    <dc:creator>Subhankar</dc:creator>
    <dc:date>2010-07-06T10:20:36Z</dc:date>
    <item>
      <title>capturing system time and date and the time difference and date difference.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087340#M1506768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a requirement the i need to capture select query start time and date as i runthe program on midnight (ie) 11:55 p.m.&lt;/P&gt;&lt;P&gt;I tried system fields sy-datum and sy-uzeit for capturing the system date and time when my program runs but it gets reset when the date changes.&lt;/P&gt;&lt;P&gt;i tried get time field option but it is resetting the sy-datum to zero so i am able to capture the date of the next day and resulting in wrong calculation of time .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help with your valuable answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Srinivas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jul 2010 09:50:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087340#M1506768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-06T09:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: capturing system time and date and the time difference and date difference.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087341#M1506769</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;As per my understanding you want to fetch those data which are created between the program last run date time and current date time.&lt;/P&gt;&lt;P&gt;If I am right please follow the below procedure.&lt;/P&gt;&lt;P&gt;1. Create one custom table to store program name and program execution last date time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. at event INITIALIZATION populate to fields date and Time using the statement sy-datum&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;  v_curr_time = sy-uzeit.           " Current time&lt;/P&gt;&lt;P&gt;  v_curr_date = sy-datum.           " Current date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Get the last run date and time from the above custom table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Do your logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. at last Update the custom table with current date and time based on the step two (Here do not take sy-datum like that, take the value in the global variable populated in step 2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Subhankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jul 2010 10:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087341#M1506769</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2010-07-06T10:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: capturing system time and date and the time difference and date difference.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087342#M1506770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Subhankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My intention is to capture the select query start date and time and end date and time and need those results in ztable.&lt;/P&gt;&lt;P&gt;As i have taken the sy-datum and sy-uzeit in global variables only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have 4 select queiries in my program i need to capture the time and date for all those queries.&lt;/P&gt;&lt;P&gt;if i scheduled this program at noght 11:55p.m then the time is getting resetting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you &lt;/P&gt;&lt;P&gt;srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jul 2010 10:26:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087342#M1506770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-06T10:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: capturing system time and date and the time difference and date difference.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087343#M1506771</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 do it very easily. Instead of date and time separately use timestamp. Take one numc 14 field or standard timestamp fild (TIMESTAMP). Put the start date and time before selecting in one variable and put end date time into another variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can calculate the same (end timestamp - start timestamp).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Subhankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jul 2010 10:36:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087343#M1506771</guid>
      <dc:creator>Subhankar</dc:creator>
      <dc:date>2010-07-06T10:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: capturing system time and date and the time difference and date difference.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087344#M1506772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Subhankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u please ellaborate your solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you &lt;/P&gt;&lt;P&gt;srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jul 2010 11:26:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087344#M1506772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-06T11:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: capturing system time and date and the time difference and date difference.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087345#M1506773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Srinivas, I don't know what you did, but SY-DATUM is never reset by SAP to zero, so it must be your custom code which does something wrong. If it happens, then you should contact SAP support instead of posting in SDN.&lt;/P&gt;&lt;P&gt;sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jul 2010 11:56:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-system-time-and-date-and-the-time-difference-and-date-difference/m-p/7087345#M1506773</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-07-06T11:56:09Z</dc:date>
    </item>
  </channel>
</rss>

