06-28-2016 12:47 PM
SAP_ABA | 740 | 0011 | SAPKA74011 |
I Managed to create an Exception class in Eclipse and use the constructor to accept more information.
When back in SAPGUI, it refused to let me changed the constructor.
Error 00198
The constructor of an exception class is generated when saving the class
definition. Changing or implementing the interface is not permitted.
What is going on ?
06-28-2016 2:03 PM
What is going on ?
The automatic generation of the constructor is suppressed by the pragma ##ADT_SUPPRESS_GENERATION
For further info you can refer to this post- .
In ABAP 740 you cannot regenerate the constructor of the exception class from Eclipse. You'll have to manually adjust it in Eclipse.
Does removing the pragma help?
06-28-2016 2:12 PM
I can see the suppress generation pragma.
That doesnt explain why i cant edit it in SE24 but can change it in eclipse.
Without eclispe the code was not possible to change.
Of note, the option for FULL TEXT editor is also removed for an exception class in SE24.
Seems like an issue to me that Se24 and Eclipse are inconsistent.
06-28-2016 2:20 PM
That doesnt explain why i cant edit it in SE24 but can change it in eclipse.
I dug up the following SAP documentation
the constructor method of the superclass that is declared in the public section is added. It contains generated code that reflects the current state of the class hierarchy. Any further changes to the superclass constructor or the class itself will not trigger automatic adaptation of the constructor code in the exception class. This behavior is ensured by the ##ADT_SUPPRESS_GENERATION pragma that is added where the implementation of the constructor method begins.
Source: Creating ABAP Exception Classes - About the ABAP Development User Guide - SAP Library.
Without eclispe the code was not possible to change.
Yes, i know. What if the developer who's maintaining the code doesn't use ADT?
06-28-2016 2:26 PM
Ok so its a big hole ? Se24 says you CANT change it. Yet in Eclipse, there is no issue, Just suppress. regenerate paragma. Which is an ugly concept anyway.
Seems like the answer is bug in SE24.
06-28-2016 2:40 PM
Ok so its a big hole ? Se24 says you CANT change it. Yet in Eclipse, there is no issue, Just suppress. regenerate paragma. Which is an ugly concept anyway.
I don't think one could ever change the CONSTRUCTOR of an exc.class manually in SE24. When you added new attributes, the constructor would be regenerated automatically.
In Eclipse when you add new attributes to the exc. class, the constructor would not be automatically regenerated. Therefore the developer was given the possibility of changing the constructor manually in Eclipse.
This has been fixed in ABAP750 => one can regenerate the Constructor via a Quick-Fix
BR,
Suhas