<?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 Calculating math expression in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-math-expression/m-p/1755129#M327224</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;does anyone know any function or class that calculates math expressions in ABAP (such as (2&lt;STRONG&gt;10+(5&lt;/STRONG&gt;3)/2)  )?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, if you don't, can you tell me if there is any standard class to handle stacks, so I can build my own expression calculator?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Hermes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be rewarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Dec 2006 12:15:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-08T12:15:55Z</dc:date>
    <item>
      <title>Calculating math expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-math-expression/m-p/1755129#M327224</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;does anyone know any function or class that calculates math expressions in ABAP (such as (2&lt;STRONG&gt;10+(5&lt;/STRONG&gt;3)/2)  )?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, if you don't, can you tell me if there is any standard class to handle stacks, so I can build my own expression calculator?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Hermes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be rewarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 12:15:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-math-expression/m-p/1755129#M327224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T12:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating math expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-math-expression/m-p/1755130#M327225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt; Here is a sample code &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: it type i value 4 ,
      it_2 type i value 2.
      data : it_3  type i.
start-of-selection.

it_3 = (  it  *  it_2  +  (  (  it  *  it_2  )  /  it_2  )  ).
write: it_3.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just rem to keep a space after  ever open bracket and before every close bracket.&lt;/P&gt;&lt;P&gt;Reagrds&lt;/P&gt;&lt;P&gt;aRUN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 12:21:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-math-expression/m-p/1755130#M327225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T12:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating math expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-math-expression/m-p/1755131#M327226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, Arun.&lt;/P&gt;&lt;P&gt;Sometimes the answer is way simpler than we are looking for...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 12:28:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-math-expression/m-p/1755131#M327226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T12:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating math expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-math-expression/m-p/1755132#M327227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can do small tasks like math caluclations using macros.&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;declare ur macro 'calc', like this.&lt;/P&gt;&lt;P&gt;suppose ur task is to add var1 and var2 into var3.&lt;/P&gt;&lt;P&gt;      define calc.&lt;/P&gt;&lt;P&gt;      &amp;amp;3 = &amp;amp;1 + &amp;amp;2.&lt;/P&gt;&lt;P&gt;      end-of-definition.             &lt;/P&gt;&lt;P&gt;Now u can call the macro and pass the variables, where ever required in the code, like this.&lt;/P&gt;&lt;P&gt;calc var1 var2 var3.&lt;/P&gt;&lt;P&gt;now var3 will have sum of var1 and var2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But be careful some people do not accept macros for performance issue.&lt;/P&gt;&lt;P&gt;Still as a fact of time, I have been using macros for various purposes and never had problem. If there is a concern not to use a macro, best other option is to build a FORM for ur task and call it using PERFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 12:30:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculating-math-expression/m-p/1755132#M327227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-08T12:30:08Z</dc:date>
    </item>
  </channel>
</rss>

