<?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: Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596643#M1436718</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;And AT NEW, AT END OF is not working here.&lt;/P&gt;&lt;P&gt;&amp;gt; tripod.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For using &lt;STRONG&gt;AT NEW or AT END OF&lt;/STRONG&gt; your &lt;STRONG&gt;Target Column&lt;/STRONG&gt; must be left most side in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 31 Jan 2010 11:49:26 GMT</pubDate>
    <dc:creator>faisalatsap</dc:creator>
    <dc:date>2010-01-31T11:49:26Z</dc:date>
    <item>
      <title>Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596639#M1436714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;Good Day,&lt;/P&gt;&lt;P&gt;I have an internal table in which i have to calculate the values of 1 column into another column based on another column. For example....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
COL 1	COL 2	COL3 (sum of col 2 based on col 1)
120	1200	
120	2000	
120	1300	4500
121	1000	
121	2000	3000
122	3000	3000


COL 1	COL 2 	COL 3 (sum of col 2 based on col 1)
120	1200	
	2000	
	1300	4500
121	1000	
	2000	3000
122	3000	3000

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz tell me how can i do this...also how to build the internal table like the 2nd table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tripod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jan 2010 09:48:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596639#M1436714</guid>
      <dc:creator>former_member308418</dc:creator>
      <dc:date>2010-01-31T09:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596640#M1436715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,  Tripod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please Always USE more meaningful subject Line for your Query and do little Search before posting&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can achieve this by using &lt;STRONG&gt;Control Break Statement&lt;/STRONG&gt; like &lt;STRONG&gt;AT NEW, AT END OF&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jan 2010 10:01:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596640#M1436715</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2010-01-31T10:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596641#M1436716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Tripod ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have understood your questions correctly, You need to calculate the subtotal of column 1 in column 3. Is it ?&lt;/P&gt;&lt;P&gt;If so , Proceed as follows :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Types : Begin of ty_tab,
col1 type vbeln,
col2 type i,
col3 type i,
end of ty_tab.

data : IT_TAB type standard table of ty_tab,
         wa_tab type ty_tab.

Types : Begin of ty_tab1
col1 type vbeln,
col3 type i,
end of ty_tab1

data : IT_TAB1 type standard table of ty_tab1,
         wa_tab1 type ty_tab1.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this populate your internal table IT_TAB aas per your business requirement. Note that you will populate only column 1 and Column2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at it_tab into wa_tab.
wa_tab1-col1 = wa_tab-col1.
wa_tab1-col3 = wa_tab-col2.
collect wa_tab1 into it_tab1.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now IT_TAB1 will contain the subtotal of column2 in IT_TAB based on column 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nikhil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jan 2010 10:01:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596641#M1436716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-31T10:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596642#M1436717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nikhil,&lt;/P&gt;&lt;P&gt; Actually i have to pass this internal table to my smartform. And AT NEW, AT END OF is not working here.&lt;/P&gt;&lt;P&gt;I tried your solution also...but not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz help me if you have more suggestions. In this internal table i have more fields also. but these columns are dependent on one another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;tripod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jan 2010 11:24:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596642#M1436717</guid>
      <dc:creator>former_member308418</dc:creator>
      <dc:date>2010-01-31T11:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596643#M1436718</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;And AT NEW, AT END OF is not working here.&lt;/P&gt;&lt;P&gt;&amp;gt; tripod.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For using &lt;STRONG&gt;AT NEW or AT END OF&lt;/STRONG&gt; your &lt;STRONG&gt;Target Column&lt;/STRONG&gt; must be left most side in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Jan 2010 11:49:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/6596643#M1436718</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2010-01-31T11:49:26Z</dc:date>
    </item>
  </channel>
</rss>

