04-10-2012 11:33 AM
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
Any ideas?
Thanks!
04-10-2012 12:05 PM
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
04-10-2012 12:05 PM
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
04-10-2012 12:16 PM
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.
04-10-2012 12:23 PM
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
04-11-2012 2:19 AM
It's not a bug, it's intended to be this way so you have to use the buttons.
04-11-2012 6:03 AM
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
04-11-2012 6:25 AM
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.