Compare two ABAP versions
compare_abapCompare before and after versions of ABAP code to identify lint findings resolved or introduced, structural changes, and cloud readiness score movement. Get an objective verdict on refactors or AI rewrites.
Instructions
Compare a BEFORE and an AFTER version of ABAP source and report what a rework actually changed: lint findings resolved and introduced (matched by content, so moved-but-unchanged code is not noise), cloud-blocker / score / A–D grade movement from the same dual-parse diff as check_cloud_readiness, and structural changes — classes, methods and FORMs added or removed. Use this when reviewing a refactor, a modernization step or an AI-generated rewrite of an existing object and you need an objective better-or-worse verdict instead of eyeballing a diff. It is not a textual diff tool (use git diff to see the edits) and it cannot judge functional equivalence — behavior can change while every number improves; it does not connect to any SAP system. Example: compare_abap({ "before": [ { "source": "REPORT zr.\nWRITE 1." } ], "after": [ { "source": "REPORT zr.\nWRITE 2." } ] }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | The AFTER sources — the reworked version being judged. Up to 32 files, 100k chars each. | |
| focus | No | Curated rule-pack lens: report only rules carrying this abaplint tag — "Performance" for a tuning pass, "Security" for a security sweep, "Styleguide" for Clean ABAP adherence. Parser errors always surface. Ignored with preset "syntax-only". Combine with rules to re-tune individual rules in the pack. | |
| rules | No | abaplint rule overrides applied to both sides, e.g. { "line_length": { "length": 120 } }. | |
| before | Yes | The BEFORE sources — the current/old version of the object(s). Up to 32 files, 100k chars each. | |
| preset | No | Lint preset applied identically to both sides: "style" (default) for isolated snippets, "full" when every referenced object is provided, "syntax-only" for parser errors only. | style |
| abapVersion | No | ABAP language version both sides are linted against. "v758" (default) is current on-prem; "Cloud" is ABAP Cloud. | v758 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | Lint and readiness numbers for the AFTER side. | |
| before | Yes | Lint and readiness numbers for the BEFORE side. | |
| resolved | Yes | Findings present before but gone after — improvements. | |
| matchNote | Yes | How findings were matched and what the numbers do and do not mean. | |
| introduced | Yes | Findings present only after — regressions to fix. | |
| outlineChanges | Yes | ||
| unchangedCount | Yes | Findings present on both sides (content-matched). |