<?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: Sort data in TableView in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786540#M1121158</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;Refer to the following code snipetts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;option1. instead of using SORT = "SERVER" use "APPLICATION" in this case you have to manually handle the sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code sample for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;page attributes:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;sort_element	TYPE	STRING&lt;/P&gt;&lt;P&gt;sort_event	TYPE	STRING&lt;/P&gt;&lt;P&gt;s_event	TYPE	CHAR1&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;layout&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;%  if sort_event is initial .&lt;/P&gt;&lt;P&gt;  move: 'A' to sort_event .&lt;/P&gt;&lt;P&gt;  endif .&lt;/P&gt;&lt;P&gt;  if sort_event eq 'A' .&lt;/P&gt;&lt;P&gt;  if not sort_element is initial .&lt;/P&gt;&lt;P&gt;  sort &amp;lt;outtab&amp;gt; ascending by (sort_element).&lt;/P&gt;&lt;P&gt;  else .&lt;/P&gt;&lt;P&gt;  sort &amp;lt;outtab&amp;gt; ascending .&lt;/P&gt;&lt;P&gt;  endif .&lt;/P&gt;&lt;P&gt;  elseif sort_event eq 'D' .&lt;/P&gt;&lt;P&gt;  if not sort_element is initial .&lt;/P&gt;&lt;P&gt;  sort &amp;lt;outtab&amp;gt; descending by (sort_element).&lt;/P&gt;&lt;P&gt;  else .&lt;/P&gt;&lt;P&gt;  sort &amp;lt;outtab&amp;gt; descending .&lt;/P&gt;&lt;P&gt;  endif .&lt;/P&gt;&lt;P&gt;  endif .&lt;/P&gt;&lt;P&gt;      %&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      &amp;lt;htmlb:tableView id                  = "test"&lt;/P&gt;&lt;P&gt;                       headerVisible       = "false"&lt;/P&gt;&lt;P&gt;                       footerVisible       = "true"&lt;/P&gt;&lt;P&gt;                       onHeaderClick       = "&amp;lt;%= sort_event %&amp;gt;"&lt;/P&gt;&lt;P&gt;                       table               = "&amp;lt;%= &amp;lt;outtab&amp;gt; %&amp;gt;"&lt;/P&gt;&lt;P&gt;                       iterator            = "&amp;lt;%= grid_iterator %&amp;gt;"&lt;/P&gt;&lt;P&gt;                       columnDefinitions   = "&amp;lt;%= col_control_tab %&amp;gt;"&lt;/P&gt;&lt;P&gt;                       width               = "100%"&lt;/P&gt;&lt;P&gt;                       columnHeaderVisible = "true"&lt;/P&gt;&lt;P&gt;                       sort                = "APPLICATION" /&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;oninputprocessing.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CLEAR s_event .&lt;/P&gt;&lt;P&gt;CLASS cl_htmlb_manager DEFINITION LOAD.&lt;/P&gt;&lt;P&gt;DATA:   event           TYPE REF TO cl_htmlb_event .&lt;/P&gt;&lt;P&gt;data: tv type ref to cl_htmlb_tableview.&lt;/P&gt;&lt;P&gt;data: tv_data type ref to cl_htmlb_event_tableview.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;event = cl_htmlb_manager=&amp;gt;get_event( request ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF event-&amp;gt;event_type EQ cl_htmlb_event_tableview=&amp;gt;co_header_click .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  s_event = 'Y' .&lt;/P&gt;&lt;P&gt;  tv ?= cl_htmlb_manager=&amp;gt;get_data(&lt;/P&gt;&lt;P&gt;                          request      = runtime-&amp;gt;server-&amp;gt;request&lt;/P&gt;&lt;P&gt;                          name         = 'tableView'&lt;/P&gt;&lt;P&gt;                          id           = 'test' ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if tv is not initial.&lt;/P&gt;&lt;P&gt;    tv_data = tv-&amp;gt;data.&lt;/P&gt;&lt;P&gt;  endif .&lt;/P&gt;&lt;P&gt;  sort_element = tv_data-&amp;gt;column_key .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if event-&amp;gt;SERVER_EVENT eq 'A' .&lt;/P&gt;&lt;P&gt;  sort_event = 'D' .&lt;/P&gt;&lt;P&gt;  elseif event-&amp;gt;SERVER_EVENT eq 'D' .&lt;/P&gt;&lt;P&gt;  sort_event = 'A' .&lt;/P&gt;&lt;P&gt;  endif .&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;option 2:&lt;/P&gt;&lt;P&gt;use keyColumn = "&amp;lt;itab key filed name in uppercase&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;htmlb:tableView id                  = "test"&lt;/P&gt;&lt;P&gt;                           design              = "ALTERNATING"&lt;/P&gt;&lt;P&gt;                           headerVisible       = "true"&lt;/P&gt;&lt;P&gt;                           headerText          = "List of Low Value Assets"&lt;/P&gt;&lt;P&gt;                           table               = "&amp;lt;%= det_tab             %&amp;gt;"&lt;/P&gt;&lt;P&gt;                           width               = "100%"&lt;/P&gt;&lt;P&gt;                           columnHeaderVisible = "true"&lt;/P&gt;&lt;P&gt;                           sort                = "SERVER"&lt;/P&gt;&lt;P&gt;                           filter              = "SERVER"&lt;/P&gt;&lt;P&gt;                           filterButtonText    = "Go"&lt;/P&gt;&lt;P&gt;                           columnDefinitions   = "&amp;lt;%= col_control_tab       %&amp;gt;"&lt;/P&gt;&lt;P&gt;                           keepSelectedRow     = "TRUE"&lt;/P&gt;&lt;P&gt;                        &amp;lt;b&amp;gt;   keyColumn           = "KEY_COL"&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where key_col is a column in the itab which holds the concatenated value of key fields.&lt;/P&gt;&lt;P&gt;for example if your itab has say order no., item number, value and the key is order number and item number.&lt;/P&gt;&lt;P&gt;concatenate them and place it in the key_col field and dont show that in display mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in oninputprocessing you can read the selected row value like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if event-&amp;gt;event_type eq cl_htmlb_event_tableview=&amp;gt;co_row_selection .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  data: tv type ref to cl_htmlb_tableview.&lt;/P&gt;&lt;P&gt;  tv ?= cl_htmlb_manager=&amp;gt;get_data(&lt;/P&gt;&lt;P&gt;                          request      = runtime-&amp;gt;server-&amp;gt;request&lt;/P&gt;&lt;P&gt;                          name         = 'tableView'&lt;/P&gt;&lt;P&gt;                          id           = 'test' ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if tv is not initial.&lt;/P&gt;&lt;P&gt;    data: tv_data type ref to cl_htmlb_event_tableview.&lt;/P&gt;&lt;P&gt;    tv_data = tv-&amp;gt;data.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    if tv_data-&amp;gt;selectedrowindex is not initial.&lt;/P&gt;&lt;P&gt;      data: row like line of &amp;lt;itab&amp;gt; .&lt;/P&gt;&lt;P&gt;either you can use this index to read the itab or&lt;/P&gt;&lt;P&gt;tv_data-&amp;gt;selectedrowkey will hold the selected rows key_col value which you can use to read the itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;Regards&lt;/P&gt;&lt;P&gt;Rajesh Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Feb 2009 10:45:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-18T10:45:50Z</dc:date>
    <item>
      <title>Sort data in TableView</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786537#M1121155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Table Maintenance Generator (SE54) was maked TableView for DB table. &lt;/P&gt;&lt;P&gt;1. How I can dort data in that TableView? (not Key value)&lt;/P&gt;&lt;P&gt;2. Or..can I in TableView change Key values?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 14:53:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786537#M1121155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T14:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data in TableView</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786538#M1121156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, could you sort your tableview ?? I have the same problem... I need to sort it only by one field, not all the primary key...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2009 10:36:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786538#M1121156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-18T10:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data in TableView</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786539#M1121157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this link,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/advancedsearch?query=sort" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/advancedsearch?query=sort&lt;/A&gt;&lt;EM&gt;with&lt;/EM&gt;sm30&amp;amp;cat=sdn_all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2009 10:42:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786539#M1121157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-18T10:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data in TableView</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786540#M1121158</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;Refer to the following code snipetts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;option1. instead of using SORT = "SERVER" use "APPLICATION" in this case you have to manually handle the sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code sample for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;page attributes:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;sort_element	TYPE	STRING&lt;/P&gt;&lt;P&gt;sort_event	TYPE	STRING&lt;/P&gt;&lt;P&gt;s_event	TYPE	CHAR1&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;layout&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;%  if sort_event is initial .&lt;/P&gt;&lt;P&gt;  move: 'A' to sort_event .&lt;/P&gt;&lt;P&gt;  endif .&lt;/P&gt;&lt;P&gt;  if sort_event eq 'A' .&lt;/P&gt;&lt;P&gt;  if not sort_element is initial .&lt;/P&gt;&lt;P&gt;  sort &amp;lt;outtab&amp;gt; ascending by (sort_element).&lt;/P&gt;&lt;P&gt;  else .&lt;/P&gt;&lt;P&gt;  sort &amp;lt;outtab&amp;gt; ascending .&lt;/P&gt;&lt;P&gt;  endif .&lt;/P&gt;&lt;P&gt;  elseif sort_event eq 'D' .&lt;/P&gt;&lt;P&gt;  if not sort_element is initial .&lt;/P&gt;&lt;P&gt;  sort &amp;lt;outtab&amp;gt; descending by (sort_element).&lt;/P&gt;&lt;P&gt;  else .&lt;/P&gt;&lt;P&gt;  sort &amp;lt;outtab&amp;gt; descending .&lt;/P&gt;&lt;P&gt;  endif .&lt;/P&gt;&lt;P&gt;  endif .&lt;/P&gt;&lt;P&gt;      %&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      &amp;lt;htmlb:tableView id                  = "test"&lt;/P&gt;&lt;P&gt;                       headerVisible       = "false"&lt;/P&gt;&lt;P&gt;                       footerVisible       = "true"&lt;/P&gt;&lt;P&gt;                       onHeaderClick       = "&amp;lt;%= sort_event %&amp;gt;"&lt;/P&gt;&lt;P&gt;                       table               = "&amp;lt;%= &amp;lt;outtab&amp;gt; %&amp;gt;"&lt;/P&gt;&lt;P&gt;                       iterator            = "&amp;lt;%= grid_iterator %&amp;gt;"&lt;/P&gt;&lt;P&gt;                       columnDefinitions   = "&amp;lt;%= col_control_tab %&amp;gt;"&lt;/P&gt;&lt;P&gt;                       width               = "100%"&lt;/P&gt;&lt;P&gt;                       columnHeaderVisible = "true"&lt;/P&gt;&lt;P&gt;                       sort                = "APPLICATION" /&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;oninputprocessing.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CLEAR s_event .&lt;/P&gt;&lt;P&gt;CLASS cl_htmlb_manager DEFINITION LOAD.&lt;/P&gt;&lt;P&gt;DATA:   event           TYPE REF TO cl_htmlb_event .&lt;/P&gt;&lt;P&gt;data: tv type ref to cl_htmlb_tableview.&lt;/P&gt;&lt;P&gt;data: tv_data type ref to cl_htmlb_event_tableview.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;event = cl_htmlb_manager=&amp;gt;get_event( request ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF event-&amp;gt;event_type EQ cl_htmlb_event_tableview=&amp;gt;co_header_click .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  s_event = 'Y' .&lt;/P&gt;&lt;P&gt;  tv ?= cl_htmlb_manager=&amp;gt;get_data(&lt;/P&gt;&lt;P&gt;                          request      = runtime-&amp;gt;server-&amp;gt;request&lt;/P&gt;&lt;P&gt;                          name         = 'tableView'&lt;/P&gt;&lt;P&gt;                          id           = 'test' ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if tv is not initial.&lt;/P&gt;&lt;P&gt;    tv_data = tv-&amp;gt;data.&lt;/P&gt;&lt;P&gt;  endif .&lt;/P&gt;&lt;P&gt;  sort_element = tv_data-&amp;gt;column_key .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if event-&amp;gt;SERVER_EVENT eq 'A' .&lt;/P&gt;&lt;P&gt;  sort_event = 'D' .&lt;/P&gt;&lt;P&gt;  elseif event-&amp;gt;SERVER_EVENT eq 'D' .&lt;/P&gt;&lt;P&gt;  sort_event = 'A' .&lt;/P&gt;&lt;P&gt;  endif .&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;option 2:&lt;/P&gt;&lt;P&gt;use keyColumn = "&amp;lt;itab key filed name in uppercase&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;htmlb:tableView id                  = "test"&lt;/P&gt;&lt;P&gt;                           design              = "ALTERNATING"&lt;/P&gt;&lt;P&gt;                           headerVisible       = "true"&lt;/P&gt;&lt;P&gt;                           headerText          = "List of Low Value Assets"&lt;/P&gt;&lt;P&gt;                           table               = "&amp;lt;%= det_tab             %&amp;gt;"&lt;/P&gt;&lt;P&gt;                           width               = "100%"&lt;/P&gt;&lt;P&gt;                           columnHeaderVisible = "true"&lt;/P&gt;&lt;P&gt;                           sort                = "SERVER"&lt;/P&gt;&lt;P&gt;                           filter              = "SERVER"&lt;/P&gt;&lt;P&gt;                           filterButtonText    = "Go"&lt;/P&gt;&lt;P&gt;                           columnDefinitions   = "&amp;lt;%= col_control_tab       %&amp;gt;"&lt;/P&gt;&lt;P&gt;                           keepSelectedRow     = "TRUE"&lt;/P&gt;&lt;P&gt;                        &amp;lt;b&amp;gt;   keyColumn           = "KEY_COL"&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where key_col is a column in the itab which holds the concatenated value of key fields.&lt;/P&gt;&lt;P&gt;for example if your itab has say order no., item number, value and the key is order number and item number.&lt;/P&gt;&lt;P&gt;concatenate them and place it in the key_col field and dont show that in display mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in oninputprocessing you can read the selected row value like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if event-&amp;gt;event_type eq cl_htmlb_event_tableview=&amp;gt;co_row_selection .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  data: tv type ref to cl_htmlb_tableview.&lt;/P&gt;&lt;P&gt;  tv ?= cl_htmlb_manager=&amp;gt;get_data(&lt;/P&gt;&lt;P&gt;                          request      = runtime-&amp;gt;server-&amp;gt;request&lt;/P&gt;&lt;P&gt;                          name         = 'tableView'&lt;/P&gt;&lt;P&gt;                          id           = 'test' ).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if tv is not initial.&lt;/P&gt;&lt;P&gt;    data: tv_data type ref to cl_htmlb_event_tableview.&lt;/P&gt;&lt;P&gt;    tv_data = tv-&amp;gt;data.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    if tv_data-&amp;gt;selectedrowindex is not initial.&lt;/P&gt;&lt;P&gt;      data: row like line of &amp;lt;itab&amp;gt; .&lt;/P&gt;&lt;P&gt;either you can use this index to read the itab or&lt;/P&gt;&lt;P&gt;tv_data-&amp;gt;selectedrowkey will hold the selected rows key_col value which you can use to read the itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;Regards&lt;/P&gt;&lt;P&gt;Rajesh Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2009 10:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786540#M1121158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-18T10:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sort data in TableView</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786541#M1121159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I dind't read the post correctly... &lt;/P&gt;&lt;P&gt;I created a new Z table and I need a SM30 for it. And now the user wants to make some validations and also sort it by a field which is not the primary key..&lt;/P&gt;&lt;P&gt;My PBO is like this:&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;  MODULE liste_initialisieren.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT extract WITH CONTROL&lt;/P&gt;&lt;P&gt;   tctrl_zrecodifmasiva CURSOR nextline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODULE liste_show_liste.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the PAI like this..&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODULE liste_exit_command AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODULE liste_before_loop.&lt;/P&gt;&lt;P&gt;  LOOP AT extract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODULE liste_init_workarea.&lt;/P&gt;&lt;P&gt;    CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zzcodins .&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-gjahr .&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zztiprec .&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zznumnorrec .&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zzstrorgejerant .&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zzejerrec .&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zzstrorgrec .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MODULE set_update_flag ON CHAIN-REQUEST.&lt;/P&gt;&lt;P&gt;    ENDCHAIN.&lt;/P&gt;&lt;P&gt;    FIELD vim_marked MODULE liste_mark_checkbox.&lt;/P&gt;&lt;P&gt;    CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zzcodins .&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-gjahr .&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zztiprec .&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zznumnorrec .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MODULE liste_update_liste.&lt;/P&gt;&lt;P&gt;    ENDCHAIN.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     FIELD zrecodifmasiva-zzcodins .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    FIELD zrecodifmasiva-zzstrorgejerant MODULE validar_org_ant.&lt;/P&gt;&lt;P&gt;    FIELD zrecodifmasiva-zzstrorgrec     MODULE validar_org_act.&lt;/P&gt;&lt;P&gt;    chain.&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zznumnorrec .&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zzstrorgejerant.&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zzejerrec.&lt;/P&gt;&lt;P&gt;      FIELD zrecodifmasiva-zzstrorgrec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      module grabar on chain-request.&lt;/P&gt;&lt;P&gt;    endchain.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODULE liste_after_loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know how to sort the data....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2009 11:07:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-data-in-tableview/m-p/4786541#M1121159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-18T11:07:00Z</dc:date>
    </item>
  </channel>
</rss>

