Skip to Content
-4
Feb 28, 2017 at 01:12 PM

SAP ABAP - Calculating the results using dynamically obtained formulas

1120 Views

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.