<?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: What is the sort oder when using filter #() ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694995#M31375</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;For some reason I can't convert the comment to an answer. I will keep this thread open in case  &lt;SPAN class="mention-scrubbed"&gt;nabheet.madan3&lt;/SPAN&gt; would transform it to an answer and then you can accept it. &lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Iftah&lt;/P&gt;</description>
    <pubDate>Sun, 16 Dec 2018 09:26:57 GMT</pubDate>
    <dc:creator>iftah_peretz</dc:creator>
    <dc:date>2018-12-16T09:26:57Z</dc:date>
    <item>
      <title>What is the sort oder when using filter #() ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694991#M31371</link>
      <description>&lt;P&gt;I am wondering if filter #( ) produces a defined sort order in its result. If I use for example&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;types table_type type standard table of line_type&amp;lt;br&amp;gt;  with default key&amp;lt;br&amp;gt;  with non-unique sorted key date components date time.

filtered_table = filter #( full_table using key date where date = today ).
data(first_row) = filtered_table[ 1 ].

&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Will I get in first_row the entry with the earliest time for that day?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 06:38:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694991#M31371</guid>
      <dc:creator>jrgkraus</dc:creator>
      <dc:date>2018-12-13T06:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: What is the sort oder when using filter #() ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694992#M31372</link>
      <description>&lt;P&gt;Hello Jorg&lt;/P&gt;&lt;P&gt;Yes when you filter using the defined key it sorts and filters it. Try this dummy code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztest_cr.
TYPES:BEGIN OF line_type,
        date TYPE sy-datum,
        time TYPE sy-uzeit,
      END OF line_type.
TYPES table_type TYPE STANDARD TABLE OF line_type
  WITH DEFAULT KEY
  WITH NON-UNIQUE SORTED KEY key1 COMPONENTS date time.
DATA:full_table TYPE table_type.
DATA(out) = cl_demo_output=&amp;gt;new( ).
INSERT VALUE #( date = '20181213' time = '071901' ) INTO full_table INDEX 1.
INSERT VALUE #( date = '20181213' time = '071001' ) INTO full_table INDEX 2.
INSERT VALUE #( date = '20181213' time = '071301' ) INTO full_table INDEX 3.
INSERT VALUE #( date = '20181214' time = '071301' ) INTO full_table INDEX 4.
INSERT VALUE #( date = '20181215' time = '071301' ) INTO full_table INDEX 5.
DATA(filtered_table) = FILTER #( full_table USING KEY key1 WHERE date = sy-datum ).
DATA(first_row) = filtered_table[ 1 ].
out-&amp;gt;write( first_row ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Dec 2018 07:21:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694992#M31372</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2018-12-13T07:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: What is the sort oder when using filter #() ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694993#M31373</link>
      <description>&lt;P&gt;to  &lt;SPAN class="mention-scrubbed"&gt;nabheet.madan3&lt;/SPAN&gt;: Your answer is correct - but since you posted it as comment and not as answer I am not able to accept it. Thanks a lot&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 09:06:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694993#M31373</guid>
      <dc:creator>jrgkraus</dc:creator>
      <dc:date>2018-12-13T09:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the sort oder when using filter #() ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694994#M31374</link>
      <description>&lt;P&gt;I've asked the moderators to change it to an answer&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 12:47:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694994#M31374</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-12-13T12:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is the sort oder when using filter #() ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694995#M31375</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;For some reason I can't convert the comment to an answer. I will keep this thread open in case  &lt;SPAN class="mention-scrubbed"&gt;nabheet.madan3&lt;/SPAN&gt; would transform it to an answer and then you can accept it. &lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Iftah&lt;/P&gt;</description>
      <pubDate>Sun, 16 Dec 2018 09:26:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694995#M31375</guid>
      <dc:creator>iftah_peretz</dc:creator>
      <dc:date>2018-12-16T09:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: What is the sort oder when using filter #() ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694996#M31376</link>
      <description>&lt;P&gt;Converted it to an answer, Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Dec 2018 12:09:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-sort-oder-when-using-filter/m-p/694996#M31376</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2018-12-16T12:09:47Z</dc:date>
    </item>
  </channel>
</rss>

