Professional Documents
Culture Documents
ERROR - MESSAGE: This Exception Instructs The System To Ignore S Messages, I Messages, and
ERROR - MESSAGE: This Exception Instructs The System To Ignore S Messages, I Messages, and
EXPORTING
i_sales_view = 'XXXXXXXXXXXXXXXXX'
i_print_mode = '1'
TABLES
i_vbak_keytab = l_i_vbak_keytab
fxvbap = p_it_vbap
fxkomv = p_it_fxkomv
EXCEPTIONS ERROR_MESSAGE = 1.
IF sy-subrc <> 0.
ENDIF.
Atención para evitar que un message de tipo E acabe el flujo de ejecución y poder detectar el
error hay que añadir al call function:
EXCEPTIONS ERROR_MESSAGE = 1.
ERROR_MESSAGE: This exception instructs the system to ignore S messages, I messages, and
W messages until return from the function module (although they still appear in the log during
background processing). When an E message or an A message occurs, the called function
module terminates, as if the exception ERROR_MESSAGE has been triggered. If an A message is
handled using ERROR_MESSAGE, the ROLLBACK WORK statement is triggered implicitly