DATA(lr_log) = NEW cl_bal_logobj( i_log_object = 'ZMM'
i_default_subobject = 'ZMM_LOGGING' ).
lr_log->add_statustext( i_statustext = |Write a text.| ).
lr_log->add_exception( lo_excp ).
lr_log->add_errortext( lo_excp->get_longtext( ) ).
lr_log->add_msg( i_probclass = '1' ). "will use sy-msgty sy-msgid sy-msgno sy-msgv1 ...
lr_log->save( i_client = sy-mandt ).
lr_log->display( ).
Note: When using on EHP 7.40 you will get some confusing & &
around your message texts.
https://tricktresor.de/blog/ausnahmen-mit-t100-nachricht-abap750/
Possible values for i_probclass: