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: 

formula to implement in program

Former Member
0 Kudos
137

Hi experts,

I have a formula and i want to implement it program but not getting proper values.

gr = (( e.count / s.count ) pow 1/n ) - 1.

in the program,

I did seperately also but still not getting the values,

i implemented in this way in the program.

n1 = 1 / n.

e = e.count / s.count.

p = e ** n1.

gr = p - 1.

But still not getting the values in the programs output,

Any suggestion or help on this will be of great use to me.

Thanks in advance.

Prabs.

4 REPLIES 4

Former Member
0 Kudos
66

Did you define n1 as decimal rather than integer? I think everything should be decimal (P) or floating point (F).

Have you used a break-point to figure out exactly where the problem comes up?

Rob

0 Kudos
66

Hi Rob,

I defined everything n1 as p and also d, p.

I abap debugger, its not going to that value at all.

Thanks,

Prabs.

0 Kudos
66

Well, I guess you should post your code.

Rob

0 Kudos
66

Solved it, defined all the variables as packd decimal.

Thanks,

Prabs.