Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ABAP - Calculating the results using dynamically obtained formulas

0 Kudos

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.

1 ACCEPTED SOLUTION

horst_keller
Product and Topic Expert
Product and Topic Expert

A small search results in FM EVAL_FORMULA ...

4 REPLIES 4

horst_keller
Product and Topic Expert
Product and Topic Expert

A small search results in FM EVAL_FORMULA ...

0 Kudos

<chuckles>

raghug
Active Contributor
0 Kudos

That was = search = speed * efficient - time taken for example - time wasted waiting for reply + Richard Harper chuckling.

0 Kudos

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