<?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: Date Time Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838067#M1317511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What fn module are you using. Can you give technical details&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jun 2009 05:42:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-25T05:42:18Z</dc:date>
    <item>
      <title>Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838064#M1317508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing Date Time Problem , the problem is :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My process is working fine except for example:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date is : 25.06.2009 Time 23:59:55&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But during program execution the system saves date  26.06.2009 , which according to system has to be 25.06.2009, This only happens for last minute ex. between 23:59:00 to 23:59:59&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what will i do to save the record in the same date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ankesh Jindal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 05:25:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838064#M1317508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T05:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838065#M1317509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ankesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you have used SY-DATUM and SY-UZEIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your system date is 26.06.09 it will show 26.06.09. &lt;/P&gt;&lt;P&gt;As concerned to time if that is the issue check with basis they will help you with server date &amp;amp; time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Re,Manas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 05:29:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838065#M1317509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T05:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838066#M1317510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do one thing..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the time in code as below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if time = '23:59:59'.&lt;/P&gt;&lt;P&gt;date = date - 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 05:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838066#M1317510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T05:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838067#M1317511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What fn module are you using. Can you give technical details&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 05:42:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838067#M1317511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T05:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838068#M1317512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well i think the problem is that you might be assigning system Date and Time to your variables, too soon in your code before you update/insert into database table. If that is the case then assign the system Date and time to your variables just before your Update Database Table code...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 05:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838068#M1317512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T05:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838069#M1317513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To Naresh :- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This logic cannot be applied bcos at that time system date is coming right but at the time of appending into table it is being changed by new date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Tripal Singh :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes u r rite but it is a long process and we cant help the code to run near where databse is commiting&lt;/P&gt;&lt;P&gt;so the code will run there only ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Manas k Mishra  &lt;/P&gt;&lt;P&gt;Hve already discussed the same issue with basis guy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To SugirdaNishanth &lt;/P&gt;&lt;P&gt;I am not using any FM .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ankesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 06:07:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838069#M1317513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T06:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838070#M1317514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * UP TO 1 ROWS&lt;/P&gt;&lt;P&gt;        FROM zmailhist&lt;/P&gt;&lt;P&gt;        WHERE vbeln EQ p_vbeln AND&lt;/P&gt;&lt;P&gt;              kunnr EQ p_kunnr.&lt;/P&gt;&lt;P&gt;      ENDSELECT.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;      wa-vbeln = p_vbeln.&lt;/P&gt;&lt;P&gt;      wa-kunnr = p_kunnr.&lt;/P&gt;&lt;P&gt;      wa-vsura = sy-uzeit.&lt;/P&gt;&lt;P&gt;      wa-erdat = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     INSERT INTO zmailhist VALUES wa.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        COMMIT WORK.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      CLEAR:wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used this piece of code to update my ztable with date &amp;amp; time. It works fine.&lt;/P&gt;&lt;P&gt;See if this helps you...Or plz paste your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Re,Manas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 06:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838070#M1317514</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T06:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838071#M1317515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh! You have the Vice-Versa problem to what i was thinking, The Database has value of one day after than current date during last minute... Strange...&lt;/P&gt;&lt;P&gt;I was thinking that the database commit takes time and therefore Date has changed by that time but your variable have previous date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some Basic Points here&lt;/P&gt;&lt;P&gt;1) How much avg. run time does your program takes.&lt;/P&gt;&lt;P&gt;2) Where and when are you assigning the Date and time to variables.&lt;/P&gt;&lt;P&gt;3) When does the database commit occurs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 07:34:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838071#M1317515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T07:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838072#M1317516</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;may be you are directly using sy-datum value in the update code, which gets executed only on commit... due to which after 23:59:59, the value of sy-datum changes to the next date.......&lt;/P&gt;&lt;P&gt;in this case its better not to use sy-datum in the update code.... instead declare a local date variable and assign its value to sy-datum before the update code gets executed...... and then use that local variable instead of sy-datum in the update code which gets executed on commit.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 08:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838072#M1317516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T08:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838073#M1317517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ankesh ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  Check your code while saving and validate  using such condition &lt;/P&gt;&lt;P&gt;as your update of date is correct when time is &amp;lt;  23:59:00 .&lt;/P&gt;&lt;P&gt;then add this condition i.e if time between 23:59:00 to 23:59:59 then sy-datum .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Deepak .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 09:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838073#M1317517</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2009-06-25T09:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Date Time Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838074#M1317518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got Soln for my problem . I used &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GET TIME STAMP &amp;lt;Var-Name&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 09:30:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-time-problem/m-p/5838074#M1317518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T09:30:22Z</dc:date>
    </item>
  </channel>
</rss>

