Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
BMEIJS
Active Participant


The ‘traditional’ non-Eclipse ABAP editor comes with a few inconveniences that I would like to share with you. This blog entry is by no means meant as a rant regarding the limitations of SE38/SE80; I’m actually quite happy with the current possibilities of the ABAP editor, although I understand that it is not up to par with other modern code editors. I can still remember the command line editor in R/2 (remember transaction TM38, anyone), and SAP has come a long way since then.

But having said that, there are a few inconveniences that I run into on a daily basis. They don’t make me (very) angry, or (incredibly) mad. But sometimes I cannot suppress a sigh when encountering them for the umpteenth time in one day.

For most inconveniences I have found workarounds that I will share with you. Some of them offer a partial solution, some of them are only available as of recent Web Application Server release 702 or 721. I hope that you will share your own little workbench inconveniences and possible workaround with me and the rest.

Why are Class-based exceptions not defaulted?


The last 5 to 10 years, we have all been switching from procedural to object oriented ABAP (haven’t we!?) As part of this, we have all started to use Class Based Exceptions instead of the traditional exceptions that are linked to Ye Goode Olde SY-SUBRC. So why is it that the checkbox for ‘Exception Classes’ is not checked by default?



Actually, the inconvenience is that when you first enter the name of an exception class, and then check the ‘Exception Classes’ checkbox, the exception is deleted.
Workaround

Time for a little honesty from my side (failure alert!) When writing this blog I checked and tested my list of inconveniences and found that there is a very simple workaround: enter class-based exceptions and just press enter, the checkbox is checked automatically. So there goes my first inconvenience…. Just ‘hope’ that I don’t find all of my issues to be non-issues like this :wink:

The ‘with non-unique sorted key’ proposal


I know that the Abap-editor was quite late with adding a Code Hints option. However, after getting used to its advantages, I found it a very useful option. But there is one code hint that proposes the wrong statement alternative: when defining an internal table with a NON-UNIQUE KEY, the option UNIQUE SORTED KEY is proposed automatically. When I press the TAB-button, as you automatically start to do after a while, this wrong option is copied. When working in a pre-WAS702 release, this option doesn’t even make sense, because it’s linked to secondary internal table keys which were introduced in WAS702.
Workaround

Instead of the TAB, I now use the CONTROL-SPACE button combination (at least, that is what I’m trying to do.) This gives me two options of which I can choose one and press ENTER. Luckily for me, the option with SORTED KEY is not the default option.


Starting and navigation in display mode


This is my biggest little inconvenience. When I’m in SE80 and double click on the name of a workbench object, it opens in Display mode. Let’s assume that I understand the logic behind this (which I don’t) and switch to Change mode. Now, when I double click on another custom object, for example a called function module or used table definition, I would like to enter this object also in Change mode. But this is not the case; again the editor is in Display mode and I have to press the Change button again.

There are situations where the navigation works like I would like it to work: for example, when I’m in a program in change mode and double click on an include name, I enter this in change mode. It also works when navigating from one method to another in the same class, or from table to data element to domain. But when navigating between methods of different classes, it would be nice to remain in the editor modus that I have already chosen.
Workaround

None found yet. Help!!

No code inspection possible from within a method


I’m a fervent user of the Code Inspector. If you’re not, you should be. I use the inspector when starting to change a workbench object, during the implementation of changes or of new code, and as a finishing touch when I think I’m done. And after that, a colleague will use it during a peer review and it will be executed automatically when the transport is released.

When I’m in a function module, I can start a code inspection for the function group. However, it’s not possible to perform a code inspection from within a method implementation. I have to navigate to the class overview screen first.
Workaround

I found that as of release WAS731, it is possible to start the Abap Test Cockpit from within a method. After setting up the ATC with transaction ATC, this solves this issue because the ATC also uses the Code Inspector (like the Code Inspector uses the Extended Syntax Check). The user interface from the ATC is a little bit different from that of the code inspector, but the information is exactly the same.

No pretty-print of an enhancement-point implementation


My last issue is not something that bothers me on a daily or even weekly basis. When I create an enhancement in an explicit or implicit enhancement-point, or when I change standard SAP code directly using the Modification Assistant, the option ‘Pretty Printer’ is not available. This means that I cannot align my code to the surrounding code or use any other option of PP.
Workarounds

Actually, there are a few options that solve the problem partly. Firstly, you can select your code lines and use the ‘Format’-‘Format Selection’ option via the context menu of the Abap editor (right-mouse click). This aligns the code and saves having to enter lots of spaces manually.

Another option is to copy your code to an empty Abap editor program, use pretty printer, and copy your pretty code back. A drawback of this option is that there will be no aligning of the code with the surrounding code. But for this, you can than use the above-mentioned format option.

Maybe the best option is to limit the amount of code in an enhancement or modification, and put this code in a custom class or function module. This has the extra advantage that you can perform stand alone tests of these enhancements and modifications.

What do you think?


So this was my list. There are still some more issues that I have with the SE80 Editor, but I think it’s enough for now. I'm curious about your issues, or lack of them, with the SE80 editor.

1 Comment