<?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: ALV - Sort empty dates at bottom in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919615#M1691488</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this idea. I'm sure it would work, but I'll use a simpler solution to get it done more quickly. Details in my response to Raju...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2012 19:51:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-08-02T19:51:59Z</dc:date>
    <item>
      <title>ALV - Sort empty dates at bottom</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919611#M1691484</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'm working with an ALV grid, specifically cl_salv_hierseq_table, and I have a column that shows date values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorting must be enabled for the date column. However, an empty date will sort to the top of the list with an ascending sort, and to the bottom with a descending sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to make ALV (or the SORT statement for an internal table) treat an empty date as a high value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, I could set all empty date values to 12/31/9999, if I could find a way to make ALV suppress their display (i.e. if the date value for that row is 12/31/9999, show it as blank to the user). Can that be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 18:03:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919611#M1691484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-31T18:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: ALV - Sort empty dates at bottom</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919612#M1691485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;I don't think this will be possible for the sort/alv. The sort works on the contents of the entire column. You could change the value from blank date to something higher like 12/31/9999 but you will not be able to suppress it by rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Puneet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 20:42:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919612#M1691485</guid>
      <dc:creator>Puneet_Gupta</dc:creator>
      <dc:date>2012-07-31T20:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: ALV - Sort empty dates at bottom</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919613#M1691486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&amp;nbsp; The SORT statement cannot move the empty dates to the end of the internal table. I will use the following approach.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Disable the default sorting button of salv.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;Create my own sort button with my own function code in the application toolbar.&lt;/LI&gt;&lt;LI&gt;Implement the my sorting function and move the empty dates to the end of the internal table&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 05:48:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919613#M1691486</guid>
      <dc:creator>former_member129652</dc:creator>
      <dc:date>2012-08-01T05:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: ALV - Sort empty dates at bottom</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919614#M1691487</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;For SORT statement on internal table it can be done indirectly by creating another field &amp;amp; copy contents of&amp;nbsp; date field to be sorted, into this field ( with date as 31/12/9999 in case it is blank aspointed out by you&amp;nbsp; ), &amp;amp; sort the internal table on this new hidden column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raju Chitale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 06:41:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919614#M1691487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-01T06:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: ALV - Sort empty dates at bottom</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919615#M1691488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this idea. I'm sure it would work, but I'll use a simpler solution to get it done more quickly. Details in my response to Raju...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 19:51:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919615#M1691488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-02T19:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: ALV - Sort empty dates at bottom</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919616#M1691489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did this and it worked well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also called the set_technical method (with a value of true) on the column object, to make sure not only that this new column would not be visible on the report, but that it would also not be available for the user to choose in the "Change Layout" functionality. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 19:55:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-sort-empty-dates-at-bottom/m-p/8919616#M1691489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-02T19:55:09Z</dc:date>
    </item>
  </channel>
</rss>

