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: 

Exception Classes in Eclipse

phil_soady
Participant
0 Kudos
SAP_ABA7400011SAPKA74011

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 ?

5 REPLIES 5

SuhaSaha
Advisor
Advisor
0 Kudos
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?

0 Kudos

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.

0 Kudos
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?

0 Kudos

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.

0 Kudos
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