<?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: SUM within Loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963921#M1157196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Length of SUMMING field should be more&lt;/P&gt;&lt;P&gt;Declare as such and check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Dec 2008 12:30:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-24T12:30:01Z</dc:date>
    <item>
      <title>SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963919#M1157194</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 need to avoid some Fields in structure while using SUM macro's within loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My program terminates due to "SUM_OVERFLOW ", pl suggest me how to avoid this issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ramachandran S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 12:26:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963919#M1157194</guid>
      <dc:creator>ramachandran_sivaraman</dc:creator>
      <dc:date>2008-12-24T12:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963920#M1157195</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;Declare the field which you are using for SUM with large values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 12:29:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963920#M1157195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T12:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963921#M1157196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Length of SUMMING field should be more&lt;/P&gt;&lt;P&gt;Declare as such and check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 12:30:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963921#M1157196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T12:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963922#M1157197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Increase the length of that quantity field (or) currency field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 12:30:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963922#M1157197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T12:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963923#M1157198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Increase the length of the SUM field in ur declaration so that it accoumodate &lt;/P&gt;&lt;P&gt;how many digits ur 'SUM' field has.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 13:03:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963923#M1157198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T13:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963924#M1157199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fields which u want to avoid make them as char type if possible.&lt;/P&gt;&lt;P&gt;Else use bapicurr_d to declare numeric pack variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2008 14:17:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963924#M1157199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-24T14:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963925#M1157200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi chandra madapati,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First thanks for your timely reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table i'm using is not changeable, so i have to use the same length and field type. While calculating SUM i need to avoid those fields with a low length and which i don't take to process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ramachandran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ramachandran Sivaraman on Dec 26, 2008 9:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Dec 2008 04:25:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963925#M1157200</guid>
      <dc:creator>ramachandran_sivaraman</dc:creator>
      <dc:date>2008-12-26T04:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963926#M1157201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u paste your code here, so that you will get more ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Dec 2008 04:30:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963926#M1157201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-26T04:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963927#M1157202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you check the value of the sum in &lt;STRONG&gt;debuggin&lt;/STRONG&gt; ???  which data element are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also use user defined variable in the internal tables if standard table fields are falling short.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0.&lt;/P&gt;&lt;P&gt;include structure mara.&lt;/P&gt;&lt;P&gt;data : &lt;STRONG&gt;quan(20)&lt;/STRONG&gt; type p decimals 3,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you can use &lt;STRONG&gt;quan&lt;/STRONG&gt; field if standard fields falling short of requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First check the value in Debug mode is it going beyond the allowed length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ramchander Rao.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Dec 2008 04:36:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963927#M1157202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-26T04:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963928#M1157203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi chandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is pasted below ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:  it_opbal_temp type table of rfposxext  with header line ,
            it_opbal_sum type table of rfposxext  with header line .


{color:green}Inside where i used sum field the error occurs due to field zbd1t which is Dec with 3 len
{color} 
clear it_opbal_sum[].

  loop at it_opbal.
    it_opbal_temp[] = it_opbal[].
    delete it_opbal_temp where konto ne it_opbal-konto.

    loop at it_opbal_temp.
     sum.
      append it_opbal_temp to it_opbal_sum.
     exit.
    endloop.
          append it_opbal_temp to it_opbal_sum.
    delete it_opbal where konto eq it_opbal-konto.
  endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The rfposxext is Global structure so i cannot modify the len of the fields. &lt;/P&gt;&lt;P&gt;The error occurs due to overflow of zbd1t field so i need some help to avoid this field while processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we can move the value of it_opbal_temp to another internal table which has specify fields of structure rfposxext. I tried this using move-corresponding ,  the values not moving to another internal table.&lt;/P&gt;&lt;P&gt;&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;Ramachandran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Dec 2008 04:59:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963928#M1157203</guid>
      <dc:creator>ramachandran_sivaraman</dc:creator>
      <dc:date>2008-12-26T04:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963929#M1157204</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; it_opbal_temp[] = it_opbal[].&lt;/P&gt;&lt;P&gt;--Just comment this part&lt;/P&gt;&lt;P&gt;loop at it_opbal.&lt;/P&gt;&lt;P&gt;       delete it_opbal_temp where konto ne it_opbal-konto.&lt;/P&gt;&lt;P&gt; --&lt;/P&gt;&lt;P&gt;    loop at it_opbal_temp.&lt;/P&gt;&lt;P&gt;    use control break statements starts with &lt;STRONG&gt;AT&lt;/STRONG&gt; like &lt;STRONG&gt;AT NEW&lt;/STRONG&gt; etc&lt;/P&gt;&lt;P&gt;for more info Take &lt;STRONG&gt;F1&lt;/STRONG&gt; help&lt;/P&gt;&lt;P&gt;then use key word &lt;STRONG&gt;SUM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ramchander Rao.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Dec 2008 05:03:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963929#M1157204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-26T05:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: SUM within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963930#M1157205</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;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tired &lt;STRONG&gt;AT New&lt;/STRONG&gt; too even then the zbd1t field overflow due to it have move values in internal table for particular konto, zbd1t contains only two digit like "15,15,30,26 "  but the total length is 3. if we sum this internal table the zbd1t field alone gets overflow.&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;Ramachandran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Dec 2008 05:12:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sum-within-loop/m-p/4963930#M1157205</guid>
      <dc:creator>ramachandran_sivaraman</dc:creator>
      <dc:date>2008-12-26T05:12:32Z</dc:date>
    </item>
  </channel>
</rss>

