Show TOC

Formatting ABAP Source CodeLocate this document in the navigation structure

In Eclipse, the name of the pretty printer is Source formatter. You use the ABAP formatter to keep ABAP source code well-looking and organized in order to develop new functionalities easier.

Context

The source code editor supports you when formatting

  • Complete ABAP source code within the editor

    Use the context menu Start of the navigation path Source Code Next navigation step Format End of the navigation path or the Shift + F1 shortcut.

  • Source code blocks

    Use the context menu Start of the navigation path Source Code Next navigation step Format Block End of the navigation path or the Ctrl + Shift + F1 shortcut.

Note For each ABAP project the formatting options of the ABAP Workbench are applied. You can change these formatting options project properties. To open the properties of an ABAP project, focus the respective project in the project explorer and select properties from the context menu. Here, the formatter settings can be found in Start of the navigation path ABAP Development Next navigation step Editors Next navigation step Source Code Editors Next navigation step ABAP Formatter End of the navigation path.

Here the following preferences are available:

  • Indent source code to specify the alignment of the source code
  • Code style to specify the source code formatting of keywords and identifiers