<?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: Re : Internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374208#M1236182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can loop at the internal table and in that use&lt;/P&gt;&lt;P&gt;AT END OF cust_no.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Study the usage of this through F1 help.. and proceed...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Mar 2009 03:04:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-25T03:04:55Z</dc:date>
    <item>
      <title>Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374207#M1236181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am hanig the internal table which having the fields custno ,cutname,amount,curr etc..&lt;/P&gt;&lt;P&gt;if i want the data like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{ CUST NO   CUST NAME   AMOUnt   curr&lt;/P&gt;&lt;P&gt;100       KIRAN        100      MYR&lt;/P&gt;&lt;P&gt;100       KIRAN        200      MYR&lt;/P&gt;&lt;P&gt;100       KIRAN        100      SGD&lt;/P&gt;&lt;P&gt;100       KIRAN        200      SGD&lt;/P&gt;&lt;P&gt;*100      KIRAN        300      MYR  ( 100 MYR + 200 mYR ) SUBTOTAL&lt;/P&gt;&lt;P&gt;*100      KIRAN        300      SGD  ( 100 SGD + 200 SGD ) SUBTOTAL&lt;/P&gt;&lt;P&gt;101       RAM          100      MYR&lt;/P&gt;&lt;P&gt;101       RAM          200      MYR&lt;/P&gt;&lt;P&gt;101       RAM          100      SGD&lt;/P&gt;&lt;P&gt;101       RAM          200      SGD&lt;/P&gt;&lt;P&gt;*101      RAM          300      MYR  ( SUB TOTAL )&lt;/P&gt;&lt;P&gt;*101      RAM          300      SGD  ( SUB TOTAL )&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;TOATL              600      MYR  ( 300 MYR OF KIRAN + 300 MYR OF RAM )&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;                       600      SGD  ( 300 SGD OF KIRAN + 300 SGD OF RAM )&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------------------" /&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i have to do..&lt;/P&gt;&lt;P&gt;can any one please tell me hot to do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Best Regards,&lt;/P&gt;&lt;P&gt;Praveen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 03:02:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374207#M1236181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T03:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374208#M1236182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can loop at the internal table and in that use&lt;/P&gt;&lt;P&gt;AT END OF cust_no.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Study the usage of this through F1 help.. and proceed...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 03:04:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374208#M1236182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T03:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374209#M1236183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT wa INTO itab [result]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF seats, 
        carrid   TYPE sflight-carrid, 
        connid   TYPE sflight-connid, 
        seatsocc TYPE sflight-seatsocc, 
      END OF seats. 

DATA seats_tab LIKE HASHED TABLE OF seats 
               WITH UNIQUE KEY carrid connid. 

SELECT carrid connid seatsocc 
       FROM sflight 
       INTO seats. 
  COLLECT seats INTO seats_tab. 
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &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;sreenivasa sarma K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 03:28:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374209#M1236183</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T03:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374210#M1236184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First Sort The internal Table exactly the same sequence as the component of its line type - that is, first in accordance with the first component, then in accordance with the second component, and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Use LOOP-ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In control level processing , use statement  SUM to add together the numeric components.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 03:34:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374210#M1236184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T03:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374211#M1236185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen Rao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Let say u have &lt;/P&gt;&lt;P&gt;100 KIRAN 100 MYR&lt;/P&gt;&lt;P&gt;100 KIRAN 200 MYR&lt;/P&gt;&lt;P&gt;100 KIRAN 100 SGD&lt;/P&gt;&lt;P&gt;100 KIRAN 200 SGD&lt;/P&gt;&lt;P&gt;101 RAM 100 MYR&lt;/P&gt;&lt;P&gt;101 RAM 200 MYR&lt;/P&gt;&lt;P&gt;101 RAM 100 SGD&lt;/P&gt;&lt;P&gt;101 RAM 200 SGD in it_1 and loop this it_1 by using collect statement in to it_2 then you will get &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;100 KIRAN 300 MYRL&lt;/P&gt;&lt;P&gt;100 KIRAN 300 SGD&lt;/P&gt;&lt;P&gt;101 RAM 300 MYR&lt;/P&gt;&lt;P&gt;101 RAM 300 SGD this in it_2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats it rite???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 03:43:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374211#M1236185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T03:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374212#M1236186</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;Follow the below steps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.To get the total of the curr as per the custno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Sort the table based on the custno(so table will be sort 100 then 101 and so on)
loop at internal table
at new custno
sum "this will result in the sum of the amnt for every custno
end at.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.for subtotal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sort the table first on the basis of cust no then on the curr
loop at itab 
on change of curr.
add the amnt for the same curr.
end at.
enloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this help you.&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 03:44:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374212#M1236186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T03:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374213#M1236187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI sunil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thats correct for subtotal...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i want totals also...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;total       600 MYR&lt;/P&gt;&lt;P&gt;              600 SGD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u please help me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Best Regards,&lt;/P&gt;&lt;P&gt;Praveen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 03:52:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374213#M1236187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T03:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374214#M1236188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this out,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF type_tab&lt;/P&gt;&lt;P&gt;	custno 	TYPE - &lt;/P&gt;&lt;P&gt;                cutname TYPE -&lt;/P&gt;&lt;P&gt;                amount  TYPE -&lt;/P&gt;&lt;P&gt;                curr    TYPE -&lt;/P&gt;&lt;P&gt;       END OF type_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: wa_tab1  type type_tab,&lt;/P&gt;&lt;P&gt;      tbl_tab1 type table of type_tab, &lt;/P&gt;&lt;P&gt;      tbl_tab2 type table of type_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let say in tbl_tab1 u have this much records&lt;/P&gt;&lt;P&gt;        100 KIRAN 100 MYR&lt;/P&gt;&lt;P&gt;	100 KIRAN 200 MYR&lt;/P&gt;&lt;P&gt;	100 KIRAN 100 SGD&lt;/P&gt;&lt;P&gt;	100 KIRAN 200 SGD&lt;/P&gt;&lt;P&gt;	101 RAM 100 MYR&lt;/P&gt;&lt;P&gt;	101 RAM 200 MYR&lt;/P&gt;&lt;P&gt;	101 RAM 100 SGD&lt;/P&gt;&lt;P&gt;	101 RAM 200 SGD &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &lt;/P&gt;&lt;P&gt;   Loop at tbl_tab1 into wa_tab1.&lt;/P&gt;&lt;P&gt;       collect wa_tab1 into tbl_tab2.     &lt;/P&gt;&lt;P&gt;   endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in tbl_tab2 we will have this much records&lt;/P&gt;&lt;P&gt;        100 KIRAN 300 MYRL&lt;/P&gt;&lt;P&gt;	100 KIRAN 300 SGD&lt;/P&gt;&lt;P&gt;	101 RAM 300 MYR&lt;/P&gt;&lt;P&gt;	101 RAM 300 SGD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;SG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 03:53:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374214#M1236188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T03:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374215#M1236189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I understood now.. let me know in a while.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 03:58:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374215#M1236189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T03:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374216#M1236190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you solved the prg if not just go thru this code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM ZHIDE NO STANDARD PAGE HEADING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF type_tab,&lt;/P&gt;&lt;P&gt;        custno  TYPE  KNA1-KUNNR,&lt;/P&gt;&lt;P&gt;        cutname TYPE  KNA1-NAME1,&lt;/P&gt;&lt;P&gt;        amount  TYPE  BSEG-DMBTR,&lt;/P&gt;&lt;P&gt;        curr    TYPE     KNA1-UWAER,&lt;/P&gt;&lt;P&gt;       END OF type_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: wa_tab1 type type_tab,&lt;/P&gt;&lt;P&gt;tbl_tab1 type table of type_tab,&lt;/P&gt;&lt;P&gt;tbl_tab2 type table of type_tab,&lt;/P&gt;&lt;P&gt;tbl_tab3 type table of type_tab,&lt;/P&gt;&lt;P&gt;wa_tab2 type type_tab..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Let say in tbl_tab1 u have this much records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab1-custno  = '100'.&lt;/P&gt;&lt;P&gt;wa_tab1-cutname = 'KIRAN'.&lt;/P&gt;&lt;P&gt;wa_tab1-amount  = '150'.&lt;/P&gt;&lt;P&gt;wa_tab1-curr    = 'MYR'.&lt;/P&gt;&lt;P&gt;APPEND wa_tab1 to tbl_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab1-custno  = '100'.&lt;/P&gt;&lt;P&gt;wa_tab1-cutname = 'KIRAN'.&lt;/P&gt;&lt;P&gt;wa_tab1-amount  = '200'.&lt;/P&gt;&lt;P&gt;wa_tab1-curr    = 'MYR'.&lt;/P&gt;&lt;P&gt;APPEND wa_tab1 to tbl_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab1-custno  = '100'.&lt;/P&gt;&lt;P&gt;wa_tab1-cutname = 'KIRAN'.&lt;/P&gt;&lt;P&gt;wa_tab1-amount  = '100'.&lt;/P&gt;&lt;P&gt;wa_tab1-curr    = 'SGD'.&lt;/P&gt;&lt;P&gt;APPEND wa_tab1 to tbl_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab1-custno  = '100'.&lt;/P&gt;&lt;P&gt;wa_tab1-cutname = 'KIRAN'.&lt;/P&gt;&lt;P&gt;wa_tab1-amount  = '200'.&lt;/P&gt;&lt;P&gt;wa_tab1-curr    = 'SGD'.&lt;/P&gt;&lt;P&gt;APPEND wa_tab1 to tbl_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab1-custno  = '101'.&lt;/P&gt;&lt;P&gt;wa_tab1-cutname = 'RAM'.&lt;/P&gt;&lt;P&gt;wa_tab1-amount  = '100'.&lt;/P&gt;&lt;P&gt;wa_tab1-curr    = 'MYR'.&lt;/P&gt;&lt;P&gt;APPEND wa_tab1 to tbl_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab1-custno  = '101'.&lt;/P&gt;&lt;P&gt;wa_tab1-cutname = 'RAM'.&lt;/P&gt;&lt;P&gt;wa_tab1-amount  = '200'.&lt;/P&gt;&lt;P&gt;wa_tab1-curr    = 'MYR'.&lt;/P&gt;&lt;P&gt;APPEND wa_tab1 to tbl_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab1-custno  = '101'.&lt;/P&gt;&lt;P&gt;wa_tab1-cutname = 'RAM'.&lt;/P&gt;&lt;P&gt;wa_tab1-amount  = '100'.&lt;/P&gt;&lt;P&gt;wa_tab1-curr    = 'SGD'.&lt;/P&gt;&lt;P&gt;APPEND wa_tab1 to tbl_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_tab1-custno  = '101'.&lt;/P&gt;&lt;P&gt;wa_tab1-cutname = 'RAM'.&lt;/P&gt;&lt;P&gt;wa_tab1-amount  = '200'.&lt;/P&gt;&lt;P&gt;wa_tab1-curr    = 'SGD'.&lt;/P&gt;&lt;P&gt;APPEND wa_tab1 to tbl_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at tbl_tab1 into wa_tab1.&lt;/P&gt;&lt;P&gt;  collect wa_tab1 into tbl_tab2.&lt;/P&gt;&lt;P&gt;  clear wa_tab1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tbl_tab3[] = tbl_tab2[].&lt;/P&gt;&lt;P&gt;SORT tbl_tab2 by curr.&lt;/P&gt;&lt;P&gt;delete adjacent DUPLICATES FROM tbl_tab2 COMPARING  curr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at tbl_tab2 into wa_tab1.&lt;/P&gt;&lt;P&gt;clear wa_tab1-amount.&lt;/P&gt;&lt;P&gt;loop at tbl_tab3 into wa_tab2 WHERE curr = wa_tab1-curr.&lt;/P&gt;&lt;P&gt;wa_tab1-amount = wa_tab1-amount + wa_tab2-amount.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;modify tbl_tab2 from wa_tab1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;Loop at tbl_tab2 into wa_tab1.&lt;/P&gt;&lt;P&gt;  WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; wa_tab1-custno, wa_tab1-cutname, wa_tab1-amount, wa_tab1-curr.&lt;/P&gt;&lt;P&gt;  clear wa_tab1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suneel Kumar Gopisetty on Mar 25, 2009 1:36 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 04:30:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374216#M1236190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T04:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374217#M1236191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Pravin Roa &lt;/P&gt;&lt;P&gt;Collect statement adds all your amount &amp;amp; quantity fields for the same customer fields..&lt;/P&gt;&lt;P&gt;Say customer 100 has 200 &amp;amp; 300 amounts in two separate records..after using collect statement this will be added and shown as 500 for the 100 customer. If I'm not wrong this is your requirement.&lt;/P&gt;&lt;P&gt;The best way to achieve this is - Create a new internal table same as the table having these split values or multiple records, loop at the first internal table. Pass all the values to the newly created internal table. At the end use collect itab_new. You will have the required results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(But kindly Note while using COLLECT Statement your first field of the internal table has to be of TYPE C, character type. Also the type of internal table also does matter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Ajai&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ajay Ranjan on Mar 25, 2009 7:03 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 06:02:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374217#M1236191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T06:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374218#M1236192</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 this logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT tbl_tab1 BY custno cutname curr.&lt;/P&gt;&lt;P&gt;LOOP AT tbl_tab1 INTO wa_tab1.&lt;/P&gt;&lt;P&gt;  sum_fin = sum_fin + wa_tab1-amount.&lt;/P&gt;&lt;P&gt;  AT END OF custno.&lt;/P&gt;&lt;P&gt;    wa_tab2-amount = sum_fin.&lt;/P&gt;&lt;P&gt;    APPEND wa_tab2 to tbl_tab2.&lt;/P&gt;&lt;P&gt;    sum_fin = 0.&lt;/P&gt;&lt;P&gt;  ENDAT.&lt;/P&gt;&lt;P&gt;  COLLECT wa_tab1 INTO tbl_tab3.&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING wa_tab1 to wa_tab2.&lt;/P&gt;&lt;P&gt;  CLEAR: wa_tab2-curr, wa_tab1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 06:43:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374218#M1236192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T06:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Re : Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374219#M1236193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Have you manage to get desired output ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suneel G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 08:23:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-tables/m-p/5374219#M1236193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T08:23:25Z</dc:date>
    </item>
  </channel>
</rss>

