<?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: Processing an intenal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373456#M526052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi satya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;welcome to sdn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use &amp;lt;b&amp;gt;collect&amp;lt;/b&amp;gt; statement in loop to calcualte project related costs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;seshu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2007 05:06:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-12T05:06:14Z</dc:date>
    <item>
      <title>Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373451#M526047</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 which has following values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Project     Indicator      Cost&lt;/P&gt;&lt;P&gt;P001        I                 10000&lt;/P&gt;&lt;P&gt;P001        I                 20000&lt;/P&gt;&lt;P&gt;P001        D                500&lt;/P&gt;&lt;P&gt;P001        D                1000&lt;/P&gt;&lt;P&gt;P002        I                  2000&lt;/P&gt;&lt;P&gt;P002        I                  1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to do a processing in such a way that i get following data in another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Project    Indicator       Cost&lt;/P&gt;&lt;P&gt;P001       I                  30000&lt;/P&gt;&lt;P&gt;P001       D                 1500&lt;/P&gt;&lt;P&gt;P002       I                   3000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I achieve this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:01:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373451#M526047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T05:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373452#M526048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;append the all the records to internal table then use delete adjacent duplicates command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:03:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373452#M526048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T05:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373453#M526049</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 create a new internal table with just the three fields and then use COLLECT to sum up the records..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

LOOP AT ITAB INTO WA.

* move the values.
  WA_COLLECT-PROJECT = WA-PROJECT.
  WA_COLLECT-INDICATOR = WA-INDICATOR.
  WA_COLLECT-COST = WA-COST. 

* Use collect.
   COLLECT WA_COLLECT TO ITAB_COLLECT.  

ENDLOOP.

* Now the values will be consolidated based on project and indicator..

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:04:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373453#M526049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T05:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373454#M526050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Satya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do this way ..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort itab by project indicator.
loop at itab.
at new project.
sum.
it_final-project = itab-project.
it_final-indicator = itab-indicator.
append it_final.
clear : it_final, itab..
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:05:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373454#M526050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T05:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373455#M526051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Satya , &lt;/P&gt;&lt;P&gt;  Use the collect statement.&lt;/P&gt;&lt;P&gt;The code will look some thing like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Loop at it_1 into wa_1.
 collect wa_1 into it_2.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:06:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373455#M526051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T05:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373456#M526052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi satya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;welcome to sdn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use &amp;lt;b&amp;gt;collect&amp;lt;/b&amp;gt; statement in loop to calcualte project related costs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;seshu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:06:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373456#M526052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T05:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373457#M526053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Write&lt;/P&gt;&lt;P&gt;sort itab by project indicator.&lt;/P&gt;&lt;P&gt;Loop at ITAB.&lt;/P&gt;&lt;P&gt;  at end of indicator.&lt;/P&gt;&lt;P&gt;     read table itab index sy-tabix.&lt;/P&gt;&lt;P&gt;      sum.&lt;/P&gt;&lt;P&gt;   move-corresponding itab to itab1.&lt;/P&gt;&lt;P&gt;  append itab1.&lt;/P&gt;&lt;P&gt;  endat.&lt;/P&gt;&lt;P&gt;clear itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373457#M526053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T05:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373458#M526054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sort itab1 by firstfieldname secondfieldname&lt;/P&gt;&lt;P&gt;loop at itab1 into wa1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;amount = amount + wa1-thirdfield name .&lt;/P&gt;&lt;P&gt;at end of  second field name . &lt;/P&gt;&lt;P&gt;wa2-thirdfield name = amount.&lt;/P&gt;&lt;P&gt;append wa2 to itab2 . &lt;/P&gt;&lt;P&gt;clear amount. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end at. &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2 will contains the required entires&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373458#M526054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T05:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373459#M526055</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;for this You can use collect statement,write  collect on abap editor and press F1 help, u will get it.&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;sudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:10:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373459#M526055</guid>
      <dc:creator>S0025444845</dc:creator>
      <dc:date>2007-06-12T05:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373460#M526056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the below logic  for   you  display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort  you itab so that the  sequence will be there
sort  itab  by  PROJECT INDICATOR.
LOOP AT ITAB .
*****for  new  Project  based on sorting  .
Atnew PROJECT .
Endat .

Atend INDICATOR.
***** Total will be done  on  indicator  Using  sum
SUM .
final-PROJECT = WA-PROJECT.
final -INDICATOR = WA-INDICATOR.
final -COST = WA-COST. 
Endat
****appending in new  table
Append  final . 
ENDLOOP.

****DIsplay Output
LOOP AT  FINAL.
WRITE : / final-PROJECT ,final -INDICATOR ,final -COST  .
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373460#M526056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T05:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Processing an intenal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373461#M526057</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;&amp;lt;b&amp;gt;fallow the fallowing steps&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. first sort the internal table (sort).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.then based on previous value check with current value.&lt;/P&gt;&lt;P&gt; ex: take some temp workarea and store 1st record , when internal table workarea is holding the value of 2nd record then compare those records....... if both char datatype values are same then add the integer types.( equal operator ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. store those new value into an new internal table.(append).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. loop that new internal table . then U will get the acctual result (loop).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;don't forget to give points of itis usefill for U.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2007 05:21:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-an-intenal-table/m-p/2373461#M526057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-12T05:21:13Z</dc:date>
    </item>
  </channel>
</rss>

