<?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 determine youngest date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033589#M417564</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this following code work with this logic to determine the &lt;/P&gt;&lt;P&gt;youngest date ?&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;Ilhan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA it_hs TYPE ty_hsnr occurs 0 with header line.          
DATA wa_hs TYPE ty_hsnr.     
                               
FORM hsnr_determine using mater type MATNR
                    changing nr type stawn.
 select matnr valid stawn from /G2A/LDM_VL_MAT
          into table it_hs WHERE
          MATNR = mater .
&amp;lt;b&amp;gt;sort it_hs by VALID.&amp;lt;/b&amp;gt;
read table it_hs INTO wa_hs INDEX 1 .
nr = wa_hs-STAWN.
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2007 09:00:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-13T09:00:32Z</dc:date>
    <item>
      <title>determine youngest date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033589#M417564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this following code work with this logic to determine the &lt;/P&gt;&lt;P&gt;youngest date ?&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;Ilhan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA it_hs TYPE ty_hsnr occurs 0 with header line.          
DATA wa_hs TYPE ty_hsnr.     
                               
FORM hsnr_determine using mater type MATNR
                    changing nr type stawn.
 select matnr valid stawn from /G2A/LDM_VL_MAT
          into table it_hs WHERE
          MATNR = mater .
&amp;lt;b&amp;gt;sort it_hs by VALID.&amp;lt;/b&amp;gt;
read table it_hs INTO wa_hs INDEX 1 .
nr = wa_hs-STAWN.
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:00:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033589#M417564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: determine youngest date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033590#M417565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi IIhan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you sort the internal table in ascending order with repect to the Valid date and read the first index, then it should return you data corresponding to oldest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you sort the internal table in descending order with repect to the Valid date and read the first index, then it should return you data with the latest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;reward for all helpful tips&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:06:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033590#M417565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: determine youngest date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033591#M417566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sort it_hs by VALID &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i dont know what u mean by youngest date ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;sort it_hs by VALID &lt;/P&gt;&lt;P&gt; will give the old date  ( previous date "  --&amp;gt;before )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.sort it_hs by VALID descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will give u the latest date ( recent used date )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:07:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033591#M417566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: determine youngest date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033592#M417567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Youngest / recent date you should use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT  &amp;lt;itab&amp;gt; BY &amp;lt;Field&amp;gt; DESCENDING.&lt;/P&gt;&lt;P&gt;This will bring the row with largest date on the first row.&lt;/P&gt;&lt;P&gt;Now you can do a READ on the first row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE &amp;lt;itab&amp;gt; INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vishal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:13:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033592#M417567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: determine youngest date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033593#M417568</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;if u write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;sort it_hs by VALID&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here first record will give u the oldest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if u write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;sort it_hs by VALID descending &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here first record will give u the youngest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful......&lt;/P&gt;&lt;P&gt;Suresh......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:15:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033593#M417568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: determine youngest date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033594#M417569</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;  If u want the latest date then u must sort the table byu descending in addition this will give u the latest date if index is 1,other wise u have to read the valid from &lt;/P&gt;&lt;P&gt;the last index .&lt;/P&gt;&lt;P&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>Tue, 13 Mar 2007 09:21:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033594#M417569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: determine youngest date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033595#M417570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THOUGH SORT COMMAND WILL SORT IN ASCENDING ORDER BURT FOR YOUR REQUIREMENT YOU CAN ADD ASCENDING OPTION IN SORT ALSO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_hs by VALID ASCENDING.&lt;/P&gt;&lt;P&gt;read table it_hs INTO wa_hs INDEX 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT WILL GIVE YOU THE DATA WITH SMALLEST DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS&lt;/P&gt;&lt;P&gt;SHIBA DUTTA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:43:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-youngest-date/m-p/2033595#M417570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:43:39Z</dc:date>
    </item>
  </channel>
</rss>

