How to Change the Theme of Your ABAP Workbench Tools?


Overview

I got a lots of questions for my previous post, Where Can You Find Your ABAP Source Code?. You asked me about what theme I use when I work in ABAP Workbench. A few of you really liked the dark theme, I used during the recordings. This is a custom font and color scheme.


Before You Start

Before you start changing your current theme settings, you have to perform a few things.

  1. Customizing the font and color of the editor is only available in the New ABAP Editor. If you don't use the New ABAP Editor, you have to enable it first. Use the menu ABAP Editor -> Utilities -> Settings -> Editor tab. Here let's choose the Front-End Editor (New) option. If you are ready, apply the settings.
  2. After that navigate to this folder: C:\Users\[YOUR USER]\AppData\Roaming\SAP\SAP GUI\ABAP Editor\
  3. Here I recommend you to create a backup of your original settings. The font and color settings are stored in the file: abap_spec.xml. Let's create a copy of it, and save it somewhere else. 
Later if you want to restore your default settings, just replace the actual abap_spec.xml file in the mentioned folder with your backup version.


The Readability of Your Code Does Indeed Matter

When I started working on this course, I decided to customize my editor once and for all. My motivation was to create a color scheme that makes the source code more readable. I believe that it is easier to understand a piece of code, if it's served properly.

On the one hand, the readability of your code depends on your coding style. You can read more about it in my previous post series: 5 Ways to Improve the Readability of Your ABAP Code.

On the other hand, the readability of your code depends on your code editor. Depends on how you set your code editor. Personally, I really like the darker code editor themes. I think, it highlights your source code.

I started using the SyntaxHighlighter by Alex Gorbatchev years ago in my blog. I really like his RDark theme. So, I used this color scheme as a base for my ABAPDark theme.

In this post, I will show you the place where you can customize your ABAP Workbench code editors.


ABAP Workbench: The Big Picture

If you want to get the ABAPDark theme ... If you want to get other useful content in this topic, just sign up!

Sign Up


Access the Fonts and Colors Settings

I wouldn't say this is an easy job. But it does the work.

You can reach the settings of your editor by pushing that icon on the bottom right side.

These settings are only valid on your machine. They're local settings. With these settings, you have impact only to your SAP GUI, only to your code editors.

But it also means, these settings are cross-system settings. So, these are valid for all the SAP systems you use with this SAP GUI.

In the popup window, choose the Fonts and Colors.

With this you arrived to your place. Here you are able to fully-customized your code editors.


What Settings You Have?

First, you can set the desired font family and the font size. This is a global setting, so all of the text in your source code will have this settings, whether it's a keyword or a comment. All the text have the same font family and font size.

Then you can highlight the different Display Items individually and set the following properties:

  • Item Foreground
  • Item Background
  • Style (Bold, Underline, Italic)

For example, you can set the style of the comments or the breakpoints individually. The sky is the limit. You can do whatever you want. These are the available Display Items:

  • Breakpoint
  • Changed indicator
  • Changed and saved indicator
  • Current line
  • Erroneous line
  • Execution
  • Inactive selected text
  • Line number
  • Maximum line length
  • Selected text
  • Selection margin
  • Text highlights
  • Text highlights error
  • Normal
  • Read-only mode
  • Comments
  • Keywords
  • Numbers
  • Operators
  • Strings
  • Syntactical error
  • Token operator
  • User region

What You Get From The ABAPDark Theme?

Here is a few examples what you can get if you start using my ABAPDark theme in your editor.

The background of the editor in change mode will be simply black.

The text color of your comments will be light grey.

The changed lines will be indicated with small light purple arrows on the left hand side.

The text color of your keywords will be blue.

The text color of your strings will be green.

The text color of your identifiers will be white.

The lines where you set breakpoints will be indicated with purple background.

The background of your editor in display mode will be different. I used a nice blue-grey background color.


Summary

Now it's time to pratice. This the method you can use to change the default color scheme of your editor.

If you don't want to play with these settings ... If you only want to try out my ABAPDark theme, just sign up above using that green button, and I will share my settings with you.

If you liked it, please share it! Thanks!

blog comments powered by Disqus