<?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: Recent Date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236353#M140931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;H Suganya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this in the table modification events part itself. Thus via sm14 or tcode, whenever u modify a record the events will get the modified date and time which can be later selected via a select stmt in ur program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I shall explain u how to do it in table maintenance if needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Mar 2006 05:10:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-21T05:10:41Z</dc:date>
    <item>
      <title>Recent Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236352#M140930</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;  How to get(Date &amp;amp; Time)  the recent updated records in a database table. The table will have the updated Date &amp;amp; Time fields also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Suganya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 05:04:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236352#M140930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-21T05:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Recent Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236353#M140931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;H Suganya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this in the table modification events part itself. Thus via sm14 or tcode, whenever u modify a record the events will get the modified date and time which can be later selected via a select stmt in ur program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I shall explain u how to do it in table maintenance if needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 05:10:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236353#M140931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-21T05:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Recent Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236354#M140932</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;Goto Utilities-&amp;gt;tablemainte Gen.-&amp;gt;Environment-&amp;gt;Modification-&amp;gt;Events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(only if u have further acess...)&lt;/P&gt;&lt;P&gt;u can create a form for several events like:&lt;/P&gt;&lt;P&gt;- before saving an entry&lt;/P&gt;&lt;P&gt;- after saving an entry&lt;/P&gt;&lt;P&gt;- before deleting an entry&lt;/P&gt;&lt;P&gt;- before creating an entry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To exactly do the stuff:&lt;/P&gt;&lt;P&gt;05 - "At_create" press enter&lt;/P&gt;&lt;P&gt; in the Editor-&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE LZtableF03 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form at_create.
    Ztable-ZCREATEDATE  = sy-datum.
    Ztable-ZCREATETIME  = sy-uzeit.
endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;save and activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create another event : 02 " After_save" press enter.&lt;/P&gt;&lt;P&gt;in the Editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inside same include:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM after_save.

  DATA: lc_sap TYPE zco001-zawsys VALUE 'SAP'.

    ztable-mandt          = extract+0(3).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Break-point. and chek the values in the "extract" and use offsets properly.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    ztable-field1            = extract+3(3).
    ztable-field2          = extract+6(15).
    ztable-field3        = extract+21(20).
    ztable-field4        = extract+41(40).
    ztable-zcreatedate    = sy-datum.
    ztable-zcreatetime    = sy-uzeit.

    MODIFY ztable.

ENDFORM.                    "after_save&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out this weblog on table maintenance:&lt;/P&gt;&lt;P&gt;/people/sudheer.cheedella/blog/2006/02/20/extracting-data-in-table-maintenance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 05:15:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236354#M140932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-21T05:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Recent Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236355#M140933</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;I have mentioned below a portion of code wherein I use two ztables.&lt;/P&gt;&lt;P&gt;Refer this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SELECT * FROM ZPS001
             INTO TABLE GT_ZPS001.

* Get the latest record.

  CHECK GT_ZPS001[] IS NOT INITIAL.

  READ TABLE GT_ZPS001 INTO WA_ZPS001 INDEX 1.


* CHECK FOR RUNNING DATE VALUE

  IF S_ZRUNDT[] IS INITIAL.


    SELECT * FROM ZCO001
             INTO TABLE GT_ZCO001
             WHERE ZCREATEDATE GE WA_ZPS001-ZRUNDT
             AND ZCREATETIME  &amp;gt; WA_ZPS001-ZRUNTIME.

  ELSE.

    SELECT * FROM ZCO001
             INTO TABLE GT_ZCO001
             WHERE ZCREATEDATE IN S_ZRUNDT.


  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZPS001 table contains fields like last run date,last run time.&lt;/P&gt;&lt;P&gt;ZcO001 table is the database table to be updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gayathri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 05:21:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236355#M140933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-21T05:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Recent Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236356#M140934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suganya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        If you want to know when the database record got inserted / modified then you should have two column added&lt;/P&gt;&lt;P&gt;to your database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add a column of type d and another column of type t.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then when you are inserting or updating a value in the database then update these columns as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. date column with sy-datum.&lt;/P&gt;&lt;P&gt;2. time column with sy-timlo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without having two columns you cannot find the date and time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maheswaran.B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 05:32:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236356#M140934</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-21T05:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Recent Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236357#M140935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are you saying that you want to READ the most recently updated entries in a table which has date and timestamp fields?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so try,&lt;/P&gt;&lt;P&gt;select single datum max( uzeit ) as uzeit from ztab&lt;/P&gt;&lt;P&gt;into corresponding fields of ztab       &lt;/P&gt;&lt;P&gt;where datum = ( select max( datum ) from ztab )&lt;/P&gt;&lt;P&gt;group by datum                               &lt;/P&gt;&lt;P&gt;.                                           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your table is very big it may need to be recoded for speed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2006 05:43:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recent-date/m-p/1236357#M140935</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-03-21T05:43:02Z</dc:date>
    </item>
  </channel>
</rss>

