Code formatting

Making source match one layout — indentation, keyword case, the shape of a statement block — by rewriting it rather than by reporting on it. Distinct from static analysis, which says what is wrong and leaves the source where it is.

Overview

SAP SHIPS

SAP ships the formatter inside the editor. In ABAP Development Tools it is the source formatter, reached from Source Code > Format for a whole source or Source Code > Format Block for a selection, and each ABAP project takes the formatting options of the ABAP Workbench, which a developer changes under ABAP Development > Editors > Source Code Editors > ABAP Formatter. In the ABAP Editor the same tool is the Pretty Printer: it indents statement blocks and converts keyword case, and what it produces is what the database keeps once the object is saved.

Not covered: At the object the developer has open. Both pages describe formatting one source, or a block inside one, from an editor it is loaded into, so bringing a package written before the settings into line with them is one object and one save at a time.

Neither page says anything about formatting more than one object in one pass, so what SAP intends beyond the editor has not been assessed.

THE COMMUNITY ADDS

abapPretty drives the same formatting from a command line over ADT, across every supported include under a base object, on a transport. ABAP FS runs SAP's ABAP Cleaner from VS Code, and the abap2UI5 playground formats every open file in the browser with abaplint's pretty printer.

Artifacts3

3 of 3 artifacts
ArtifactSignals
CLI tools1
abapPrettyCommand-line ABAP pretty printer over ADT
Signals
Quiet
IDE extensions1
ABAP remote filesystemVS Code extension editing ABAP systems over ADT as a filesystem
Signals
none
Web tools1
abap2UI5 PlaygroundIn-browser ABAP editor beside the abap2UI5 app it builds
Signals
Functional boundary

Details

Coverage
statecore and community, ABAP
assessed
relationshipunassessed
For your agent
Ref
capability:abap-code-formatting
JSON
/capabilities/abap-code-formatting.json
MCP
Connecting an agent