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

PROBLEM WITH calculation statement

Former Member
0 Likes
519

hii frnds

when i am executing this line the script is gvng a dump saying cannot interpret 9,999.9 as a number .

WS_DG_VALUE = WS_DG_VALUE + ( LOC_ZUNTUN * LOC_LFIMG *

WS_ZDGFACTOR ) .

loc_lfimg is hvng the number 9,999.9 .

all the variables r declared of type c .

kindly help

thanx

rohit

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
499

u need to declare those variables as numeric ones.

either float or packed.

5 REPLIES 5
Read only

Former Member
0 Likes
500

u need to declare those variables as numeric ones.

either float or packed.

Read only

Former Member
0 Likes
499

Hi rohit,

You cannot perform calculations on fields of type C

Declare variables of type p decimals 2 and perform the calculations

Read only

Former Member
0 Likes
499

Hi

i think this variable LOC_ZUNTUN you have declared as char just go through the code what you have writtem according to that you haev to proceed.

madan mohan.k

Read only

Former Member
0 Likes
499

hi

u declare the variables as

type p decimals 2

and continue the calculation.

Read only

Former Member
0 Likes
499

Hi,

Declare all teh variables as TYPE P with decimals.

Then after doing teh calaculation teh values will be there in ws_dg_value.

Declare one more variable with max length needed of type C.

Then <b>v_var = ws_dg_value</b>.

Then<b> print v_var</b>. This will solve ur problem

Reward if thsi helps.