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

multiplication problem

Former Member
0 Likes
685

Hello experts..

I am trying this statement in my code, but it is showing error pls help.

vv007 = kbetr * absmg

here absmg is quan (15 , 3 decimals)

kbetr is curr (11, 2 decimals) ie rate

vv007 is curr(15, 2 decimals).

error is input value is greater than screen field ie vv007(table is ce1****).

5 REPLIES 5
Read only

Former Member
0 Likes
597

Hi Shiva,

Try this.

<b>ws_value is curr(15,3 decimals)</b>

absmg is quan (15 , 3 decimals)

kbetr is curr (11, 2 decimals) ie rate

vv007 is curr(15, 2 decimals)

<b>ws_value = abmsg.

vv007 = ws_value * kbetr.</b>

Reward if Useful.

Regards,

Chitra

Message was edited by:

Chitra Parameswaran

Message was edited by:

Chitra Parameswaran

Read only

JozsefSzikszai
Active Contributor
0 Likes
597

hi shiva,

what are the exact values of kbter and absmg?

thanks

ec

Read only

Former Member
0 Likes
597

change u r absmg to 2 decimals

or

change u r kbetr and w007 to 3 decimals

then it will work.

Read only

Former Member
0 Likes
597

hi Shiva,

it's showing error when u Check the code or when u run the program?

if when it's run, U can try <b>Increasing the size of the field "w007"</b>.

I think this:

U have one value size 15 ( no decimals ) and outher of size 11.

look this example:

a = '999999999' "(size 9 without decimals)

b = '999999999' "(size 9 without decimals)

c = a * b.

*c has the value "999999998000000001" and size 18 (more than 15).

maybe this is the error...

try to increaser the size of field of the screen(Paint) and Increase the size of field...

Post urs results plx.

Regards

Allan Cristian

Read only

former_member194797
Active Contributor
0 Likes
597

Don't forget to choose 'Fixed point arithmetic' in the attributes of your report.