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 analysisStatic analysisCatching problems in code before it runs: naming, obsolete statements, security findings, and compatibility with a target environment. Style linting, security scanning and cloud-readiness checks are often treated as one concern.SAP and community, narrow by design, which says what is wrong and leaves the source where it is.
Overview
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.
abapPrettyabapPrettyA command-line ABAP pretty printer that formats every supported include under a base object on a server over ADT in one invocation, activates the result and can put it on a transport.independent, abap drives the same formatting from a command line over ADT, across every supported include under a base object, on a transport. ABAP FSABAP remote filesystemA Visual Studio Code extension that opens an ABAP system over ADT as an editable filesystem and exposes system tools to GitHub Copilot and external MCP clients.independent, abap runs SAP's ABAP Cleaner from VS Code, and the abap2UI5 playgroundabap2UI5 PlaygroundABAP in the editor on the left and the abap2UI5 app it builds on the right, both inside one browser tab: the framework is transpiled to JavaScript at build time and the class in the editor is compiled when Run is pressed.community org, abap formats every open file in the browser with abaplint's pretty printer.
Artifacts
Details
Coverage
For your agent
- Ref
capability:abap-code-formatting- JSON
- /capabilities/abap-code-formatting.json
- MCP
- Connecting an agent