Variante 1 (BAPIRETTAB)
* Message-Collector Objekt
DATA(o_msg_list) = cf_reca_message_list=>create( ).
TRY.
* Division durch Null provozieren
DATA(lv_div) = 1 / 0.
CATCH cx_root INTO DATA(e_txt).
* Exception an den Collector übergeben
o_msg_list->add_from_exception( e_txt ).
ENDTRY.
* Gesammelte Messages als BAPIRETTAB holen
DATA(it_bapiret) = VALUE bapirettab( ).
o_msg_list->get_list_as_bapiret( IMPORTING et_list = it_bapiret ).
* BAPIRETTAB anzeigen
CALL FUNCTION 'ISH_BAPIRET2_DISPLAY'
EXPORTING
amodal_window = abap_false " Fenster modal / amodal anzeigen
TABLES
ss_bapiret2 = it_bapiret.
Variante 2 (RECA_GUI_MSGLIST_POPUP)
* Message-Collector Objekt
DATA(o_msg_list) = cf_reca_message_list=>create( ).
TRY.
* Division durch Null provozieren
DATA(lv_div) = 1 / 0.
CATCH cx_root INTO DATA(e_txt).
* Exception an den Collector übergeben
o_msg_list->add_from_exception( e_txt ).
ENDTRY.
* Protokoll als Applikation bzw. Popup anzeigen
CALL FUNCTION 'RECA_GUI_MSGLIST_POPUP'
EXPORTING
io_msglist = o_msg_list.
Links