<?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: Row having higher date. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545498#M248065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select max(date)&lt;/P&gt;&lt;P&gt;       field1&lt;/P&gt;&lt;P&gt;       field2&lt;/P&gt;&lt;P&gt;  from &amp;lt;table&amp;gt;&lt;/P&gt;&lt;P&gt;into wa_table&lt;/P&gt;&lt;P&gt;where &amp;lt;where condition&amp;gt;.&lt;/P&gt;&lt;P&gt;another example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;DATA: name     TYPE scustom-name, &lt;/P&gt;&lt;P&gt;      postcode TYPE scustom-postcode, &lt;/P&gt;&lt;P&gt;      city     TYPE scustom-city, &lt;/P&gt;&lt;P&gt;      max      TYPE sbook-loccuram. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT scustom&lt;SUB&gt;name scustom&lt;/SUB&gt;postcode scustom~city &lt;/P&gt;&lt;P&gt;         MAX( sbook~loccuram ) &lt;/P&gt;&lt;P&gt;       INTO (name, postcode, city, max) &lt;/P&gt;&lt;P&gt;       FROM scustom INNER JOIN sbook &lt;/P&gt;&lt;P&gt;         ON scustom&lt;SUB&gt;id = sbook&lt;/SUB&gt;customid &lt;/P&gt;&lt;P&gt;       WHERE sbook~fldate BETWEEN '20010101' AND '20011231' AND &lt;/P&gt;&lt;P&gt;             sbook~carrid   = 'LH '                         AND &lt;/P&gt;&lt;P&gt;             sbook~connid   = '0400' &lt;/P&gt;&lt;P&gt;       GROUP BY scustom&lt;SUB&gt;name scustom&lt;/SUB&gt;postcode scustom~city &lt;/P&gt;&lt;P&gt;       ORDER BY scustom~name. &lt;/P&gt;&lt;P&gt;  WRITE: / name, postcode, city, max. &lt;/P&gt;&lt;P&gt;ENDSELECT.&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Aug 2006 10:11:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-16T10:11:23Z</dc:date>
    <item>
      <title>Row having higher date.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545497#M248064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi.&lt;/P&gt;&lt;P&gt;am fetching data from a table where threr are 4 rows having same values in each column, only date in each row is different. I have to select only row which has higher date.How can i do this??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 10:10:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545497#M248064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T10:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Row having higher date.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545498#M248065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select max(date)&lt;/P&gt;&lt;P&gt;       field1&lt;/P&gt;&lt;P&gt;       field2&lt;/P&gt;&lt;P&gt;  from &amp;lt;table&amp;gt;&lt;/P&gt;&lt;P&gt;into wa_table&lt;/P&gt;&lt;P&gt;where &amp;lt;where condition&amp;gt;.&lt;/P&gt;&lt;P&gt;another example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;DATA: name     TYPE scustom-name, &lt;/P&gt;&lt;P&gt;      postcode TYPE scustom-postcode, &lt;/P&gt;&lt;P&gt;      city     TYPE scustom-city, &lt;/P&gt;&lt;P&gt;      max      TYPE sbook-loccuram. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT scustom&lt;SUB&gt;name scustom&lt;/SUB&gt;postcode scustom~city &lt;/P&gt;&lt;P&gt;         MAX( sbook~loccuram ) &lt;/P&gt;&lt;P&gt;       INTO (name, postcode, city, max) &lt;/P&gt;&lt;P&gt;       FROM scustom INNER JOIN sbook &lt;/P&gt;&lt;P&gt;         ON scustom&lt;SUB&gt;id = sbook&lt;/SUB&gt;customid &lt;/P&gt;&lt;P&gt;       WHERE sbook~fldate BETWEEN '20010101' AND '20011231' AND &lt;/P&gt;&lt;P&gt;             sbook~carrid   = 'LH '                         AND &lt;/P&gt;&lt;P&gt;             sbook~connid   = '0400' &lt;/P&gt;&lt;P&gt;       GROUP BY scustom&lt;SUB&gt;name scustom&lt;/SUB&gt;postcode scustom~city &lt;/P&gt;&lt;P&gt;       ORDER BY scustom~name. &lt;/P&gt;&lt;P&gt;  WRITE: / name, postcode, city, max. &lt;/P&gt;&lt;P&gt;ENDSELECT.&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 10:11:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545498#M248065</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T10:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Row having higher date.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545499#M248066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use select Max(date) ......into table itab etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it works. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers. &lt;/P&gt;&lt;P&gt;santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 10:13:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545499#M248066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T10:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Row having higher date.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545500#M248067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT SINGLE F1 F2 ... MAX( DATE ) FROM TABLE INTO WA_ITAB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 10:14:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545500#M248067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T10:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Row having higher date.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545501#M248068</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 use aggregate function MAX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select max(date_fld) from table into v_maxdate.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    select * from table where date_fld = v_maxdate.&lt;/P&gt;&lt;P&gt;  endif.&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;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 10:15:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545501#M248068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T10:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Row having higher date.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545502#M248069</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;  Select all the dates into an internal table, sort the internal table on Date field descending, this will get the max.date value on top, the rest can be deleted from the internal table using delete statement using index numbers, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 10:16:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-having-higher-date/m-p/1545502#M248069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T10:16:47Z</dc:date>
    </item>
  </channel>
</rss>

