<?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 alv summation problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-summation-problem/m-p/7082877#M1506236</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;I have a requirement where i have to find sum of mseg-menge , opening stock , closing stock.&lt;/P&gt;&lt;P&gt;so i wrote the code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_s032 into wa_s032.&lt;/P&gt;&lt;P&gt;c = wa_s032-mbwbest + sum2 + sum1 - wa_s032-mkobest.&lt;/P&gt;&lt;P&gt;diff = wa_s032-mbwbest - wa_so32-mkobest.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where, sum2 is the sum calculated for mseg-menge based on mblnr,and&lt;/P&gt;&lt;P&gt;sum1 is the sum calculated for mseg-menge based on matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error: Arithematic operations are only intended for operands that can be converted to numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please suggest for this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data declaration:&lt;/P&gt;&lt;P&gt;data: sum2 type i,&lt;/P&gt;&lt;P&gt;       sum1 type i,&lt;/P&gt;&lt;P&gt;       c type menge,&lt;/P&gt;&lt;P&gt;       diff type menge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;asha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jul 2010 12:32:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-08T12:32:47Z</dc:date>
    <item>
      <title>alv summation problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-summation-problem/m-p/7082877#M1506236</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;I have a requirement where i have to find sum of mseg-menge , opening stock , closing stock.&lt;/P&gt;&lt;P&gt;so i wrote the code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_s032 into wa_s032.&lt;/P&gt;&lt;P&gt;c = wa_s032-mbwbest + sum2 + sum1 - wa_s032-mkobest.&lt;/P&gt;&lt;P&gt;diff = wa_s032-mbwbest - wa_so32-mkobest.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where, sum2 is the sum calculated for mseg-menge based on mblnr,and&lt;/P&gt;&lt;P&gt;sum1 is the sum calculated for mseg-menge based on matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error: Arithematic operations are only intended for operands that can be converted to numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please suggest for this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data declaration:&lt;/P&gt;&lt;P&gt;data: sum2 type i,&lt;/P&gt;&lt;P&gt;       sum1 type i,&lt;/P&gt;&lt;P&gt;       c type menge,&lt;/P&gt;&lt;P&gt;       diff type menge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;asha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 12:32:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-summation-problem/m-p/7082877#M1506236</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-08T12:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: alv summation problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-summation-problem/m-p/7082878#M1506237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;fine there we got the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data type of c and diff is MENGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now have a look at type menge with SE11, you won't be astonished it doesnt work since MENGE is a flat structure but not a dataelement. you might want to use some type p length 12 decimals 2 stuff or kbetr or whatever, just make sure it is numeric if you want to calculate with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Florian Kemmer on Jul 8, 2010 2:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 12:36:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-summation-problem/m-p/7082878#M1506237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-08T12:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: alv summation problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-summation-problem/m-p/7082879#M1506238</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;if you check the type of menge its a structure.&lt;/P&gt;&lt;P&gt;So declare that sum and diff with table-menge&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like eg: mseg-menge . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After check the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this might solve your problem&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Sumodh.P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 12:37:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-summation-problem/m-p/7082879#M1506238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-08T12:37:39Z</dc:date>
    </item>
  </channel>
</rss>

