Skip to content

Instantly share code, notes, and snippets.

@fabianlupa
fabianlupa / exception.abap
Last active January 4, 2021 13:09
Backport of if_t100_dyn_msg
" Conditions:
" - Longtext support when using MESSAGE lx_ex TYPE 'S' DISPLAY LIKE 'E'
" - Where-used-list support where possible for messages in message classes
" 1. You have a message and want to raise an exception
MESSAGE e053(sv) INTO DATA(lv_dummy) ##NEEDED.
RAISE EXCEPTION TYPE /abc/cx_bc_no_authority
EXPORTING
is_msg = /abc/cl_bc_exc_tools=>get_msg_from_sy( ).