Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
344 views
in Technique[技术] by (71.8m points)

abap - How to add an ABAPDoc for a method that is an enhancement of a standard class?

Here is one for you.

I have extended a class by one method using enhancement framework.

Enhanced class

Now, my problem is that I want to add ABAPDoc to it but cannot find any way to do it!

The code in the Enhancement Include section seems to be editable in no way.

Enhancement Include

Is there any way to do it at all? I tried also from ADT in Eclipse but this calles the SAP GUI anyway.

question from:https://stackoverflow.com/questions/65922118/how-to-add-an-abapdoc-for-a-method-that-is-an-enhancement-of-a-standard-class

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

What are you trying to do is indeed impossible.

The enhancement include is a technical object and it cannot be edited from the tab you highlighted, it is auto-generated as you changing pre- and post-methods.

What this tab shows is not an include itself, but the placement of the enh. include within the parent object

enter image description here

If you want to change the method comment from enhancement, you should go to Technical details tab and click on changed object, or just go to the class in SE24 and press to pre/post exit button, and you will end up in the same include:

enter image description here

You can write the ABAPDoc-syntaxed comment, but for me it didn't work, and Eclipse didn't recognized my comment written in SAPGui, maybe you will be luckier.

ABAPDoc team describes this piece in a fuzzy manner, it may be an expected behavior:

This ABAPDoc is only available to ADT and not SE80? I can not use it in SAP GUI development?

You can also write it in the source code and you will get also warnings when you execute a check, but there is no dedicated tools support like source code element information or quick assist (Ctrl+1)

To your principal question, ABAPDoc is a two-way road when viewing: the ABAPDocs can be viewed both from the Eclipse and SE80, and they are automatically showed in SE80 description fields (but only if they are declared synchronized).

But it seems to be a one-way road for edit: they can be created only in ADT Eclipse to be fully compatible. If the object cannot be opened in Eclipse natively like your enhancement you are out of the luck.

I put seems because I am not 100% sure. Maybe on later systems it was fixed, but on my 750 they are not recognized by Eclipse for enhanced methods.

The only reliable way of "editing" via SE80 is writing the comments to descriptions and then importing these SE80 descriptions into ABAPDoc in Eclipse

which is ridiculous in context of your question, so there is no way for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...