Application Development and Automation 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: 
Read only

Do you use Eclipse to define exception class texts?

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,296

Hello,

Do you define texts of exception classes in Eclipse or do you use SAPGUI?

IMHO, the GUI editor (read: in this specific case) is more user friendly and more intuitive.

One can use this dialog to define the text and the "constant" structure is generated automatically by the framework!

Whereas in Eclipse one has to define the "constant" structure manually.

Although i don't like to juggle between the two IDEs, but why not use the best of the two worlds?

What are your thoughts? Do you use GUI for building/maintaing other workbench objects?

BR,

Suhas

1 ACCEPTED SOLUTION
Read only

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Likes
2,965

Hi Suhas,

there is a code template available in eclipse that eases the creation of exception classes:

Maybe that helps you as well.

Regards,

Thomas.

10 REPLIES 10
Read only

Former Member
0 Likes
2,965

I changed my IDE from SAP GUI to Eclipse last week, since it is configured on the system. By now I don't figured out, that it would be possible to create these texts also in Eclipse, but for sure it is.

I see another problem using Eclipse with exception classes. There is no special support for them in Eclipse. You can change all at the class, but what will happen if I change something in the CONSTRUCTOR and afterwards someone else regenerates it by the SAP GUI?

I hope there will be a special handling in the future for exception classes, including the texts.

In general I try to use as much as possible Eclipse for workbench objects. Unfortunately sometimes it's hard, especially by using persistent classes, exception classes and enhancements.

Read only

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Likes
2,964

Hi Armin,

with NW 7.50 we provide the option in the quick assist menu (shortcut CTRL-1) to regenerate the constructor of an ABAP class:

This fixes also the implementation of the exception class constructor.

The automate regeneration of the constructor is disabled via the pragma:

##ADT_SUPPRESS_GENERATION

Regards,

Thomas.

Read only

0 Likes
2,964

Hi Thomas,

good to know about. I'm very excited to use the many new features of NW 7.5.

Thanks for the hint with the pragma.

Regards,

Armin

Read only

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Likes
2,966

Hi Suhas,

there is a code template available in eclipse that eases the creation of exception classes:

Maybe that helps you as well.

Regards,

Thomas.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,964

Hi Thomas,

Thanks for the tip. Although it is not as intuitive as GUI, but still better than having to write the structure manually

I had created quite a few code templates for the GUI Editor, i am planning to import them in Eclipse. Is there a tool or do i need to copy-paste those?

BR,

Suhas

Read only

pokrakam
Active Contributor
0 Likes
2,964

Hi Suhas,

you can get by in this way if you still use the older T100 messages, but we should really be using new messages, they're so much more useful, but definitely not eclipse-friendly.

The GUI editor does all the nice work of generating the OTR texts and dropping the text IDs into the code. As I have no desire to do this manually in eclipse, I use the GUI.

On a wider note, I usually have both eclipse and GUI open. Another tip: Do not install graphical modelling tools into the same eclipse as ADT, it becomes as unstable as anything.

Regards,

Mike

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,964

Hi Mike,

What do you mean by "older T100 messages"? I do not recollect reading about "new" messages anywhere?

BR,

Suhas

Read only

pokrakam
Active Contributor
0 Likes
2,964

Hi Suhas,

Funny you should ask this question, because I quickly pulled up the help page to post it and I read something different to what I remembered from earlier versions of SAP.

When exception classes first arrived, OTR texts were advocated as the way to go. However the latest help recommends limiting OTR texts to system classes:

Exception texts

(note they explicitly state that OTR is not supported by eclipse ADT).

I must admit I'm slightly confused by this, as OTR  texts are a more modern technology and more useful in my opinion. I would hazard a guess that this could be to keep the application level grouping of T100 texts. Or maybe it's because OTR has such an awful management tool. Nevertheless, I learnt something today. 🙂

Regards,

Mike

Read only

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Likes
2,964

Hi Mike,

you should also have a look on the new exception classes implementing the interface IF_T100_DYN_MSG. Here you can assign message texts dynamically when raising the message:

ABAP Keyword Documentation

Regards,

Thomas.

Read only

pokrakam
Active Contributor
0 Likes
2,964

Thanks, very useful info at a good point in our project.