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: 

Mark TODOs in ABAP code

Former Member
0 Kudos

Hi,

often I need to hardcode something in the code, so to test it fast and knowing that I will have to replace this after it is generally working.

In Java I used @TODO comments, so Eclipse would show them.

Does such thing exist in ABAP?

My other idea would be to produce by purpose somehow an ATC (ABAP Test Cockpit) violation with high priority, which should be easy to write and not alter the functionality of the code behind it.

So when I release my task, the check would complain

Ideas?

Thanks

Bruno

1 ACCEPTED SOLUTION

former_member183804
Active Contributor
0 Kudos

Hello Bruno,

use may use a dedicated development object and use the were used list. In my projects we use a class-pools for each project and static parameterless methods for each subtopic/ or developer. In the to mark position we place a method to one of these methods.

One can hide the TODO development in a dedicated package to cause package violations which are reported by static test tools. One may also consider to provide already a unit test which currently turns red and in future green. Something like the TDD approach whereas with TDD you might not need the marker technique.

Best Regards

Klaus

21 REPLIES 21

Former Member
0 Kudos

Hi,

I know two methods.

1. Use the Worklist

Navigate: SE80 -> menu Utilities -> Worklist -> Display

You can also set it to be visible everytime You enter Object Navigator

(Utilities -> Settings -> ABAP Editor -> Worklist -> Display worklist).

You can marks line of code to be visible here with the comment.

2. Create search pattern in Code Inspector

You can create SCI variant to search for "TODO:" or any other string You define.

Than after executing SCI variant, You get all places with match to the definition.

Regards,

--

Przemysław

0 Kudos

u00A0

Former Member
0 Kudos

In the past I've done this by creating a check-point group in transaction SAAB and then adding a log-point (or assertion) in the code...

METHOD int_get_by_label.

  DATA:
    ls_input                TYPE zsprx_databylabel_query,
    ls_output               TYPE zsprx_databylabel_respo.

  LOG-POINT ID zawb_wizard_todo
    FIELDS 'INT_GET_BY_LABEL: Implement reference data service call.'.

  ls_input-reference_data_by_label_query-reference_data_selection_crite-label = iv_label.
  ...

ENDMETHOD.

You can then do a where-used on the checkpoint group to find the corresponding code, as well as activating logging, breaking or aborting (as appropriate) for triggered log-points or assertions.

Cheers,

Scott

former_member183804
Active Contributor
0 Kudos

Hello Bruno,

use may use a dedicated development object and use the were used list. In my projects we use a class-pools for each project and static parameterless methods for each subtopic/ or developer. In the to mark position we place a method to one of these methods.

One can hide the TODO development in a dedicated package to cause package violations which are reported by static test tools. One may also consider to provide already a unit test which currently turns red and in future green. Something like the TDD approach whereas with TDD you might not need the marker technique.

Best Regards

Klaus

0 Kudos

Very good ideas here, I think Klaus' is the best, since the package error will be shown for me when checking the objects in se09 and releasing the transport and it will also have high priority. Also the idea of using the where-used list to find these occurrences is pretty smart.

Thanks

ThomasZloch
Active Contributor
0 Kudos

Some really good suggestions here, I'm almost ashamed to say that I simply use a

"$$$

to mark missing or temporary code, sometimes with an additional comment. I find it later via a global search for $$$. Works for me

Thomas

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bruno,

are you still interested in TODO Markers for ABAP ?

We are planning support for that in the ABAP development tools for Eclipse.

You can mark your code with a TODO statement and we display the so-called TODO markers in the eclipse editor. Integration into ATC would be feasible that you can get all TODO Markers of the packages you are responsible for.

Interested? Do you know the Eclipsetools already?

Regards,

Thomas.

0 Kudos

Hi Thomas,

I was actually looking for this TODO markup functionality in ABAP Eclipse.

I hope this thread is still active.

And "YES" I would like to have this markup functionality in ABAP Eclipse.

Would you mind inform me if you are still on the project?

Thank you and best regards,

Steve

0 Kudos

+1

0 Kudos

Me too. And it is not just about a literal TODO marker, but task tag IDE support in general. That's what I'm used to:

I use TODO and FIXME a lot. These two I would also love to use in the ABAP world.

(@todo is helpful when working with old code from JBuilder times, the low prio REMINDER is rarely used.)

0 Kudos

Thomas any time-frame when this is going to be available for ABAP objects? I have been pushing hard the adoption of ADT within my organization. I think this feature will help to get people more interested in using Eclipse.

Former Member
0 Kudos

Hi Thomas,

Looking forward to see such a feature in Eclipse, is there any update on this topic?

Thanks

Tobi

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tobi,

in principal not a big deal but I'm not sure what could be right granularity to display TODO Markers in the respective eclipse view? What is your expectation? How many TODO Markers would you like to see?

Regards,

Thomas.

0 Kudos

Hi Thomas,

I would say there already is a proven soultion: the Eclipse Java Development Tools. Why not use that as an inspiration? The Java task view is customizable and therefore can be nicely tailored to one's needs.

Regards,

Thorsten

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Thorsten,

for JDT the number of resources that you consider in the marker view is limited by the number of java files that you have synced to your machine. For ABAP we don't have that limited set of ABAP objects. Therefore I'm still looking for the right filter options we should offer in the view.

Regards,

Thomas.

0 Kudos

Hi Thomas,

I see. I had somehow assumed implicitly that the limiting set is the list a favorite packages because I use that for scope selection. But that's probably not true in general.

I have not really thought this through, but maybe the options could be:

  • the favorite set of packages
  • packages of a specific application component (AKH component)
  • a working set
  • ...?

Regards,

Thorsten

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Kudos

Other suggestions from other blogs:

- Objects where I am responsible for

- Objects from my open transport requests

Regards,

Thomas.

0 Kudos

Thomas,

We could have a default for all open files, and have options on the Preferences for the suggestions you gave to widen the resources where the TODOs are synched.

Regards!

Daniel H.

Former Member
0 Kudos

Hi,

I also think that this should be settable in the preferences. For me "favorite packages" would be suitable, but the other proposals seem reasonable too.

Regards,

Florian

Hi Thomas,

Is this functionality still planned for the respective view or is it already available within a nightly build?


Would be so comfortable working with such a feature.

Regards,

Raphael

rainer_winkler
Contributor
0 Kudos

I think a TODO marker is a very important functionality that appears still to be missed.

As a workaround I just added in ABAP in Eclipse:

"! DODO

in the coding and I get a warning from the syntax check regarding an incorrect ABAP Doc statement.

Not nice, but works for the next days of coding