REPORT ZSGTEST2.
Hello I used the simple code, but is giving me error or overflowing ? Is packed no defined in (4) show only int value like (1234) or it stores with decimals ?
Now with this declaration how much space it will occupy ??
data : var1(10) type c ,
var2 type i ,
var3(4) type p decimals 3 ,
var4 type f .
var1 = 'Saurabh Garg'.
var2 = '23.23' .
var3 = '12345.283' .
var4 = '23.23' .
write : var1 , var2 , var3 ,var4 .
Dear
try this
DATA : var1(10) TYPE c ,
var2 TYPE i ,
var3(8) TYPE p DECIMALS 3 ,
var4 TYPE f .
var1 = 'Saurabh Garg'.
var2 = '23.23' .
var3 = '12345.283' .
var4 = '23.23' .
WRITE : var1 , var2 , var3 ,var4 .
in var3 variable precision in 5 digits and scale is 3 digits so total are 8, you specify 3 for decimal so left 5 are for precision.
its up to you, that you want to specify the 8 in lenght, if not specify by default it would be 8.
Rai
just remove the length specification for type P field.
var3 type p decimals 3 ,
this will work.
Regards
Raja
Add a comment