<?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: Last changed record in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835488#M1884314</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi AS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It`s weird, SORT itab BY udate DESCENDING utime DESCENDING. should works fine.&lt;/P&gt;&lt;P&gt;Please past your code here, then we can further check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Archer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jan 2015 03:01:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-01-20T03:01:30Z</dc:date>
    <item>
      <title>Last changed record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835487#M1884313</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 a small query. I use the changeddocument_read to fetch the changes on SORT field on LFA1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get all the values in internal table.Could you please tell me how to fetch the last changed record ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i use SORT itab by date descending time descending , it works like date ascending and time descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to fetch the last changed using UDATE and UTIME latest value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 17:04:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835487#M1884313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-19T17:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Last changed record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835488#M1884314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi AS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It`s weird, SORT itab BY udate DESCENDING utime DESCENDING. should works fine.&lt;/P&gt;&lt;P&gt;Please past your code here, then we can further check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Archer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 03:01:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835488#M1884314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-20T03:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Last changed record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835489#M1884315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA &lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;lt_lfa1 &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;STANDARD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;lfa1&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wa_lfa1 &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;lfa1&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;SELECT &lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;lfa1 &lt;SPAN class="L0S52"&gt;UP &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;30 &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ROWS&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;lt_lfa1&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;NOT &lt;/SPAN&gt;lt_lfa1[] &lt;SPAN class="L0S52"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN class="L0S52"&gt;SORT &lt;/SPAN&gt;lt_lfa1 &lt;SPAN class="L0S52"&gt;by &lt;/SPAN&gt;UPDAT &lt;SPAN class="L0S52"&gt;DESCENDING &lt;/SPAN&gt;UPTIM &lt;SPAN class="L0S52"&gt;DESCENDING&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN class="L0S52"&gt;LOOP &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;AT &lt;/SPAN&gt;lt_lfa1 &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;wa_lfa1&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&amp;nbsp; &lt;/SPAN&gt;/ wa_lfa1&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;LIFNR&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;wa_lfa1&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;UPDAT&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;wa_lfa1&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;uptim&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN class="L0S52"&gt;ENDLOOP&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/627661" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 06:08:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835489#M1884315</guid>
      <dc:creator>mayur_priyan</dc:creator>
      <dc:date>2015-01-20T06:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Last changed record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835490#M1884316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swarna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are trying to fetch latest record (last changed, can be newly added Vendor) from LFA1 irrespective to LIFNR, you can use following select statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;SELECT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;SINGLE &lt;/SPAN&gt;LIFNR &lt;SPAN class="L0S52"&gt;&lt;STRONG&gt;MAX&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;UPDAT &lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;MAX&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;UPTIM &lt;/STRONG&gt;&lt;SPAN class="L0S55"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;LFA1 &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;LS_LFA1&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WHERE &lt;/SPAN&gt;LIFNR &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;P_LIFNR&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;&lt;STRONG&gt;GROUP &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;BY &lt;/SPAN&gt;LIFNR UPDAT UPTIM&lt;/STRONG&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, if you are looking for the latest change in a log of particular vendor, you should fetch data from tables like CDHDR CDPOS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the log,&lt;/P&gt;&lt;P&gt;Pass OBJCETCLASS as 'KRED', OBJECTID as &amp;lt;LIFNR&amp;gt; (with leading zeros) and TCODE as 'XK02'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the log details,&lt;/P&gt;&lt;P&gt;Get the CHANGENR field from above statement and pass that to CDPOS. You will get detailed log.&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;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 07:14:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835490#M1884316</guid>
      <dc:creator>VijayaKrishnaG</dc:creator>
      <dc:date>2015-01-20T07:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Last changed record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835491#M1884317</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;Try to use Sort syntax as &lt;SPAN style="color: #333333; font-size: 12px; background-color: #f8f8f8;"&gt;SORT itab by date descending and time descending.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vinodkumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 09:26:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/last-changed-record/m-p/10835491#M1884317</guid>
      <dc:creator>vinodkumar_thangavel</dc:creator>
      <dc:date>2015-01-20T09:26:54Z</dc:date>
    </item>
  </channel>
</rss>

