‎2006 Aug 09 10:08 AM
Field too small when calculating totals in internal table.
In the internal table "\PROG=ZSDR003\DATA=TAB[]", a SUM statement is used to
calculate
totals.
However, the values are too large
for the designated field.
The name of the field is "KURSK".
‎2006 Aug 09 10:09 AM
Change the field type as,
data: l_p(32) type p decimals 2.
Regards,
Naimesh
‎2006 Aug 09 10:09 AM
Change the field type as,
data: l_p(32) type p decimals 2.
Regards,
Naimesh
‎2006 Aug 09 10:14 AM
Sukumar,
If the field size doesn`t fit your requirement, change the corresponding field length and retain its property.
Reward points if helpful.
Regards
‎2006 Aug 09 10:22 AM
hi Sukumar,
The only way to solve this is to increase the field size.
For calculating the total if the size is smaller than you have to use the field of same type with somewhat greater lentht.
suppose if it is the case with weight field with properites 13 and 2 decimal. and the size is smaller for your requirement than for totals, you can use similar field with properties 18 and 2 decimals.
Regards,
Richa
‎2006 Aug 09 10:26 AM
‎2006 Aug 09 10:29 AM
TOTAL_AMT(16) TYPE P DECIMALS 5,
KURSK LIKE VBKD-KURSK,
this are the datas declared.
i got a error like
price = price * kursk
total_amt = qty * price
i use sum in at the end of statement
at that time it gives the error
‎2006 Aug 09 10:32 AM
Increse the total amount length to 25 and try
TOTAL_AMT<b>(25)</b> TYPE P DECIMALS 5.
Message was edited by: Chandrasekhar Jagarlamudi
‎2006 Aug 09 10:33 AM
increase the length for total_amt to 20.
Secondly, please check if it is due to the total_amt field or other. Because sum would try and sum all the numeric fields.
Regards
Anurag
‎2006 Aug 09 1:39 PM
Hi Sukumar,
the situation is not quite clear for me.
The field KURSK should contain an exchange rate, so do you really intend to sum it? Do you really want to calculate: sum (amount) * sum (exchange rate) ?
At least the average rate is needed, but it's not calculated by the SUM statement.
Before any change consider if the dump is right, did'nt?