09-22-2008 10:38 AM
hi experts,
i m dividing 1 by 2 ,but it is not wrking,
the variable which is i m using of type c is
not taking 0.5 ,plz help me to sort out this,what will
be the type of variable for storing 0.5.
09-22-2008 10:40 AM
09-22-2008 10:40 AM
09-22-2008 10:40 AM
09-22-2008 10:43 AM
Hi Rajat.
Use the following code:
REPORT ZNITIN_TEST.
data: n1 type i value '1',
n2 type i value '2',
n3 type p decimals 2.
n3 = n1 / n2.
write: n3.
Hope this will help you.
Regards,
Nitin.
09-22-2008 10:44 AM
try this:
data: val type p length 3 decimals 1.
val = 1 / 2.
val will have 0.5
09-22-2008 10:49 AM
Hi Raja,
try this below code. it will work.
data: c_p type p decimals 1,
c_1 type p decimals 1 value '1',
c_2 type p decimals 1 value '2'.
start-of-selection.
c_p = c_1 / c_2.
write :/10 c_p.
Regrads,
Siva.