Format ABAP source
format_abapNormalizes ABAP keyword casing and indentation with abaplint's formatter, the offline equivalent of Pretty Printer. Use it to standardize generated or hand-written code before review or commit.
Instructions
Pretty-print one ABAP source: normalize keyword casing and indentation using abaplint's formatter — the offline equivalent of Pretty Printer in ADT/SE80. Use this when generated or hand-written ABAP has inconsistent casing/indentation and you want it normalized before review or commit. It does not reformat CDS views or behavior definitions, does not change any logic, and fails cleanly on source it cannot parse. Example: format_abap({ "source": "report ztest.\nwrite 'hi'." }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | The complete ABAP source to format. | |
| filename | No | abapGit-style name if known, e.g. "zcl_x.clas.abap"; inferred from the source when omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formatted | Yes | The pretty-printed source. |