Skip to Content
0

Do you edit the exception-classes in Eclipse with the ABAP Development Tools - Plugin?

Apr 27 at 10:02 AM

90

avatar image

Hello!

I've found myself avoiding Eclipse with ADT when editing new exceptions in an existing exception-class: It's a mess not to forget all the places I have to edit for a single new variable / exception I want to add! :-(

I've discovered also advantages of editing exception-classes in Eclipse: Once I could add (manually) a variable to the constructor that should update itself but it didn't (and generated a couple of nonsense-error-messages).

How do you handle exception-classes? In Eclipse with ADT or rather still in SE24 / SE80 (as I'm ashamed to admit ;-)?

Regards,
Vlad

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Fabian Lupa Apr 27 at 11:17 AM
1

ADT, just have to do the coding part yourself (which is a plus point for me) and you need to know how exception classes and T100 messages work. If you create a new global class and inherit from one of the exception bases classes some work is already done for you.

For T100 messages there is a template available (called textIdExceptionClass).

For new exception classes I made a custom template for me. You can find it here: https://blogs.sap.com/2017/01/16/additional-adt-code-templates/

Also you need to tell your colleagues not to edit your exception classes in SE24. There you cannot edit the constructor of exception classes at all while in eclipse you can. So if you added some custom functionality in the constructor and someone accidentally regenerates the constructor in SE24 (by adding a new T100 message for example) things won't work anymore. This is also the case if you use naming conventions for the import parameters that differ from the ones SE24 uses. On newer releases there is a pragma available which I assume addresses these issues in some way (##ADT_SUPPRESS_GENERATION), not sure what exactly it does though.

All in all not an ideal situation if you have developers using both ADT and SE80.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Perfect answer !

0

Hi, Fabian!

Thanks for the detailed answer!

I'll check extIdExceptionClass and your custom template as well and will re-educate myself to use ONLY eclipse with exception-classes as well.

Thanks again!

Regards,
Vlad

0