Open
Description
Hello,
Is the suggestion "Prefer NEW to CREATE OBJECT" for classes with non-class-based exceptions ok? As far as I know with NEW no classic exceptions can be handled.
Regards,
Günter
Example:
data alv type ref to cl_gui_alv_grid.
create object alv
exporting i_parent = container
exceptions error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.