Skip to Content
0
Apr 09, 2009 at 10:24 PM

cl_exithandler=>get_instance return data_incons_in_exit_managem

631 Views

I am new to BADI and I tried to go to this tutorial:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702

In the tutorial on page 12 it said the test should be successful but when I tested

in the cl_exithandler=>get_instance, i got short dump with

return code as data_incons_in_exit_managem

It seems like it does not recognize the Badi that I implemented.

What did I do wrong? I am on ECC6.0 You can view the tutorial in the above link.

THANKS.

Here is the code:

Function exit_saplszar_001.

include zxszaru01 .

Endfunction.

&----


*& Include ZXSZARU01

&----


data: lr_exit type ref to zif_ex_enh_szrs0003,

y_error_table type addr_error_tab.

data: act_imp_existing type c.

y_adrc_struc = x_adrc_struc.

  • Get BADI implementation

call method cl_exithandler=>get_instance

changing

instance = lr_exit

exceptions

no_reference = 1

no_interface_reference = 2

no_exit_interface = 3

class_not_implement_interface = 4

single_exit_multiply_active = 5

cast_error = 6

exit_not_existing = 7

data_incons_in_exit_managem = 8

others = 9

.

call method lr_exit->address_check

exporting

x_dialog_allowed = x_dialog_allowed

x_accept_error = x_accept_error

x_adrc_struc = x_adrc_struc

changing

y_adrc_struc = y_adrc_struc

y_retcode = y_retcode

error_table = y_error_table.

  • Add Badi error table to the enhancement

append lines of y_error_table to error_table.