cancel
Showing results for 
Search instead for 
Did you mean: 

The field XXX cannot be totalled because of field overflow

Peter_Inotai
Active Contributor
0 Kudos

I've got the following message in my ALV grid report:

"The field Hours cannot be totalled because of field overflow

Message no. 0K 051 "

The column reference is to CATSDB-CATSHOURS (QUAN 4/2).

The fieldcatalog is generated the following way:

Code:

  METHOD fill_fieldcatalog.

    DATA: r_wa_fieldcat TYPE lvc_s_fcat.

*--> CATSDB

    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

         EXPORTING

              i_structure_name = 'CATSDB'

              i_client_never_display = flagged

         CHANGING

              ct_fieldcat = r_it_fieldcat.

...

In SE16 I can summarize this field .... but I have no idea why it works there and doesn't in my report.

I found OSS note 435362, it describes the same situation, but we already have the package level mentioned there....so it's not my case.

Any idea?

Thanks in advance,

Incho

Ps:My release is SAP R/3 46C and ALV grid is implemented based on cl_gui_alv_grid.

Accepted Solutions (0)

Answers (2)

Answers (2)

franois_henrotte
Active Contributor
0 Kudos

Probably you get an error only when your total exceeds 9999.99

Indeed this message appears when arithmetic error occurs in form FB_SUBTOTALS_GET of module pool SKBH:

    catch system-exceptions arithmetic_errors = 5

                            conversion_errors = 5.

       ---

    endcatch.

    if sy-subrc = 5.

      ---

      MESSAGE I051(0K) WITH LS_FIELDCAT-SELTEXT.

    endif.

To avoid this you have to change internal type of your field in catalog, not just then output length. QUAN 4/2 is not enough to store big numbers.

Peter_Inotai
Active Contributor
0 Kudos

Hi François!

Thanks for your answer!!!

I get this error message, when my total exceeds 999.99 ... I would also expect 9999.99.

This message is raised in program 'LSKBHF__' form OVERFLOW:

...

  IF SY-SUBRC = 0.

    l_tabix = sy-tabix.

*   message i061(0k) with ls_fieldcat-seltext raising field_overflow.

    MESSAGE I051(0K) WITH LS_FIELDCAT-SELTEXT.

    LS_FIELDCAT-DO_SUM = ' '.

    MODIFY RT_FIELDCAT FROM LS_FIELDCAT INDEX L_TABIX.

  ENDIF.

...

What is strange for me, that in transaction CADO it works.

It uses FM REUSE_ALV_LIST_DISPLAY (LCAPPIN2 / 2578) and in the fieldcatalog it uses also CATSDB-CATSHOURS as reference.

In the field_list internal table the following fields are filled:

COL_POS = 9

FIELDNAME = CATSHOURS

FIX_COLUMN = X

REF_TABNAME = CATSDB

The rest is initial.

May be it would work in my case if I use the mentioned function module....but I prefer the cl_gui_alv_grid class.

In the CADO result screen if I press F1 for that field it shows CATSDB-CATSHOURS as reference .... I already debugged CADO....but I couldn't find the reason.

I checked OSS note 435362 and the correction is mentioned there is already commented out in our system by a higher support package....so it might be a programming error....

As temporary solution the users can use the CATSDB-CATSQUANTITY fields, which is QUAN 15/3.

If you have other idea please let me know.

Thanks,

Incho

ChristianFi
Active Participant
0 Kudos

No solution, but maybe an explanation....

the fields is a quantity field with reference to a unit.

Since the unit determines how many decimals are displayed, I could imagine that a "large" can be summarized if the reference to the unit is ignored but fails if it has to be displayed without decimals.

Just a thought....

Christian

jakob_steen-petersen
Active Participant
0 Kudos

Set the fieldlenght to 10 or something like that in the fieldcatalog for th especifiet field (CATSHOURS) ...

Peter_Inotai
Active Contributor
0 Kudos

Thanks Jakob!

I've already tried....the lenght was longer in the ALV grid display, but the summary didn't work:-(

Like this:

r_wa_fieldcat-dd_outlen = 10.

I used structure LVC_S_FCAT for fieldcatalog reference.

Incho