Show TOC

Changing The Color of Individual ABAP KeywordsLocate this document in the navigation structure

You can configure the color of an individual ABAP keyword or the sequence of several ABAP keywords, for example, call method, used within a statement. This enables you to highlight their occurrences and to improve readability when you skim through ABAP source code objects, such as ABAP classes, interfaces, programs, and so on.

Procedure

  1. Open the Start of the navigation path ABAP Development Next navigation step Editors Next navigation step Source Code Editors Next navigation step ABAP Keyword Colors End of the navigation path Preferences page.

    The ABAP Keyword Colors preference page is opened. Here you find a list of default configurations that have already been configured by SAP.

  2. To start configuring the highlighting of a new ABAP keyword or sequence, chose the Add button.

    An empty entry is added at the end of the list. Its default color is black.

    The cursor is automatically moved to the corresponding position.

  3. Start typing the name of the ABAP keyword or sequence you want to configure.
    Note

    You can use the content assist functionality (Ctrl + Space) to open a dialog. It lists all the available ABAP keywords. From here you can select the relevant one.

    You can use the '*' wildcard to search for any string.

  4. To configure the color, choose the relevant ABAP keyword or sequence in the list and click the colored button in the Color section on the right.
    Tip

    You can group configurations that are used in the same context by using the same color for them.

    The Color dialog is opened.

  5. Select the color and confirm with OK.

    In the list, your ABAP keyword or sequence is displayed in accordance with your selection.

  6. To make your configuration(s) visible in the source code editor, choose OK.

    Your color configurations become effective as soon as you (re-)open the source code editor.

    Example of an ABAP class where the syntax color of single ABAP keywords is configured
    Figure 1: Example of an ABAP class where the syntax coloring of single ABAP keywords is configured
  7. In addition, you have the following options:
    1. To make SAP's default configurations visible in the source code editor, select the relevant checkbox(es) in the list or choose the Select all button on the right. Then click the Apply button.

      SAP's default color configurations become effective as soon as you (re-)open the source code editor.

    2. To highlight the style of ABAP keywords and sequences, select the relevant checkbox in the list and choose one of the following checkboxes on the right:
      • Bold

      • Italic

      • Strikeout

      • Underline

      In the list, your ABAP keyword or sequence is displayed in accordance with your selection.

    3. To import or export a configuration as an XML file, choose the Import or Export button on the right.

      The Export color settings dialog is opened.

    4. Choose your file location and confirm with Open or Save.

      The configuration file is imported and its content is now displayed or the relevant file is exported accordingly.

    5. To take over the configuration of another ABAP keyword or sequence, select the relevant entry in the list and choose Pick settings from from the context menu.

      A dialog with the already configured ABAP keywords or sequences is opened.

    6. From here, choose the relevant entry.

      In the list, your ABAP keyword or sequence is displayed in accordance with your selection.

    7. To restore the default color settings, click the Restore Defaults button.
      Note

      If you perform the restore action, all of your configurations will be deleted.