<?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: Table control sorting... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586237#M591785</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, it's very helped to me my issue was resolved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Apr 2016 04:10:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-04-28T04:10:23Z</dc:date>
    <item>
      <title>Table control sorting...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586232#M591780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have a prob to solve... its a normal module pool prog with 2 screens.. 1st screen takes key fields from the user and then when user presses the display button, it shows another screen with the corr details in a table control. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have added a sort function in the GUI status of this 2nd screen and i want tht when user selects a particular column in the table control and presses the sort button, it should sort the table control as per the col selected. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone plz tell me how can this be done. ... howcan i access the col field selected by the user in the control in my abap prog to chk which col is selcted n sort the itab and then display the sorted values in the control...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its urgent.. plzzz help...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 15:09:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586232#M591780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T15:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Table control sorting...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586233#M591781</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;Check standard SAP Demo program RSDEMO02 for sorting function in table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Executethis program and there is sort button on the application tool bar. So execute this sort in debug mode and check how it is working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 15:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586233#M591781</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-07-27T15:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Table control sorting...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586234#M591782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;goto transcation abapdocu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see example demo program for table control.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2007 10:46:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586234#M591782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-28T10:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Table control sorting...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586235#M591783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check out the following code to sort in the table control by ASCENDING and Descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case ok_code.&lt;/P&gt;&lt;P&gt; WHEN 'SORT_A'   OR&lt;/P&gt;&lt;P&gt;         'SORT_D'.                  "sort column&lt;/P&gt;&lt;P&gt;      PERFORM fcode_sort_tc USING p_tc_name&lt;/P&gt;&lt;P&gt;                                  p_table_name&lt;/P&gt;&lt;P&gt;                                  l_ok.&lt;/P&gt;&lt;P&gt;Endcase.&lt;/P&gt;&lt;P&gt;  DATA:BEGIN OF x_srt_fname,&lt;/P&gt;&lt;P&gt;      fname1(50),&lt;/P&gt;&lt;P&gt;      fname2(50),&lt;/P&gt;&lt;P&gt;      fname3(50),&lt;/P&gt;&lt;P&gt;      fname4(50),&lt;/P&gt;&lt;P&gt;      fname5(50),&lt;/P&gt;&lt;P&gt;      fname6(50),&lt;/P&gt;&lt;P&gt;      fname7(50),&lt;/P&gt;&lt;P&gt;      fname8(50),&lt;/P&gt;&lt;P&gt;      fname9(50),&lt;/P&gt;&lt;P&gt;      fname10(50),&lt;/P&gt;&lt;P&gt;END OF x_srt_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:it_srt_fname LIKE TABLE OF x_srt_fname.&lt;/P&gt;&lt;P&gt;  DATA :l_table_name       LIKE feld-name,&lt;/P&gt;&lt;P&gt;  n_cnt(2) TYPE n, v_fieldname LIKE feld-name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS &amp;lt;tc&amp;gt;         TYPE cxtab_control.&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS: &amp;lt;table&amp;gt;      TYPE STANDARD TABLE,&lt;/P&gt;&lt;P&gt;                  &amp;lt;sort_table&amp;gt; TYPE STANDARD TABLE.&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS &amp;lt;wa&amp;gt;.&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS &amp;lt;mark_field&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;SPWIZARD: END OF LOCAL DATA----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN (p_tc_name) TO &amp;lt;tc&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;SPWIZARD: get the table, which belongs to the tc&lt;/P&gt;&lt;P&gt;  CONCATENATE p_tc_name '-COLS' INTO l_table_name.&lt;/P&gt;&lt;P&gt;  ASSIGN (l_table_name) TO &amp;lt;table&amp;gt;.&lt;/P&gt;&lt;P&gt;  REFRESH it_srt_fname.CLEAR x_srt_fname.&lt;/P&gt;&lt;P&gt;  LOOP AT  &amp;lt;table&amp;gt; ASSIGNING &amp;lt;wa&amp;gt;.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT 'SELECTED' OF STRUCTURE &amp;lt;wa&amp;gt; TO &amp;lt;mark_field&amp;gt;.&lt;/P&gt;&lt;P&gt;    IF &amp;lt;mark_field&amp;gt;  = 'X'.&lt;/P&gt;&lt;P&gt;      n_cnt = n_cnt + 1.&lt;/P&gt;&lt;P&gt;      ASSIGN COMPONENT 'SCREEN-NAME' OF STRUCTURE &amp;lt;wa&amp;gt;&lt;/P&gt;&lt;P&gt;      TO &amp;lt;mark_field&amp;gt;.&lt;/P&gt;&lt;P&gt;      IF  n_cnt = 1.&lt;/P&gt;&lt;P&gt;        x_srt_fname-fname1 = &amp;lt;mark_field&amp;gt;+7(43) .&lt;/P&gt;&lt;P&gt;      ELSEIF n_cnt = 2.&lt;/P&gt;&lt;P&gt;        x_srt_fname-fname2 = &amp;lt;mark_field&amp;gt;+7(43) .&lt;/P&gt;&lt;P&gt;      ELSEIF n_cnt = 3.&lt;/P&gt;&lt;P&gt;        x_srt_fname-fname3 = &amp;lt;mark_field&amp;gt;+7(43).&lt;/P&gt;&lt;P&gt;      ELSEIF n_cnt = 4.&lt;/P&gt;&lt;P&gt;        x_srt_fname-fname4 = &amp;lt;mark_field&amp;gt;+7(43).&lt;/P&gt;&lt;P&gt;      ELSEIF n_cnt = 5.&lt;/P&gt;&lt;P&gt;        x_srt_fname-fname5 = &amp;lt;mark_field&amp;gt;+7(43).&lt;/P&gt;&lt;P&gt;      ELSEIF n_cnt = 6.&lt;/P&gt;&lt;P&gt;        x_srt_fname-fname6 = &amp;lt;mark_field&amp;gt;+7(43).&lt;/P&gt;&lt;P&gt;      ELSEIF n_cnt = 7.&lt;/P&gt;&lt;P&gt;        x_srt_fname-fname7 = &amp;lt;mark_field&amp;gt;+7(43).&lt;/P&gt;&lt;P&gt;      ELSEIF n_cnt = 8.&lt;/P&gt;&lt;P&gt;        x_srt_fname-fname8 = &amp;lt;mark_field&amp;gt;+7(43).&lt;/P&gt;&lt;P&gt;      ELSEIF n_cnt = 9.&lt;/P&gt;&lt;P&gt;        x_srt_fname-fname9 = &amp;lt;mark_field&amp;gt;+7(43).&lt;/P&gt;&lt;P&gt;      ELSEIF n_cnt = 10.&lt;/P&gt;&lt;P&gt;        x_srt_fname-fname10 = &amp;lt;mark_field&amp;gt;+7(43).&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF n_cnt &amp;gt; 10.&lt;/P&gt;&lt;P&gt;    MESSAGE 'You can''t sort more than 10 fields' TYPE 'W'.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  UNASSIGN &amp;lt;table&amp;gt;.&lt;/P&gt;&lt;P&gt;  ASSIGN  (p_table_name) TO &amp;lt;table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF p_l_ok = 'SORT_A'.&lt;/P&gt;&lt;P&gt;    SORT &amp;lt;table&amp;gt; ASCENDING BY (x_srt_fname-fname1)&lt;/P&gt;&lt;P&gt;                    (x_srt_fname-fname2) (x_srt_fname-fname3)&lt;/P&gt;&lt;P&gt;                    (x_srt_fname-fname4) (x_srt_fname-fname5)&lt;/P&gt;&lt;P&gt;                    (x_srt_fname-fname6) (x_srt_fname-fname7)&lt;/P&gt;&lt;P&gt;                    (x_srt_fname-fname8) (x_srt_fname-fname9)&lt;/P&gt;&lt;P&gt;                    (x_srt_fname-fname10)  .&lt;/P&gt;&lt;P&gt;  ELSEIF p_l_ok = 'SORT_D'.&lt;/P&gt;&lt;P&gt;    SORT &amp;lt;table&amp;gt; DESCENDING BY (x_srt_fname-fname1)&lt;/P&gt;&lt;P&gt;                      (x_srt_fname-fname2) (x_srt_fname-fname3)&lt;/P&gt;&lt;P&gt;                      (x_srt_fname-fname4) (x_srt_fname-fname5)&lt;/P&gt;&lt;P&gt;                      (x_srt_fname-fname6) (x_srt_fname-fname7)&lt;/P&gt;&lt;P&gt;                      (x_srt_fname-fname8) (x_srt_fname-fname9)&lt;/P&gt;&lt;P&gt;                      (x_srt_fname-fname10) .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 07:22:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586235#M591783</guid>
      <dc:creator>former_member491305</dc:creator>
      <dc:date>2007-07-30T07:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Table control sorting...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586236#M591784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey thank u sooo much all of u... it was really helpful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 03:36:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586236#M591784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T03:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Table control sorting...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586237#M591785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, it's very helped to me my issue was resolved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 04:10:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-sorting/m-p/2586237#M591785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-04-28T04:10:23Z</dc:date>
    </item>
  </channel>
</rss>

