Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SUM_OVERFLOW DUMP

Former Member
0 Kudos

Hi,

I am getting a SUM_OVERFLOW DUMP when running a report in summerised List, while its running correctly in Detailed List.

The field I am using for Total is TYPE bsik-dmbtr.

Runtime Errors SUM_OVERFLOW

Except. CX_SY_ARITHMETIC_OVERFLOW

Any solution?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If you are using function module REUSE_ALV_GRID_DISPLAY or REUSE_ALV_LIST_DISPLAY, are you making use of the export parameter I_CALLBACK_USER_COMMAND ?

If yes, there is some problem in this subroutine. Put a break point and check.

Regards,

Danish.

29 REPLIES 29

0 Kudos

Hi,

Could you try with total type i .

0 Kudos

Thanx for the reply

I tried but still the same dump

Former Member
0 Kudos

Hi Nishan,

May I know how many digits you are trying to sum-up?

Former Member
0 Kudos

Hi,

If you are using function module REUSE_ALV_GRID_DISPLAY or REUSE_ALV_LIST_DISPLAY, are you making use of the export parameter I_CALLBACK_USER_COMMAND ?

If yes, there is some problem in this subroutine. Put a break point and check.

Regards,

Danish.

0 Kudos

Hi,

Yes I m using i_callback_user_command but on setting up the breakpoints it is not showing anything just showing the dump

FORM start_list_viewer_item.

DATA: pgm LIKE sy-repid.

pgm = sy-repid.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = pgm

i_callback_user_command = 'USER_COMMAND1'

it_fieldcat = fieldcat1

it_sort = sortcat1

is_layout = layout_in1

i_save = 'A'

it_events = eventcat1

TABLES

t_outtab = t_line

EXCEPTIONS

OTHERS = 2.

ENDFORM. " START_LIST_VIEWER_item

Total Number when i run detailed list is displayed as 35,608,528.31 and 35,964,566.00-

0 Kudos

The Number when i run detailed list is displayed as 35,608,528.31 and 35,964,566.00-

Former Member
0 Kudos

Hi ,

The field DMBTR is having domain WERT7. Try using field or type with domain WERT9 and if you still get same error you can go for even more lenght of domain. just check in SE11 for different options of domain with WERT*.

Regards,

Ganesh.

0 Kudos

Hi,

please help me out in getting the field or type with domain WERT9.

0 Kudos

Hi,

Why you want field name?

go to WERT9 domain, press where used list button it will give you list of data elements.

You can declare total type <Data element ANY OF BELOW>.

DMHAB_LONG
DMSOL_LONG
ESBTR_EB
ESDMB_EB
FB_ICRC_ADIFF
FB_ICRC_DFOSP
FB_ICRC_DLOPP
FB_ICRC_DPREV
FC_ADDCO
FC_BKVAL
FC_COGMT
FC_HSL_C
FC_HSL_D
FC_KSL_C
FC_KSL_D
FC_LCVALIE
FC_NV2LC
FC_NV3LC
FC_VLC_EQ
FC_VLC_INV
FC_VRC_INV
ICRC_DAMNT
ICRC_GDIFF
ICRC_PAMNT
ICRC_TAMNT
ICRC_TDIFF
J_1IADDVAL
J_3RFBPR1
J_3RFBSM
J_3RFDELTAPRICE
J_3RFESM
J_3RFINSUM
J_3RFINSUMDOC
J_3RFISSVAL

0 Kudos

Hi,

Use this,


DATA: LV TYPE J_3RFINSUM.

Regards,

Danish.

0 Kudos

I have changed the field type but still dump is coming

0 Kudos

Hi,

Are you using the SUM operation?

If yes, this statement tries to subtotal ALL the numeric fields of your table... The exception can be raised for another field that the one you changed... Please check them all.

Kr,

m.

0 Kudos

Hi,

Please paste the code of the field catalog of that column on which you want to provide summation.

Regards,

Danish.

0 Kudos

Hi ,

Change fiedl Type with Type p decimals 2 .

regards

Deepak.

0 Kudos

I have changed the field to TYPE P Decimals 2 but It not resolved showing the same dump

It showing correctly for 5 or 6 lifnr, but when i tried to get large data it's throwing the SUM OVERFLOW Dump

Here's the code for field catalog

FORM write_list .

DATA :

tot TYPE p DECIMALS 2,

tot1 TYPE p DECIMALS 2,

tot2 TYPE p DECIMALS 2,

tot3 TYPE p DECIMALS 2,

tot4 TYPE p DECIMALS 2,

tot5 TYPE p DECIMALS 2,

tot6 TYPE p DECIMALS 2,

tot7 TYPE p DECIMALS 2,

totn TYPE p DECIMALS 2,

totn6 TYPE p DECIMALS 2,

totn66 TYPE p DECIMALS 2,

name1(40).

DATA : BEGIN OF name OCCURS 100,

lifnr LIKE lfa1-lifnr,

name1 LIKE lfa1-name1,

END OF name.

DELETE itab WHERE total = 0.

SORT itab BY lifnr.

SELECT lifnr name1 FROM lfa1 INTO TABLE name

FOR ALL ENTRIES IN itab

WHERE lifnr = itab-lifnr.

DELETE ADJACENT DUPLICATES FROM name COMPARING lifnr name1.

LOOP AT itab.

AT NEW lifnr.

READ TABLE name WITH KEY lifnr = itab-lifnr.

IF sy-subrc = 0.

itab-name1 = name-name1.

MODIFY itab TRANSPORTING name1.

ENDIF.

SUM.

WRITE 😕 itab-lifnr NO-GAP, sy-vline NO-GAP,

(35) itab-name1 NO-GAP, sy-vline NO-GAP,

(20) itab-total NO-GAP, sy-vline NO-GAP ,

(20) itab-notdue NO-GAP, sy-vline NO-GAP ,

(20) itab-notdue6 NO-GAP, sy-vline NO-GAP ,

(20) itab-notdue66 NO-GAP, sy-vline NO-GAP ,

(20) itab-age2 NO-GAP, sy-vline NO-GAP,

(20) itab-age3 NO-GAP, sy-vline NO-GAP,

(20) itab-age4 NO-GAP, sy-vline NO-GAP,

(20) itab-age5 NO-GAP, sy-vline NO-GAP,

(20) itab-agen NO-GAP, sy-vline NO-GAP,

(20) itab-agel NO-GAP, sy-vline NO-GAP.

tot = itab-total + tot.

tot1 = itab-age2 + tot1. tot2 = itab-age3 + tot2.

tot3 = itab-age4 + tot3. tot4 = itab-age5 + tot4.

tot5 = itab-agen + tot5.

tot6 = itab-agel + tot6.

totn = itab-notdue + totn . totn6 = itab-notdue6 + totn6. totn66 = itab-notdue66 + totn66.

ENDAT.

ENDLOOP.

WRITE :/(270) sy-uline NO-GAP,(270) sy-uline.

WRITE :/47 sy-vline,(19) tot NO-GAP COLOR COL_TOTAL, sy-vline NO-GAP,

(19) totn COLOR COL_TOTAL, sy-vline NO-GAP,

(19) totn6 COLOR COL_TOTAL, sy-vline NO-GAP,

(19) totn66 COLOR COL_TOTAL, sy-vline NO-GAP,

(19) tot1 COLOR COL_TOTAL, sy-vline NO-GAP,

(19) tot2 COLOR COL_TOTAL, sy-vline NO-GAP,

(19) tot3 COLOR COL_TOTAL, sy-vline NO-GAP,

(19) tot4 COLOR COL_TOTAL, sy-vline NO-GAP,

(19) tot5 COLOR COL_TOTAL, sy-vline NO-GAP,

(19) tot6 COLOR COL_TOTAL, sy-vline NO-GAP.

ULINE /47(240).

ENDFORM. " WRITE_LIST

0 Kudos

Hi Nishant ,

You might be using "Sum " statement in your COde :

This SUM will work fine only when it is of type I,F, or P type fields . OTherwise it will give problem in calculation .

SO you have to change type of fields which you have used .

regards

Deepak.

0 Kudos

SUM Statement is used, I have tried using TYPE P Decimals 2, but no success

While using type C it still not working.

It showing correctly for 5 or 6 lifnr, but when i tried to get large data it's throwing the SUM OVERFLOW Dump

0 Kudos

Hi Nishant ,

Actually there is no problem in your Code ,

When you are Executing SUM statement .

What it does is It creates work area to store values on sum , and That sum values Goes Beyond length of field

And it cannot store that value so it gives dump .

Better Try to Increase Length of that Field which stores large Value .

Regards

Deepak.

0 Kudos

Hi,

The problem is in the declaration part of your itab.

Please paste that part over here...

Kr,

m.

0 Kudos

Hi Nishant ,

Check this Field Type AMOUNT_KK .

Change your Field Type with this AMOUNT_KK data Element and Execute report .

regards

Deepak.

0 Kudos

here's the itab code

BEGIN OF itab OCCURS 1000,

lifnr LIKE lfa1-lifnr,

bukrs LIKE bsik-bukrs,

belnr LIKE bsik-belnr,

bldat LIKE bsik-bldat,

xblnr LIKE bsik-xblnr,

zuonr LIKE bsik-zuonr,

sgtxt LIKE bsik-sgtxt,

wrbtr LIKE bsik-wrbtr,

budat LIKE bsik-budat,

waers LIKE bsik-waers,

blart LIKE bsik-blart,

dmbtr LIKE bsik-dmbtr,

zfbdt LIKE bsik-zfbdt,

zterm LIKE bsik-zterm,

bschl LIKE bsik-bschl,

total LIKE bsik-dmbtr,

zfuture LIKE bsik-dmbtr,

zcurrent LIKE bsik-dmbtr,

crbal LIKE bsik-dmbtr,

30days LIKE bsik-dmbtr,

60days LIKE bsik-dmbtr,

90days LIKE bsik-dmbtr,

99days LIKE bsik-dmbtr,

120days LIKE bsik-dmbtr,

180days LIKE bsik-dmbtr,

365days LIKE bsik-dmbtr,

age(10) TYPE c, "p

age2 TYPE p DECIMALS 2 ,

age3 TYPE p DECIMALS 2 ,

age4 TYPE p DECIMALS 2 ,

age5 TYPE p DECIMALS 2 ,

age6 TYPE p DECIMALS 2 ,

agen TYPE p DECIMALS 2 ,

agel TYPE p DECIMALS 2 ,

l_age2 TYPE p DECIMALS 2 ,

l_age3 TYPE p DECIMALS 2 ,

l_age4 TYPE p DECIMALS 2 ,

l_age5 TYPE p DECIMALS 2 ,

l_agen TYPE p DECIMALS 2 ,

l_agel TYPE p DECIMALS 2 ,

erdat LIKE lfa1-erdat,

name1 LIKE lfa1-name1,

name2 LIKE lfa1-name2,

stras LIKE lfa1-stras,

ort01 LIKE lfa1-ort01,

ktokk LIKE lfa1-ktokk,

hkont LIKE bsik-hkont,

psort(10),

totsal LIKE bsik-dmbtr,

zbd1t LIKE bsik-zbd1t,

zbd2t LIKE bsik-zbd2t,

zbd3t LIKE bsik-zbd3t,

shkzg LIKE bsik-shkzg,

umskz LIKE bsik-umskz,

doc_days(10) TYPE c,

faedt LIKE vtopis-hdatum,

days(8) TYPE c,

notdue LIKE bsik-dmbtr,

notdue6 LIKE bsik-dmbtr,

notdue66 LIKE bsik-dmbtr,

END OF itab.

0 Kudos

Hi ,

Change your TOTAL field type

TOTAL type TFM_AMOUNT .

so you want curr type with more length

find in SE15->abap dictionary -> data lement -> give length and data type = CURR

regards

Deepak.

0 Kudos

Hi,

Could you try by replacing all those LIKE bsik-dmbtr with TYPE J_3RFINSUM ?

Kr,

m.

0 Kudos

Hi,

I have tried all permutation and combinations as stated here, but nothing seems like working

Regards,

Nishant

0 Kudos

Check in your dump (Error analysis section): On which field is the exception triggered?

As suggested by Deepak, try changing them all again with TYPE TFM_AMOUNT...

If it stil not working, I'm afraid only the type F will be ok... you seem to have really huge values to play with...

Kr,

m.

Edited by: Manu D'Haeyer on Oct 3, 2011 1:50 PM

0 Kudos

It looks like you haven't taken care of the debits and credits, so it is taking all amounts as positive. Correct that and you should be OK.

Rob

Former Member
0 Kudos

Take data type as character.It will solve your problem.

Former Member
0 Kudos

Thanks all of you for your reply,

I got it solved, there is problem with a zbd1t is of type DEC 3 i made it

zbd1t TYPE FI_DAYS_ALV (DEC08)

Got it solved thanks once again.

Regards,

Nishant

Former Member
0 Kudos

Thanx