Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
horst_keller
Product and Topic Expert
Product and Topic Expert
3,519

matthew.billingham has written a helpful blog about ABAP dumps.

From my point of view a lot of helpful information is already contained in the short dump texts.

You might be interested to see these texts without having to raise the exception.

The following - quick and dirty - program can be used as a starting point.

Simply enter the dump id, e.g. COMPUTE_INT_ZERODIVIDE or TIME_OUT, in the selection screen and see the short dump text.

Kind of poor man's ST22.

No guarantee that it works in all cases. I tested some. Feel free to report errors or to improve that little hack.


REPORT ...

PARAMETERS errid TYPE snapt-errid.


CLASS write_dump DEFINITION.

  PUBLIC SECTION.
    CLASS-METHODS main.
  PRIVATE SECTION.
    CLASS-METHODS write_section
      IMPORTING VALUE(errid) LIKE errid
                section      TYPE snapt-ttype.
ENDCLASS.

CLASS write_dump IMPLEMENTATION.
  METHOD main.
    WRITE / errid COLOR COL_HEADING.
    SKIP.
    WRITE / 'What happened?' COLOR COL_HEADING.
    write_section( errid = errid
                   section  = 'W' ).
    SKIP.
    WRITE / 'What can I do?' COLOR COL_HEADING.
    write_section( errid = errid
                   section  = 'T' ).
    SKIP.
    WRITE / 'Error analysis' COLOR COL_HEADING.
    write_section( errid = errid
                   section  = 'U' ).
    SKIP.
    WRITE / 'Hints for Error handling' COLOR COL_HEADING.
    write_section( errid = errid
                   section  = 'H' ).
    SKIP.
    WRITE / 'Internal notes' COLOR COL_HEADING.
    write_section( errid = errid
                   section  = 'I' ).
    SKIP.
  ENDMETHOD.
  METHOD write_section.
    DATA tline   TYPE snapt-tline.
    DATA sect    TYPE snapt-ttype.
    SELECT tline ttype
           FROM snapt INTO (tline,sect)
           WHERE langu = sy-langu AND
                 errid = errid AND
                 ttype = section
                 ORDER BY seqno.
      IF strlen( tline ) >= 8 AND
         tline(8) = '&INCLUDE'.
        REPLACE '&INCLUDE' IN tline WITH ``.
        CONDENSE tline.
        errid = tline.
        write_section( errid = errid
                       section = sect ).
      ELSE.
        WRITE / tline.
      ENDIF.
    ENDSELECT.
  ENDMETHOD.
ENDCLASS.

START-OF-SELECTION.
  write_dump=>main( ).

10 Comments
Labels in this area