<?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: add the internal table fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521310#M1068947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;write the code....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Sep 2008 03:48:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-23T03:48:39Z</dc:date>
    <item>
      <title>add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521308#M1068945</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;PRE&gt;&lt;CODE&gt;Following is my final internal table values

A/c  Ord.No  m/c cost mfg cost std cost raw cost  other  total
121  12-test  100.00    0.00        0.00       50.00    50.00 200.00
121  12-test    50.00    50.00     -10 .00     50.00   50.00 190.00
121   34-test  100.00     0.00       0.00       50.00   50.00 150.00
121   34-test    25.00     0.00       0.00       25.00   25.00  75.00

I want to change my output to (I want to add the costs using Ord. No field)
A/c  Ord.No  m/c cost mfg cost std cost raw cost  other  total
121  12-test  150.00    50.00    -10 .00   100.00   100.00  390.00
121  34-test   125.00     0.00       0.00      75.00    75.00  225.00&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 03:44:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521308#M1068945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T03:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521309#M1068946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai,&lt;/P&gt;&lt;P&gt;     use collect statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           COLLECT wa INTO itab [result].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 03:47:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521309#M1068946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T03:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521310#M1068947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;write the code....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 03:48:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521310#M1068947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T03:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521311#M1068948</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 want to sum numeric fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop the internal table and use 'COLLECT' statement with your workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try 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;R.Nagarajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 03:48:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521311#M1068948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T03:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521312#M1068949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use COLLECT Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 04:29:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521312#M1068949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T04:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521313#M1068950</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;I declared my internal table like following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone pls help me how to use collect statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : BEGIN OF IT_SUM OCCURS 0,
         BUDAT LIKE BSIS-BUDAT,
         PERIOD(6) TYPE C,
         HKONT LIKE BSIS-HKONT,
         AUFNR LIKE BSIS-AUFNR,
         SGTXT LIKE BSIS-SGTXT,
         BLART LIKE BSIS-BLART,
         DMBTR(16)  TYPE P DECIMALS 2,
         MACHINE(16)  TYPE P DECIMALS 2,
         EXTERNAL(16)  TYPE P DECIMALS 2,
         STANDARD(16)  TYPE P DECIMALS 2,
         RAW(16)  TYPE P DECIMALS 2,
         WAERS LIKE BSIS-WAERS,
         OTHERS(16)  TYPE P DECIMALS 2,
         TOTAL(16)  TYPE P DECIMALS 2,
       END OF IT_SUM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 04:44:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521313#M1068950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T04:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521314#M1068951</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 check this sample code..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF itab, 
        carrid   TYPE sflight-carrid, 
        connid   TYPE sflight-connid, 
        seatsocc TYPE sflight-seatsocc, 
      END OF itab. 

DATA tab LIKE standard table of itab WITH UNIQUE KEY carrid connid. 
      

SELECT carrid connid seatsocc 
       FROM sflight 
       INTO itab. 
  COLLECT itab INTO tab. 
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6208879"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 04:49:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521314#M1068951</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-09-23T04:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521315#M1068952</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;write collect keyword in ur editor and press F1 u'l find full documentation, but in ur case u shud use it as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;collect wa into itab.&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;it would be better if u sort ur internal table before use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanku,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pavani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 05:05:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521315#M1068952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T05:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521316#M1068953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;i tried collect statement. but it is not working. any one help me pls.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 06:43:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521316#M1068953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T06:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521317#M1068954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I &lt;STRONG&gt;think&lt;/STRONG&gt; SAP Statements work the same in all systems.&lt;/P&gt;&lt;P&gt;So if it works perfectly in mine, it should work fine in yours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 06:49:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521317#M1068954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T06:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521318#M1068955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;firstly move these records to another internal table as it_final1[] = it_final[]&lt;/P&gt;&lt;P&gt;then sort the internal table it_final1 by ord.no&lt;/P&gt;&lt;P&gt;and then use delete adjust duplicate records then u will get the required output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;syntax:-delete adjust duplicate records from it_final1 comparing ord.no&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 06:58:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521318#M1068955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-23T06:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: add the internal table fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521319#M1068956</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;Use AT END OF statement as in below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP at itab.
  
  lwa_temp-acoount = itab-account.
  lwa_temp-ord_no = itab-ord_no.
  ADD itab-mc_cost TO lv_mc_cost. " Do the same for all fields
  
  AT END OF ORD_NO.
    lwa_temp-mc_cost = lv_mc_cost " Do the same for all fields
    APPEND lwa_temp TO lt_temp.
  ENDAT.
  
ENDLOOP.

" Now lt_temp will have final vaues&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2008 07:10:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-the-internal-table-fields/m-p/4521319#M1068956</guid>
      <dc:creator>asik_shameem</dc:creator>
      <dc:date>2008-09-23T07:10:10Z</dc:date>
    </item>
  </channel>
</rss>

