Skip to Content
author's profile photo Former Member
Former Member

Catching COLLECT_OVERFLOW in a start routine of UR

I am trying to add additional records in the start routine of an update rule (basically, trying to transpose from Key figure model to account model). Some time, my codes add too many records and I get COLLECT_OVERFLOW dump as RECNO field in DATA_PACKAGE type is INT4. I worked around this using smaller data package size. But, I want to catch this exception in my codes so that if at all it happens, I can log the error into the monitor.

I tried to catch in following ways :

i) CATCH SYSTEM-EXCEPTIONS COLLECT_OVERFLOW = 5.

...

ENDCATCH.

syntax error as it doesn't recognize

COLLECT_OVERFLOW type.

ii) CATCH SYSTEM-EXCEPTIONS OTHERS = 5.

...

ENDCATCH.

Complied fine, but, during run time, still the

exception was not caught and ended up with dump.

iii) TRY.

....

CATCH CX_SY_ARITHMETIC_OVERFLOW INTO OREF

(of type CX_ROOT).

...

ENTRY.

Won't get activated as TRY.. ENDTRY was used. My

colleague said TRY.. ENDTRY can be used only in OO.

Any further inputs are most appreciated. Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2005 at 03:03 AM

    hi,

    could it happened that wrong looping in the start routine ? can you post the code ?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      My acutal code is little too long, but, here is the version I am trying to test. Thanks.

      FIELD-SYMBOLS: <dp_wa> LIKE LINE OF DATA_PACKAGE.

      DATA: l_data_package TYPE STANDARD TABLE OF data_package_structure

      WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.

      DATA: ls_data_package LIKE DATA_PACKAGE,

      lt_data_package LIKE DATA_PACKAGE OCCURS 0,

      lt_data_p_coll LIKE DATA_PACKAGE OCCURS 0.

      DATA: w_break,

      text TYPE string.

      WHILE w_break IS INITIAL.

      ENDWHILE.

      CATCH SYSTEM-EXCEPTIONS OTHERS = 8.

      LOOP AT DATA_PACKAGE INTO ls_data_package.

      • Append a record to IT for Amount record.

      ls_data_package-recno = 99999999.

      DO.

      COLLECT ls_data_package INTO lt_data_package.

      ENDDO.

      ENDLOOP.

      ENDCATCH.

      • If Overflow occurs.

      IF sy-subrc NE 0.

      MONITOR-msgty = 'E'.

      MONITOR-msgv1 = 'Too many recs created in UR start '.

      MONITOR-msgv2 = 'routine. Try reducing data packet '.

      MONITOR-msgv3 = 'size in info package.'.

      APPEND MONITOR.

      ABORT = 1.

      ENDIF.

      DATA_PACKAGE[] = lt_data_package[].

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.