-4

SAP ABAP - Calculating the results using dynamically obtained formulas

Hi Experts,

I have a requirement in which there is a custom formulas table maintained.

The table entries looks something like this.

ID Formula

LL1 speed * time

LL2 speed / time

etc...

Now in my report i will be fetching speed, time and the "id" that i have to use.

How to dynamically use the formulas section of the above table table and get my results.

For eg:

In my report speed = 100

time = 5.

If table entry is speed * time.

then my result should be 500.

Later if someone changes the table entry to speed / time.

then my result of the program should be 100 / 5 = 20.

Can you please provide the logic on how to handle this dynamically in my code.

Please let me know if you need any further info on this.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 28, 2017 at 01:59 PM

    A small search results in FM EVAL_FORMULA ...

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01, 2017 at 05:49 AM

    Thanks a lot Keller the FM EVAL_FORMULA was very helpful for my requirement.

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content