Application Development and Automation 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: 
Read only

formula to implement in program

Former Member
0 Likes
663

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
Read only

Former Member
0 Likes
592

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

Read only

0 Likes
592

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.

Read only

0 Likes
592

Well, I guess you should post your code.

Rob

Read only

0 Likes
592

Solved it, defined all the variables as packd decimal.

Thanks,

Prabs.