‎2008 Dec 24 7:51 AM
hi,
The following is my code...
LOOP AT it_ekpo INTO wa_ekpo.
AT LAST.
SUM.
WRITE:/'GRAND TOTAL',69 wa_ekpo-netpr .
ENDAT.
ENDLOOP.
After executing the report, it is giving an Runtime Error.
Runtime Errors : Sum_overflowCan u people give some valuable inputs to solve this issue.
Thanks
Gov
‎2008 Dec 24 7:54 AM
Cause: Value too large when calculating totals in internal table, field too small
Runtime Error: SUM_OVERFLOW
Increase the size of : wa_ekpo-netpr
‎2008 Dec 24 7:54 AM
Cause: Value too large when calculating totals in internal table, field too small
Runtime Error: SUM_OVERFLOW
Increase the size of : wa_ekpo-netpr
‎2008 Dec 24 8:21 AM
>
> Cause: Value too large when calculating totals in internal table, field too small
> Runtime Error: SUM_OVERFLOW
>
> Increase the size of : wa_ekpo-netpr
Thanks for your reply,
but how can i increase the size of the variable...
here i'm referring to ekpo-netpr
Thanks
Gov
‎2008 Dec 24 8:26 AM
hi,
use datatype as
netpr type bapicurr_d.
It should work...
Rgds.,
subash
‎2008 Dec 24 8:36 AM
Hi,
While declaring the internal table it_ekpo, try to specify the field width as more than actual field width in the table.
‎2008 Dec 24 8:41 AM
thanks for your replies.
My structure was like this before
TYPES: BEGIN OF ty_ekpo,
lifnr TYPE ekko-lifnr, "vendor number
ebeln TYPE ekko-ebeln, "purchase document number
ebelp TYPE ekpo-ebelp, "Item Number of Purchasing Document
matnr TYPE ekpo-matnr, "Material Number
bukrs TYPE ekpo-bukrs, "Company Code
werks TYPE ekpo-werks, "Plant
lgort TYPE ekpo-lgort, "Storage Location
menge TYPE ekpo-menge, "Purchase Order Quantity
netpr TYPE ekpo-netpr,
END OF ty_ekpo.Now i changed it to the way u suggested
TYPES: BEGIN OF ty_ekpo,
lifnr TYPE ekko-lifnr, "vendor number
ebeln TYPE ekko-ebeln, "purchase document number
ebelp TYPE ekpo-ebelp, "Item Number of Purchasing Document
matnr TYPE ekpo-matnr, "Material Number
bukrs TYPE ekpo-bukrs, "Company Code
werks TYPE ekpo-werks, "Plant
lgort TYPE ekpo-lgort, "Storage Location
menge TYPE ekpo-menge, "Purchase Order Quantity
netpr(16) type p decimals 2,
END OF ty_ekpo.But still the problem persists.
I'm getting the same error.
Thanks
Gov
‎2008 Dec 24 8:45 AM
Hi,
Debug the above program, and find out the value of wa_ekpo-netpr and TOTAL value before giving runtime error. Then you will find the required length of the netpr.
Regards,
‎2008 Dec 24 8:49 AM
Hi,
Just try to use
TYPES: BEGIN OF ty_ekpo,
lifnr TYPE ekko-lifnr, "vendor number
ebeln TYPE ekko-ebeln, "purchase document number
ebelp TYPE ekpo-ebelp, "Item Number of Purchasing Document
matnr TYPE ekpo-matnr, "Material Number
bukrs TYPE ekpo-bukrs, "Company Code
werks TYPE ekpo-werks, "Plant
lgort TYPE ekpo-lgort, "Storage Location
menge TYPE ekpo-menge, "Purchase Order Quantity
netpr type GESUM,
END OF ty_ekpo.
Here GESUM is a data element with WERT15 as domain.
‎2008 Dec 24 8:55 AM
hi,
try this one..
data: v_netpr type ekpo-netpr.
v_netpr = 0.
LOOP AT it_ekpo INTO wa_ekpo.
v_netpr = v_netpr + wa_ekpo-netpr.
AT LAST.
WRITE:/'GRAND TOTAL', v_netpr .
ENDAT.
ENDLOOP.
if the same error exist, let me know....
‎2008 Dec 24 9:04 AM