Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Missing CLASS_CONSTRUCTOR

Former Member
0 Kudos

Hi,

I've had inherited from a standard class that has CLASS_CONSTRUCTOR implemented. In my Z class I can implement CONSTRUCTOR but not CLASS_CONSTRUCTOR. If I try, it says

A Component CLASS_CONSTRUCTOR has already been inherited from CL_ISH_COMP_CORDER_USER

Any ideas?

Thanks!

1 ACCEPTED SOLUTION

SuhaSaha
Advisor
Advisor
0 Kudos

Afaik, CONSTRUCTORs & CLASS_CONSTRUCTORs are not inherited.

In your inherited class is the CLASS_CONSTRUCTOR button available on the application toolbar & when you try to implement it you're getting this error message? Please clarify.

BR,

Suhas

PS: I can see you're on an IS-H environment, very few of us will have access to ISH system

6 REPLIES 6

SuhaSaha
Advisor
Advisor
0 Kudos

Afaik, CONSTRUCTORs & CLASS_CONSTRUCTORs are not inherited.

In your inherited class is the CLASS_CONSTRUCTOR button available on the application toolbar & when you try to implement it you're getting this error message? Please clarify.

BR,

Suhas

PS: I can see you're on an IS-H environment, very few of us will have access to ISH system

Former Member
0 Kudos

Hi Suhas,

Thanks for your comment. If I use the button to create the method it works! There is a bug in the standard that if you try to define it by right-click or manually completing the name in the methods tab then I get an error. Weird but is solved now .

Hope this will help other people too.

Regards,

Damián.

0 Kudos

Hello Damian,

CONSTRUCTOR & CLASS_CONSTRUCTOR are reserved method names & i had never tried to implement those by typing in their names directly (when working with Global classes, obviously)

BR,

Suhas

0 Kudos

It's not a bug, it's intended to be this way so you have to use the buttons.

0 Kudos

Hello Custodio,

This is kind of half-true. In non-inherited classes, if you key in the method names - CONSTRUCTOR & CLASS_CONSTRUCTOR - SAP will automatically generate the relevant methods! But this is not the case with inherited classes

I expect a more consistent behavior.

BR,

Suhas

0 Kudos

Thanks, new info for me. Actually, even if a class is inherited you can type CONSTRUCTOR and it will be ok, as long as the CONSTRUCTOR method is not inherited, ie superclass does not have CONSTRUCTOR.

Not sure it's clear and/or was what you meant.