Skip to content

Prefer NEW to CREATE OBJECT for classes with non-class-based exceptions  #609

Open
@GKaschke

Description

@GKaschke

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctly

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions