<?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: sorting internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262838#M779612</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can write&lt;/P&gt;&lt;P&gt;sort it_bsid1 by budat.&lt;/P&gt;&lt;P&gt;sort it_bsad1 by budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the way u can do this task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Madhavi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Jan 2008 05:08:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-11T05:08:12Z</dc:date>
    <item>
      <title>sorting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262834#M779608</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 am having two internal tables it_bsid1 and it_bsad1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to sort both the internal table at atime by using budat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2008 05:01:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262834#M779608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-11T05:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: sorting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262835#M779609</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;We can't sort 2 itab at a time.We can give single command as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort : itab1 by budat, itab2 by budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another method is merge both table into single table and then sort it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;L.Velu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2008 05:05:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262835#M779609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-11T05:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: sorting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262836#M779610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santhosh,&lt;/P&gt;&lt;P&gt;You may sort both tables one by one.&lt;/P&gt;&lt;P&gt;sort itab_bsid1 by budat.&lt;/P&gt;&lt;P&gt;sort itab_bsad1 by budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tayab shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2008 05:06:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262836#M779610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-11T05:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: sorting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262837#M779611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sorting Internal Tables&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;You can sort a standard or hashed table in a program. To sort a table by its key, use the statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT &amp;lt;itab&amp;gt; [ASCENDING|DESCENDING] [AS TEXT] [STABLE].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement sorts the internal table &amp;lt;itab&amp;gt; in ascending order by its key. The statement always applies to the table itself, not to the header line. The sort order depends on the sequence of the standard key fields in the internal table. The default key is made up of the non-numeric fields of the table line in the order in which they occur. &lt;/P&gt;&lt;P&gt;You can specify the direction of the sort using the additions ASCENDING and DESCENDING. The default is ascending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The larger the sort key, the more time the system needs to sort the table. If the sort key contains an internal table, the sorting process may be slowed down considerably.&lt;/P&gt;&lt;P&gt;You cannot sort a sorted table using the SORT statement. The system always maintains these tables automatically by their sort order. If an internal table is statically recognizable as a sorted table, the SORT statement causes a syntax error. If the table is a generic sorted table, the SORT statement causes a runtime error if the sort key is not the same as an extract of the beginning of the table key, you sort in descending order, or use the AS TEXT addition. In other words, the SORT statement is only allowed for generic internal tables, if it does not violate the internal sort order. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to this sample sorting code, might help u out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_fieldx_count = 0. "Type I&lt;/P&gt;&lt;P&gt;v_fieldy_count = 0.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if itab-fieldX is initial AND fieldY is initial . &lt;/P&gt;&lt;P&gt;v_fieldx_count = v_fieldx_count + 1.&lt;/P&gt;&lt;P&gt;v_fieldy_count = v_fieldy_count +1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif itab-fieldX is initial.&lt;/P&gt;&lt;P&gt;v_fieldx_count = v_fieldx_count + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif itab-fieldY is initial.&lt;/P&gt;&lt;P&gt;v_fieldY_count = v_fieldY_count + 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endlloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If v_fieldx_count GE v_fieldY_count .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by fieldX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;sort itab by fieldY.&lt;/P&gt;&lt;P&gt;&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;EM&gt;Reeward if useful.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankyou,&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2008 05:07:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262837#M779611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-11T05:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: sorting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262838#M779612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can write&lt;/P&gt;&lt;P&gt;sort it_bsid1 by budat.&lt;/P&gt;&lt;P&gt;sort it_bsad1 by budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the way u can do this task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Madhavi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2008 05:08:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262838#M779612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-11T05:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: sorting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262839#M779613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi madhvi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to display both the tables data in one list. i done like that only. but it is sorting first it_bsid1 table disolaying all the data later bellow that data it_bsad is sorting and displaying like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;05/10/2007     it_bsid1&lt;/P&gt;&lt;P&gt;10./10/2007    it_bsid1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5/10/2007    it_bsad1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2008 05:14:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262839#M779613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-11T05:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: sorting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262840#M779614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then u can append both Internal Tables and then perform sort on entire values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;awrd points if helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Bhupal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2008 05:17:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262840#M779614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-11T05:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: sorting internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262841#M779615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santosh,&lt;/P&gt;&lt;P&gt;                 We have to declare one more internal table that internal table contain the other two internal table fileds and we have to perform sort on those ok..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAMPLE CODE:&lt;/P&gt;&lt;P&gt;sort budat.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Award points if helpful.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt; Kiran Kumar.G.A&lt;/P&gt;&lt;P&gt;        &lt;EM&gt;Have a Nice Day..&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2008 06:19:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table/m-p/3262841#M779615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-11T06:19:17Z</dc:date>
    </item>
  </channel>
</rss>

