<?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 table content in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201356#M1004134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a internal table which has these content in store&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITEM	VENDOR	PAYMENT DATE	TAX RATE	AMOUNT	&lt;/P&gt;&lt;P&gt;001	810000		01.07.2008		1%		2500&lt;/P&gt;&lt;P&gt;002	810000		01.07.2008		1%		3600&lt;/P&gt;&lt;P&gt;003	810000		01.07.2008		2%		3000&lt;/P&gt;&lt;P&gt;004	810000		02.07.2008		2%		320&lt;/P&gt;&lt;P&gt;005	810000		02.07.2008		2%		900&lt;/P&gt;&lt;P&gt;006	810000		02.07.2008		3%		2000&lt;/P&gt;&lt;P&gt;007	810001		02.07.2008		2%		4000&lt;/P&gt;&lt;P&gt;008	810001		02.07.2008		2%		1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the table content has the same vendor , payment date and tax rate. the content of these records should be combined. and  others dont need. the content for new internal table should be &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITEM	VENDOR	PAYMENT DATE	TAX RATE	AMOUNT	&lt;/P&gt;&lt;P&gt;001	810000		01.07.2008		1%		6100&lt;/P&gt;&lt;P&gt;002	810000		01.07.2008		2%		3000&lt;/P&gt;&lt;P&gt;003	810000		02.07.2008		2%		320&lt;/P&gt;&lt;P&gt;004	810000		02.07.2008		2%		900&lt;/P&gt;&lt;P&gt;005	810000		02.07.2008		3%		2000&lt;/P&gt;&lt;P&gt;006	810001		02.07.2008		2%		5000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first 2 rows are combined and the amount is calculated to the total amount of item 1 and 2. same as the last 2 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone tell me how to achieve it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Samson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jul 2008 09:11:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-25T09:11:17Z</dc:date>
    <item>
      <title>sort table content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201356#M1004134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a internal table which has these content in store&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITEM	VENDOR	PAYMENT DATE	TAX RATE	AMOUNT	&lt;/P&gt;&lt;P&gt;001	810000		01.07.2008		1%		2500&lt;/P&gt;&lt;P&gt;002	810000		01.07.2008		1%		3600&lt;/P&gt;&lt;P&gt;003	810000		01.07.2008		2%		3000&lt;/P&gt;&lt;P&gt;004	810000		02.07.2008		2%		320&lt;/P&gt;&lt;P&gt;005	810000		02.07.2008		2%		900&lt;/P&gt;&lt;P&gt;006	810000		02.07.2008		3%		2000&lt;/P&gt;&lt;P&gt;007	810001		02.07.2008		2%		4000&lt;/P&gt;&lt;P&gt;008	810001		02.07.2008		2%		1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the table content has the same vendor , payment date and tax rate. the content of these records should be combined. and  others dont need. the content for new internal table should be &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITEM	VENDOR	PAYMENT DATE	TAX RATE	AMOUNT	&lt;/P&gt;&lt;P&gt;001	810000		01.07.2008		1%		6100&lt;/P&gt;&lt;P&gt;002	810000		01.07.2008		2%		3000&lt;/P&gt;&lt;P&gt;003	810000		02.07.2008		2%		320&lt;/P&gt;&lt;P&gt;004	810000		02.07.2008		2%		900&lt;/P&gt;&lt;P&gt;005	810000		02.07.2008		3%		2000&lt;/P&gt;&lt;P&gt;006	810001		02.07.2008		2%		5000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first 2 rows are combined and the amount is calculated to the total amount of item 1 and 2. same as the last 2 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone tell me how to achieve it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Samson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 09:11:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201356#M1004134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T09:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: sort table content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201357#M1004135</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;You can use the COLLECT statement  to get this&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>Fri, 25 Jul 2008 09:13:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201357#M1004135</guid>
      <dc:creator>bpawanchand</dc:creator>
      <dc:date>2008-07-25T09:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: sort table content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201358#M1004136</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 use the COLLECT statment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here the Cusotmer number is same - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR fs_customer.                     " Clears Header line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fs_customer-num    = 'C002'.&lt;/P&gt;&lt;P&gt;fs_customer-name   = 'MIKE'.&lt;/P&gt;&lt;P&gt;fs_customer-amount =  2000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND fs_customer TO t_customer.      " Adds a record to Internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;Record 3&lt;/STRONG&gt;**&lt;/P&gt;&lt;P&gt;CLEAR fs_customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fs_customer-num    = 'C003'.&lt;/P&gt;&lt;P&gt;fs_customer-name   = 'ARNOLD'.&lt;/P&gt;&lt;P&gt;fs_customer-amount = 2000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND fs_customer TO t_customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;Record 4&lt;/STRONG&gt;**&lt;/P&gt;&lt;P&gt;CLEAR fs_customer.                     " Clears Header line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fs_customer-num    = 'C002'.&lt;/P&gt;&lt;P&gt;fs_customer-name   = 'MIKE'.&lt;/P&gt;&lt;P&gt;fs_customer-amount =  2000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;COLLECT fs_customer INTO t_customer.   " Adds Data to Existing Field&lt;/STRONG&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;&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Chandralekha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 09:13:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201358#M1004136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T09:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: sort table content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201359#M1004137</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;COLLECT statement can be used only when all non key fileds are numeric. It adds all the non key numeric fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sumit Agarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 09:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201359#M1004137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T09:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: sort table content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201360#M1004138</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;just do m2 steps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step 1: make sure that your 1st and 2nd col are of datatype c &lt;/P&gt;&lt;P&gt;           or p or n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step2 use COLLECT STATEMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For details check the link&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb36d5358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb36d5358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 09:17:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201360#M1004138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T09:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: sort table content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201361#M1004139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If U don't have the field ITEM(first field) then U can use &lt;/P&gt;&lt;P&gt;COLLECT statement ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 09:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201361#M1004139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T09:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: sort table content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201362#M1004140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, how can set the key words of the internal table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 09:17:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201362#M1004140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T09:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: sort table content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201363#M1004141</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;frist sort the table like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let tha table is ITAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the n&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort ITAB by field vendor , payment date and tax rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now apply loop on this internal table and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inside this loop &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use AT NEW or ON change Statement on fields vendor , payment date and tax rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will  lead u  to solution &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Snehi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 09:18:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201363#M1004141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T09:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: sort table content</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201364#M1004142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Samson,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please understand and change the fields according to your requirement. This will get the issue resolved. This is for one field which I have done. For three fields declare three temporary variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT t_customer INTO fs_customer.
  IF   w_temp ne fs_customer-cusnum.
    WRITE :/ fs_customer-cusnum  UNDER text-001,
             fs_customer-cusname UNDER text-002.
    w_amt = fs_customer-amount.

  ELSE.
    w_amt = w_amt + fs_customer-amount.
    WRITE: 45 w_amt.
  ENDIF.                               " IF W_TEMP &amp;lt;&amp;gt; FS_CUSTOMER-...
  w_temp = fs_customer-cusnum.

ENDLOOP.                               " LOOP AT T_CUSTOMER....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 10:23:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-table-content/m-p/4201364#M1004142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T10:23:35Z</dc:date>
    </item>
  </channel>
</rss>

