<?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 Sort issue with an Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-issue-with-an-internal-table/m-p/5578771#M1272395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table with following format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoice      Item       Amount&lt;/P&gt;&lt;P&gt;951          &amp;lt;Blank&amp;gt;   450.00&lt;/P&gt;&lt;P&gt;951           0010      1200.00&lt;/P&gt;&lt;P&gt;951           0020       1300.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i need to display this internal table in such a way that, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoice      Item       Amount&lt;/P&gt;&lt;P&gt;951           0010      1200.00&lt;/P&gt;&lt;P&gt;951           0020       1300.00&lt;/P&gt;&lt;P&gt;951          &amp;lt;Blank&amp;gt;   450.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to sort for such requirements?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, the item value is blank for Tax amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence in the report, the layout should show the details as above.... (Line item 1, 2...and at last Total Tax of all line items Amount).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Help me.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 May 2009 13:03:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-18T13:03:59Z</dc:date>
    <item>
      <title>Sort issue with an Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-issue-with-an-internal-table/m-p/5578771#M1272395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table with following format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoice      Item       Amount&lt;/P&gt;&lt;P&gt;951          &amp;lt;Blank&amp;gt;   450.00&lt;/P&gt;&lt;P&gt;951           0010      1200.00&lt;/P&gt;&lt;P&gt;951           0020       1300.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i need to display this internal table in such a way that, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoice      Item       Amount&lt;/P&gt;&lt;P&gt;951           0010      1200.00&lt;/P&gt;&lt;P&gt;951           0020       1300.00&lt;/P&gt;&lt;P&gt;951          &amp;lt;Blank&amp;gt;   450.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to sort for such requirements?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, the item value is blank for Tax amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence in the report, the layout should show the details as above.... (Line item 1, 2...and at last Total Tax of all line items Amount).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Help me.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 13:03:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-issue-with-an-internal-table/m-p/5578771#M1272395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-18T13:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sort issue with an Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-issue-with-an-internal-table/m-p/5578772#M1272396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi All,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; I have an internal table with following format.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Invoice      Item       Amount&lt;/P&gt;&lt;P&gt;&amp;gt; 951          &amp;lt;Blank&amp;gt;   450.00&lt;/P&gt;&lt;P&gt;&amp;gt; 951           0010      1200.00&lt;/P&gt;&lt;P&gt;&amp;gt; 951           0020       1300.00&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Now i need to display this internal table in such a way that, &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Invoice      Item       Amount&lt;/P&gt;&lt;P&gt;&amp;gt; 951           0010      1200.00&lt;/P&gt;&lt;P&gt;&amp;gt; 951           0020       1300.00&lt;/P&gt;&lt;P&gt;&amp;gt; 951          &amp;lt;Blank&amp;gt;   450.00&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; How to sort for such requirements?&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Basically, the item value is blank for Tax amount.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Hence in the report, the layout should show the details as above.... (Line item 1, 2...and at last Total Tax of all line items Amount).&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Please Help me.....&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards&lt;/P&gt;&lt;P&gt;&amp;gt; Pavan&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Add another column to the table, copy the item values into this column setting the tax line value to 9999, sort by this column.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 13:07:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-issue-with-an-internal-table/m-p/5578772#M1272396</guid>
      <dc:creator>christine_evans</dc:creator>
      <dc:date>2009-05-18T13:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sort issue with an Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-issue-with-an-internal-table/m-p/5578773#M1272397</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;First move the blank item values of the internal table to the other internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let the internal table 1 be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoice Item Amount&lt;/P&gt;&lt;P&gt;951 &amp;lt;Blank&amp;gt; 450.00&lt;/P&gt;&lt;P&gt;951 0010 1200.00&lt;/P&gt;&lt;P&gt;951 0020 1300.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now loop at the above internal table where item = ' ' and populate the internal table 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now delete the records from internal table 1 where item equals to blank and then sort the internal table 1 as your wish..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now follow the code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_tabix type sy-tabix.&lt;/P&gt;&lt;P&gt;Loop at table 2.&lt;/P&gt;&lt;P&gt;  Loop at table 1 where invoice = table2-invoice.&lt;/P&gt;&lt;P&gt;  Endloop.&lt;/P&gt;&lt;P&gt;  v_tabix = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;  Insert table 1 record index v_tabix.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 18:01:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-issue-with-an-internal-table/m-p/5578773#M1272397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-18T18:01:49Z</dc:date>
    </item>
  </channel>
</rss>

