Skip to Content

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( ).

To report this post you need to login first.

10 Comments

You must be Logged on to comment or reply to a post.

  1. Amit Sawant

    Hi,

    how were you able to create a NON ‘Z’/’Y’ program? or do you have some extra privileges which we developers don’t? 🙂

    Thanks for the post…

    (0) 
        1. Ankit Sharma

          Hi Matthew,

          Thanks for the guidance and inputs.

          I meant the OOPS fashion, used by Horst..!!

          I always learn here from you people and its just one more step.

          Thanking You All..!!

          (0) 
    1. Horst Keller Post author

      Hmm, that’s from function group SAPLST22_TOOLS that analyses short dumps stored in the system. For that I can use TA ST22 itself. The above program gets short dump texts by error id independent from the storage of short dumps that happened in the system.

      (0) 

Leave a Reply