2012 May 23 11:30 AM
Hi,
I want an FM for evaluating a formula.I am using EVAL_FORMULA now.But if i give negative values to the variables in this formula,it gives wrong results.Anybody know any better FM?
Hi,
I want an FM for evaluating a formula.I am using EVAL_FORMULA now.But if i give negative values to the variables in this formula,it gives wrong results.Anybody know any better FM?
2012 May 23 11:34 AM
Check a WIKI from Kesavadas.
http://wiki.sdn.sap.com/wiki/display/ABAP/Program+to+evaluate+formula+in+a+string
2012 May 23 11:59 AM
This CHECK_FORMULA is not doing anything useful for the present requirement.
2012 May 23 11:46 AM
2012 May 23 11:58 AM
2012 May 23 12:05 PM
2012 May 23 12:10 PM
I am using the same FM EVAL_FORMULA.They have mentioned in the article,that it accepts negative number.But,suppose the equation is 2.4*x*y and the values which i give are x= -10 and y =3.3,the formula will become 2.4*10-*3.3.So,it is not able to give a correct result.This is my issue.
2012 May 23 12:39 PM
what is the result? What did you expect? If you expect something other than 79.2-, then I think you need to adjust your expectations.
2012 May 23 12:46 PM
my expectation is 79.2-.But it is giving me some other random result.