Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GKaschke opened this issue Oct 26, 2023 · 1 comment
Open
Labels
bug Something isn't working correctly

Comments

@GKaschke
Copy link

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.

@GKaschke GKaschke added the bug Something isn't working correctly label Oct 26, 2023
@bjoern-jueliger-sap
Copy link
Member

Yes, I agree - there shouldn't be any findings of this kind for create object with an exceptions clause, this is another bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants