‎2007 Apr 30 8:47 AM
Hi Friends,
I have one field in internal table with type p decimals 2. When sum statement is executed, this field causes short dump with the message "he values are too large for the designated field". How to solve this?
Thanks.
‎2007 Apr 30 9:24 AM
when you are getting the dump by declaring the type p decimals 2 then try to calculate the sum in acharacter field.
data : tot(30).
sort itab by <your itab field(s)>.
loop at itab.
tot = tot + itab-amt.
at end of <your control break field>
write : / tot.
clear tot.
endat.
endloop.
it may fulfill your requirement.
regards
shiba dutta
‎2007 Apr 30 8:51 AM
Debugg the report and check which value are actually sum by report. That's the easy option to get rid of such errors.
if sum = sum + value then check what is value data type and which value it contains at runtime.
‎2007 Apr 30 8:51 AM
Hi,
Increase the size of the packed decimal data type ..Might be the length is less and value is not fitting into it././
rewards if its solved.
regards
nazeer
‎2007 Apr 30 8:54 AM
Hi,
Increase the size of the variable where you are storing the result of the sum statement.
Also check for its data type.
Reward if useful.
Thanks and regards,
Prerna
‎2007 Apr 30 8:57 AM
data:field type p decimals 2.
At last.
sum.
write itab-field.
endat.
I changed to type p decimals 14. Still it goes to short dump when sum statement is executed.
‎2007 Apr 30 8:58 AM
‎2007 Apr 30 9:11 AM
I tried field(16) type p decimals 2, still it gives short dump.
‎2007 Apr 30 9:14 AM
HI,
Can you write your code and the dump error?.
regards,
nazeer
‎2007 Apr 30 9:25 AM
hi,
try with float instead of packed decimals.
reward if useful
ravi
‎2007 Apr 30 9:21 AM
"the values are too large for the designated field".
( first i have mentioned.)
‎2007 Apr 30 9:24 AM
when you are getting the dump by declaring the type p decimals 2 then try to calculate the sum in acharacter field.
data : tot(30).
sort itab by <your itab field(s)>.
loop at itab.
tot = tot + itab-amt.
at end of <your control break field>
write : / tot.
clear tot.
endat.
endloop.
it may fulfill your requirement.
regards
shiba dutta
‎2007 Apr 30 10:21 AM