<?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: help with the code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509615#M567531</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kajol,&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;loop at itab into wa_itab.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if sy-tabix = 1.&lt;/P&gt;&lt;P&gt;total= total + wa_itab1-amount.&lt;/P&gt;&lt;P&gt;endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;on change of wa_itab1-id.&lt;/P&gt;&lt;P&gt;clear total.&lt;/P&gt;&lt;P&gt;total= total + wa_itab1-amount.&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;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jul 2007 02:06:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-11T02:06:33Z</dc:date>
    <item>
      <title>help with the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509613#M567529</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 records like in internal table itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;id      amount&lt;/P&gt;&lt;P&gt;101  1  1.00&lt;/P&gt;&lt;P&gt;101  2  2.00&lt;/P&gt;&lt;P&gt;102  1  1.00&lt;/P&gt;&lt;P&gt;102  2  2.50&lt;/P&gt;&lt;P&gt;102  3  3.00&lt;/P&gt;&lt;P&gt;103  2  1.50&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want the output like like this internal table itab1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;101  3.00&lt;/P&gt;&lt;P&gt;102  6.50&lt;/P&gt;&lt;P&gt;103  1.50&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear : wa_zoritem ,price.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;total= 0.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on change of wa_itab1-id.&lt;/P&gt;&lt;P&gt;clear total.&lt;/P&gt;&lt;P&gt;total= total + wa_itab1-amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_itab1-id   = wa_itab_copy-id.&lt;/P&gt;&lt;P&gt;wa_itab1-total= wa_itab_copy-total.&lt;/P&gt;&lt;P&gt;append wa_itab1 to itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MODIFY TABLE i_FINAL FROM wa_FINAL&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                 TRANSPORTING COST.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MODIFY  wa_final to i_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_itab_copy = wa_itab.&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;clear : wa_itab.&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;This works fine when i have multiple records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this doesn't work when i have the follwwing record in itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;id      amount&lt;/P&gt;&lt;P&gt;101  1  1.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 01:59:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509613#M567529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T01:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: help with the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509614#M567530</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;clear : wa_zoritem ,price.&lt;/P&gt;&lt;P&gt;total= 0.00&lt;/P&gt;&lt;P&gt;loop at itab into wa_itab.&lt;/P&gt;&lt;P&gt;total= total + wa_itab-amount.&lt;/P&gt;&lt;P&gt;wa_itab1-id = wa_itab-id.&lt;/P&gt;&lt;P&gt;wa_itab1-total= wa_itab-total.&lt;/P&gt;&lt;P&gt;on change of wa_itab-id.&lt;/P&gt;&lt;P&gt;append wa_itab1 to itab1.&lt;/P&gt;&lt;P&gt;clear total.&lt;/P&gt;&lt;P&gt;total= total + wa_itab-amount.&lt;/P&gt;&lt;P&gt;endon.&lt;/P&gt;&lt;P&gt;clear : wa_itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Jayanthi Jayaraman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 02:03:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509614#M567530</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-07-11T02:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: help with the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509615#M567531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kajol,&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;loop at itab into wa_itab.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if sy-tabix = 1.&lt;/P&gt;&lt;P&gt;total= total + wa_itab1-amount.&lt;/P&gt;&lt;P&gt;endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;on change of wa_itab1-id.&lt;/P&gt;&lt;P&gt;clear total.&lt;/P&gt;&lt;P&gt;total= total + wa_itab1-amount.&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;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 02:06:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509615#M567531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T02:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: help with the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509616#M567532</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;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*suppose the data is avialble in the internal table ITAB.
[code]
sort ITAB by ID amount.
delete adjacent duplicates from ITAB comparing ID.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Now thw ITAB conatins only the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*101 3.00&lt;/P&gt;&lt;P&gt;*102 6.50&lt;/P&gt;&lt;P&gt;*103 1.50[/code]&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Reshma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 04:28:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509616#M567532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T04:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: help with the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509617#M567533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: itab2 like table of itab1 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;move:; &amp;lt;col1&amp;gt; to itab2-&amp;lt;col1&amp;gt;&lt;/P&gt;&lt;P&gt;move: &amp;lt;col2&amp;gt; to itab2-&amp;lt;col2&amp;gt;&lt;/P&gt;&lt;P&gt;collect itab2.&lt;/P&gt;&lt;P&gt;clear itab2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or u can collect the itab1 itself but the values in the second field will get summed up.&lt;/P&gt;&lt;P&gt;if its not a probs u can do the same method in itab1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 05:06:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509617#M567533</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2007-07-11T05:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: help with the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509618#M567534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Either use collect statement &lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;loop at itab &lt;/P&gt;&lt;P&gt; if id is same as previous &lt;/P&gt;&lt;P&gt;  add the two id's and delete record from table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sooness&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 05:21:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-the-code/m-p/2509618#M567534</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2007-07-11T05:21:57Z</dc:date>
    </item>
  </channel>
</rss>

