<?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: Calculate mathamatical expression in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711887#M1296719</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;Even In the case you write code to split numbers, operators and functions using FIND and REGEX, its not that much easy as your user can pass value of any number of digits. So i feel like we cannot easily get a possible solution for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jun 2009 11:39:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-04T11:39:01Z</dc:date>
    <item>
      <title>Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711873#M1296705</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 am creating a FM in which i need to incorporate the below logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will be getting the data in the format 3 + (1 + MAX( 5, (5-4))). i need to calculate it as 3 + (1 + MAX (5,  1 )) = 3 + 1 + 5 = 8. &lt;/P&gt;&lt;P&gt;MAX is get biger number comparing two. We'll have MAX, MIN, RUP (round up), and RDN (round down) 4 types of Function in formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know the logic how to acheive this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 09:57:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711873#M1296705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T09:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711874#M1296706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;these digits in the expression are importing parameters or simpley digits?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:07:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711874#M1296706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T10:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711875#M1296707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a importing parameter value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Local Interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(I_FORMULA) TYPE  ZPS_FORMULA_TT&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(O_RESULT) TYPE  P&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      WRONG_EXPRESSION&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:10:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711875#M1296707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T10:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711876#M1296708</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;Could you tell us the purpose of the FM, where it is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in my opinion, evaluating/computing arithmetic expression is a cumbersome process which requires deep knowledge in &lt;STRONG&gt;Regular Expressions&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If all your expression come as the one you mentioned just pass the values( 3, 5, 4 etc) and operaion ( MAX MIN etc) so that you can easily calculate the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:14:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711876#M1296708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T10:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711877#M1296709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement is like that. We need to calculate the values by that form of values only. Is there any other solution where we can calculate that??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i didnt get your second option what you are saying. Can you please give some logic for that method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"If all your expression come as the one you mentioned just pass the values( 3, 5, 4 etc) and operaion ( MAX MIN etc) so that you can easily calculate the output."&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;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:21:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711877#M1296709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T10:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711878#M1296710</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;Assume you are always going to have the same expression 3 + (1 + MAX( 5, (5-4))) but different numbers and operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to just pass 5 numbers and 1 mode to get it done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say if you give input parameters as n1...n5 type i and mode type char03.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to pass like;&lt;/P&gt;&lt;P&gt;n1 = 4. n2 = 5. n3 = 2. n4 = 9. n5 = 3. mode = 'MIN'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;according to mode passed perform the operation and pass the value back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check whether this satisfies your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:29:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711878#M1296710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T10:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711879#M1296711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not getting your solution. If you can provide me some sample code on this it will be of great help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:41:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711879#M1296711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T10:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711880#M1296712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;Karthik mean if you have only one expression to calculate&lt;/P&gt;&lt;P&gt;so you dont need to pass that expression &lt;/P&gt;&lt;P&gt;just pass the values in the importing parameters and the method(min , max)&lt;/P&gt;&lt;P&gt;and then calculate the value for them&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:44:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711880#M1296712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T10:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711881#M1296713</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;Just write a FM to get 5 numbers and one mode. Then write code inside it to calculate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;N1 + (N2 + MODE(N3, (N4-N5)))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Roundup and Rounddown the Fifth number N5 may not be necessary so you can declare that as optional.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Got it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:51:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711881#M1296713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T10:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711882#M1296714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everytime i will be not getting the same format value. Sometime will be getting as 3+3 also. &lt;/P&gt;&lt;P&gt;So at that time i think your logic will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz clarify...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 10:54:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711882#M1296714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T10:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711883#M1296715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that case i fear it cannot be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it can be possible by using regular expressions but as i said its a very difficult for you to validate the expression, breakup into operands and operators and doing the calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where are you going to implement this FM, and which program is going to supply values for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 11:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711883#M1296715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T11:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711884#M1296716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok Santosh ,&lt;/P&gt;&lt;P&gt;you are saying that every time your expression will change &lt;/P&gt;&lt;P&gt;for that you need to use offset&lt;/P&gt;&lt;P&gt;declear some variable in function module&lt;/P&gt;&lt;P&gt;than check the expression char. by char.&lt;/P&gt;&lt;P&gt;and store the values of digits, expression(+,-,*,/) and function(min, max) in variables&lt;/P&gt;&lt;P&gt;and than you can perform operation on that variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like - for 3+3&lt;/P&gt;&lt;P&gt;first you have to store 3 in v1 than '+' in ex1 and than 3 in v2&lt;/P&gt;&lt;P&gt;than based on ex1 you can perform your operation on v1 and v2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ex1 eq '+'.&lt;/P&gt;&lt;P&gt;v3 = v1 + v2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 11:06:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711884#M1296716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T11:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711885#M1296717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to add: 3 + 1 + 5 = 9 and not 8...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 11:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711885#M1296717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T11:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711886#M1296718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still it is not confirmed that where i will be using this FM, and which program will be supplying the values for this.&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;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 11:31:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711886#M1296718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T11:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711887#M1296719</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;Even In the case you write code to split numbers, operators and functions using FIND and REGEX, its not that much easy as your user can pass value of any number of digits. So i feel like we cannot easily get a possible solution for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 11:39:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711887#M1296719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T11:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711888#M1296720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i got the solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jul 2009 08:18:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711888#M1296720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-12T08:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711889#M1296721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which is what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that you may use formulas with EVAL_FORMULA function module:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA d(255) TYPE c.
DATA l_prog TYPE syrepid.
DATA l_sr TYPE syrepid.
DATA a TYPE f.
DATA b TYPE I.
d = `2.5 * ( PIX + abs( -1 ) )`.
l_prog = sy-repid.
l_sr = 'MYROUTINE'.
CALL FUNCTION 'EVAL_FORMULA'
  EXPORTING
    formula                 = d
    program                 = l_prog
    routine                 = l_sr
  IMPORTING
    value                   = a
  EXCEPTIONS
    division_by_zero        = 1
    exp_error               = 2
    formula_table_not_valid = 3
    invalid_expression      = 4
    invalid_value           = 5
    log_error               = 6
    parameter_error         = 7
    sqrt_error              = 8
    units_not_valid         = 9
    missing_parameter       = 10
    OTHERS                  = 11.
b = a.
ASSERT B = 10.

FORM myroutine
    USING
        i_var     TYPE c
    CHANGING
        e_value   TYPE f
        e_subrc   TYPE p.
  CASE i_var.
    WHEN `PIX`. e_value = 3.
    WHEN OTHERS. e_subrc = 1.
  ENDCASE.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2009 13:49:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711889#M1296721</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2009-07-13T13:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate mathamatical expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711890#M1296722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santhosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also got the same requirement , can you please share your solution with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks From,&lt;/P&gt;&lt;P&gt;Pratap Y.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 04:12:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculate-mathamatical-expression/m-p/5711890#M1296722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-10T04:12:34Z</dc:date>
    </item>
  </channel>
</rss>

