METHOD get_message_list .
  DATA:
    index TYPE i,
    cursor TYPE string.
  index = page->messages->num_messages( ).
  IF index IS NOT INITIAL.
    CLEAR mess_tab.
    DO index TIMES.
      CALL METHOD page->messages->get_message
        EXPORTING
          index     = sy-index
        IMPORTING
          condition = cursor
          MESSAGE   = mess.
      APPEND mess TO mess_tab.
    ENDDO.
  ENDIF.
ENDMETHOD.