
abap2ui5
Build abap2UI5 apps with an agent: the build-an-app, view-chain-layout, abap-check and ui5-check skills, the /abap2ui5:new-app, check, add-ai, find-sample and explain commands, an abap2ui5-reviewer subagent, a hook that runs the abap2UI5 linter on every edited class (where the project has it installed), plus the abap2UI5 MCP server (sample search, view validation, deploy, headless run and screenshot - no SAP system needed).
- GitHub stars
- 391
Install
/plugin install abap2ui5@abap2ui5Run it inside Claude Code after adding the marketplace with /plugin marketplace add abap2UI5/abap2UI5.
Contents
Discovered from sourceSkills 4
What a green CI does not prove
Scope. This skill is about ABAP that has to survive a real SAP system — it applies to framework code and to app code alike, and most of it applies to any repository shipped through abapGit. The other skill,
build-an-app, is about writing an app with abap2UI5: the app class, the lifecycle, the view builder, binding, events. They compose — build withbuild-an-app, check with this one before you finish. The commands quoted below are this repository's; the rules behind them are not.
npm run verify proves the code parses, lints and runs under the transpiler.
Everything in this file is a way for that to be true while a real SAP system
still refuses the change — because the files come back different, because the
object does not even import, because the class pool does not activate, because
the extended check fires, or because the runtime behaves differently there than
under the transpiler.
This is a growing catalogue. Every entry is a defect that actually reached
main and was found by hand afterwards — several of them by a user, after a
pull. When you hit a new one, add it (see the last section) — the point is that
nobody has to discover it twice.
Every numbered section below carries a Gate: line, the same idea as the
Linter: lines in ui5-check — but the answer here is rarely "a linter rule".
Most of this is decided by a script in this repository, which means a
consumer running nothing but npx @abap2ui5/linter is not covered by it. The
line says which of the three it is, because that is the difference between a
defect that cannot reach main and one that cannot reach main here:
| linter | an abap2ui5lint rule — travels to every repository that runs it |
| this repo | a script under .github/scripts/ — covers this tree only |
| abaplint | a rule in abaplint.jsonc — covers repositories that enable it |
| open | nothing decides it; the entry is a thing you have to know |
Run first, in this order:
npm run check # abaplint (fast inner loop)
npm run check:abapgit # the abapGit round trip - covers src/00 and src/99 too
npm run check:atc # the extended-check traps a script can decide
npm run check_visibility
npm run verify # before any PR; includes all of the above
The catalogue - one file per section, read the ones your change touches
The long sections of this catalogue are files next to this one. Do not read
them all: take the rows that match what you changed. A reference to
"section 3" anywhere means the file whose name starts with 3-.
| File | Section | Read it when |
|---|---|---|
references/why-the-tooling-is-blind.md | Why the tooling here is blind to most of this | you want to know which gate decides what, or to measure a case against abaplint - tooling work, not app work |
references/1-abapgit-round-trip.md | 1. abapGit round trip — the file must come back byte-identical | every app - you wrote or touched a .clas.abap, a .clas.xml or any other file abapGit imports |
references/2-activation.md | 2. Activation — compiles here, syntax error there | every app - before a class counts as finished: what passes the lint and is a syntax error on a system |
references/3-extended-check.md | 3. Extended check (SLIN/ATC) — runs in real systems, not here | the code will face the extended check (SLIN/ATC) on a system - reads on internal tables, pragmas, unused declarations |
references/4-downport-and-transpile.md | 4. Downport and transpile — one source, three targets plus a JS runtime | the code has to run on 7.02 or in the transpiled runtime - the framework, the sample repositories, a unit test run without a system |
references/5-runtime.md | 5. Runtime — green here, wrong there | something is green in the transpiled run and wrong on a system, or the other way round |
references/7-rule-stock.md | 7. The rule stock — read for it by hand until abaplint decides it | reviewing a change by hand for what abaplint does not decide yet |
6. Blind spots — green, or red, for the wrong reason
Gate: none, and that is the definition. An entry lands in this section because a check passed while the code was wrong, or failed while it was right. A gate cannot cover it — if one could, the entry would have moved to a numbered section above.
- Never skip a test with
IF sy-sysid =+ backtick-ABC.ABCis the system ID of the Node runtime, so the guard makes the method a silent no-op innpm run unitwhile it still runs in a real system — CI stays green over assertions nobody executes. A test that genuinely cannot run under the transpiler belongs in theskiplist ofnode/setup/abap_transpile.jsonwith a note naming the missing runtime capability; the runner then prints it as skipped instead of pretending it passed. (The remainingsy-sysidguards are all in the frozensrc/99— they are history, not precedent.) - Generated code is not editable — fix the generator.
src/01/03/comes fromnpm run app2abapand a manual fix there is reverted by the next generation, withcheck:app2abapfailing the PR. The same trap outside this repository, without a gate to catch it: inabap2UI5/samples-controls#38an over-length statement was first split by hand in a file produced byscripts/generate-overview.mjs, and the split had to be moved into the generator in a follow-up commit. Before editing anysrc/file, check whether something writes it. - A red linter is not always a real finding. abaplint cannot parse RAP's
CLASS … DEFINITION PUBLIC FOR EVENTS OF <entity>orMETHODS … FOR ENTITY EVENT, so the class pool does not parse and every finding on the file — the structure error, the parser errors, thecheck_syntaxfollow-ups — is a consequence of that, not of the ABAP. It also cannot resolve superclasses that are not in the API dependency:cl_apc_wsp_ext_stateless_baseis on-premise only and absent fromsteampunk-2305-api, which made the WebSocket handler and its callers report unknown references.abap2UI5/samples-stack468af3dsorted 25 findings into ten real ones and fifteen artefacts. Never rewrite valid ABAP to satisfy a linter that cannot see it. Suppress narrowly instead — per rule and per file, with the reason written next to the entry, andglobal.noIssuesonly when the error comes from the parser itself and no rule-levelexcludecan reach it. Scope it to the.abapfiles so the.clas.xmlkeeps itsobject_namingandxml_consistencycoverage.
When a pull does show diffs
Take the system's side. Commit the files exactly as abapGit serialized them,
then run npm run check:abapgit on the result — whatever it now flags is the
rule that was broken, and the fix belongs in this repository rather than in the
system.
When an import fails rather than diffs, read the message twice: the object named in it is often not the broken one. A missing BDEF reports as a DDLS problem and as a where-used-list error on unrelated classes; an over-length line reports as a literal problem and leaves an empty class behind.
Adding a new case
Keep the catalogue worth reading: one entry, one defect that actually happened.
- Put it in the right section — 1 round trip and import, 2 activation, 3 extended check, 4 downport/transpile, 5 runtime, 6 blind spots. A new kind of failure gets a new section. Section 7 is the rule stock, not cases: a case that bites us moves out of it into 1–6.
- Name the evidence — the commit, PR, issue or file where it bit us. An entry without a case is a rule somebody will delete as speculation. Say when it was a user who found it; those are the expensive ones.
- Say why the tooling missed it. If the answer is "it did not, we just ignored it", the entry belongs in a lint config, not here.
- Gate it if a script can decide it. Byte format, metadata and source text
go in
.github/scripts/abapgit-format-gate.mjs; statement-level checks that only a real system runs go in.github/scripts/extended-check-gate.mjs. Keep the prose entry as the reasoning. Test the rule both ways — inject the defect, see it fire, confirm the tree is clean again. - If a script cannot decide it, say so in the entry rather than leaving the reader wondering why it is not gated.
Building an abap2UI5 app
Read ${CLAUDE_PLUGIN_ROOT}/docs/agents/building-apps.md (the framework's
guide, shipped with this plugin: docs/agents/building-apps.md two folders
above this skill's own) — it is the complete
self-contained guide (template, lifecycle, builder verbs, binding rules,
events, popups, navigation, portability rules, validation tooling). This
skill is the trigger and the checklist; the guide is the content.
Before writing one from scratch, ask whether it exists. abap2UI5/samples
holds 150 working apps, each linted, rendered and downported to three
releases — a value help, a tree, navigation between two apps, a dynamic table
typed at runtime. Reading one beats reproducing it, and beats any snippet: the
sample is gated, a snippet is a copy somebody has to keep in step.
- With the MCP server: the
examplestool queries that catalogue (examples { query: "value help f4" }) and hands back the class to read. Its neighbourcapabilitiesanswers the other question — whether a UI5 control can be expressed at all — out of samples-controls' 622 ports. - Without it: SAMPLES.md is the same catalogue as a page.
The rules that go wrong most often. Each is one line here and a section of the guide — read the section before you rely on the line.
- One class implements
z2ui5_if_app;main( client )runs once per roundtrip and is ONEIF/ELSEIFchain, so exactly one arm runs:IF client->check_on_init( ).seeds and displays,ELSEIF client->check_on_navigated( ).displays,ELSEIF client->check_on_event( ).dispatches. The navigated arm is not optional — it is the roundtrip a called app or a value help hands control back on. An app with nothing to seed drops the init arm. Never separateIFblocks, never one nested in another (guide §2; the linter'smissing-view-display-on-navigated,redundant-init-display,separate-lifecycle-ifs). - Ask the lifecycle with the call itself:
IF client->check_on_init( )., neverIS INITIAL/IS NOT INITIAL. A negative branch, and every otherabap_bool, is compared:= abap_false. - PUBLIC attributes are serialized, browser-visible state. Bound data only; everything else PROTECTED.
- Build views with
z2ui5_cl_ui5_view_builder(ele/tag/a/end/stringify). The legacyz2ui5_cl_xml_viewis frozen — never in new code. a( )has three value parameters:vfor constants, bindings and events;bfor a boolean from an ABAP variable (abap_trueinvserializes asX);tfor text that carries data, which the builder escapes so a{in it is not read as a binding (guide §3).- The chain's layout is strict and machine-checked — the
view-chain-layoutskill is the single source of the rules, thefactory( )shape that goes with each chain shape included (the linter'schain-house-layoutrule:npm run check:abap2ui5reports,npm run fmt:chainsapplies). Write the chain, run the formatter, read the diff. - Bind with
client->_bind( var ), display-only included;_bind_editis obsolete. Row-template fields bind as`{UPPERCASE}`. Never write a model path as a text literal. A value the view shows is bound, not baked into the view — changed bound data is pushed automatically, andview_model_update( )does nothing (guide §4). - Events:
client->_event(NAME), dispatched withCASE client->get_event( ).. Client-resolved arguments are$-prefixed; an argument that carries data goes on a wire withs_ctrl-check_arg_literal = abap_true; a per-keystroke wire (liveChange,liveSearch,sliderChange) setss_ctrl-check_queue_last(guide §5). - Popups:
popup_display( val = … ), butpopover_display( xml = … by_id = … ). A button that only closes isfollow_up_action( val = cs_event-popup_close ), not a backend event (guide §6). - Thin frontend: business logic is computed in ABAP and bound, never put
into a formatter. UI5 1.71 is the floor — check "available since"
(the
ui5-checkskill). - The app checks its own authorizations at the top of
main. - Validate with the abap2UI5-linter
(
npx --yes @abap2ui5/linter <file>); iterate without a SAP system via the mcp-server (deploy_app→build_backend→run_app, theninteract_appto drive the event branch andrun_unit_testsfor the class's own test double — guide §9 has the tooling and the double). - Before you finish, go through sections 1 and 2 of the
abap-checkskill — the abapGit round trip and activation. They catch what a green lint does not; its other sections are for the cases their headings name. - The API contract is
src/02/z2ui5_if_client.intf.abapin abap2UI5/abap2UI5 — when unsure about a method or acs_eventaction, read it there; thefollow_up_actionabapdoc documents the full frontend-action catalog. For a signature alone, the generated index is enough:${CLAUDE_PLUGIN_ROOT}/docs/agents/client-api.md(shipped with this plugin, next to the guide), every signature in one short file, the obsolete ones apart.
What a green CI does not prove about the UI5 side
Scope. This skill is about the view — the XML a backend builds, the fragments and modules the frontend ships — and about surviving the oldest UI5 release abap2UI5 supports. It is the sibling of
abap-check, which is the same idea for ABAP that has to survive a real SAP system.build-an-appis the third: how to write an app. Build withbuild-an-app, check the ABAP withabap-check, check the view with this one.This file is a staging area. The intent is that its entries move into the abap2UI5 linter over time — so every entry below carries a Linter: line saying whether a rule already decides it, what data a rule would need, and what it cannot decide. An entry that can never become a rule says so; that is the honest half of the catalogue.
Everything here is a defect that actually shipped, on main, past a fully
green CI. The failure mode that binds them together: UI5 does not complain.
An unknown icon name, a property the release does not have, a control laid out
by the wrong box model — none of these is an error. Nothing appears in the
browser console, nothing in npm run verify, nothing in ui5lint. The app just
renders slightly wrong, on somebody else's system, and somebody tells you
months later.
The catalogue - one file per section, read the ones your change touches
The long sections of this catalogue are files next to this one. Do not read
them all: take the rows that match what you changed. A reference to
"section 3" anywhere means the file whose name starts with 3-.
| File | Section | Read it when |
|---|---|---|
references/1-names-the-release-does-not-have.md | 1. Names the target release does not have | every view - an icon, control, property, aggregation, enum value, module or theme you have not seen in UI5 1.71 |
references/2-layout.md | 2. Layout that only works from a newer release on | a Bar, a toolbar or a flex layout that has to look right on an old release |
references/4-runtime-and-environment.md | 4. Runtime and environment | the frontend's runtime behaviour - CSP, bootstrap, the launchpad, custom controls and modules |
The floor
OpenUI5 1.71. Everything abap2UI5 ships must render there. That is not a theme setting or a nice-to-have: it is the release a large part of the installed base is pinned to, and the one the bug reports come from.
How to check a fact against 1.71 without a system
This is the single most useful technique in this file, and it needs no SAP system, no CDN and no network beyond npm. The OpenUI5 sources are on npm, per library, per version:
npm pack @openui5/sap.ui.core@1.71.80 # newest 1.71 patch
npm pack @openui5/sap.m@1.71.80
tar xzf openui5-sap.m-1.71.80.tgz package/src/sap/m/themes/base/Bar.less
What you get, and what each answers:
| File | Answers |
|---|---|
sap/ui/core/IconPool.js (1.71) / sap/ui/core/_IconRegistry.js (newer) | does this icon name exist? — the name→codepoint map is inline in the source |
themes/base/<Control>.less | how is it laid out? Diff the same file across two versions and the layout change is right there |
<Control>Renderer.js | does it render a <div> or a <span> — block or inline? |
<Control>.js metadata block | @since of the control, its properties and aggregations; forwarding: tells you where an aggregation actually lands |
Diffing two versions of one .less or one renderer is how both entries in
section 2 were found. When something works for you and not for a user on
1.71, pull both versions and diff the file — do not guess.
For the pure metadata questions (@since of a control, property or enum value)
there is a shortcut: @abap2ui5/linter ships data/properties.json — 970
controls with per-member @since, generated from the OpenUI5 sources — and,
since the icon rules moved there, data/icons.json: every icon name with the
minor release it reached the font in, scanned across all 79 minors from 1.71
up. So the name questions are answered without unpacking anything. Layout
is what is left: no snapshot can tell you that .sapMBarLeft stopped being
position: absolute, and diffing the two .less files is still the only way
to see it.
Why the existing tooling is blind to most of this
Five separate holes, worth knowing precisely:
- abaplint parses ABAP. A view built by string concatenation or by a builder chain is, to abaplint, a set of valid string literals. There is no UI5 in its model at all.
- ui5lint only reads
app/webapp/, andmanifest.jsonis excluded — which is whereminUI5Version: 1.71lives. It never sees a view the backend builds, which is where nearly every abap2UI5 view comes from. - The abap2UI5 linter only reads what it recognizes. It now has an icon gate
and one layout rule as well as the 1.71 property gate (sections 1.1 and 2.1
moved into it), but it recognizes only app classes that call
z2ui5_cl_ui5_view_builder=>factory— plus raw*.view.xml/*.fragment.xml. The samples repository builds withz2ui5_cl_xml_view, sonpx abap2ui5lintthere reports "no checkable files" and its CI job is green without checking anything. This is the hole that does not close by adding rules: a gate that scanned nothing looks exactly like a gate that found nothing. Check what it actually scanned before trusting it. - The browser says nothing. This is the important one. UI5 logs an unknown module loudly and an unknown icon name, property or enum value not at all — the first 404s, the others are silently dropped.
- The 1.71 e2e gate only covers what its specs render. The
ui5-1.71Playwright project boots the shell and the roundtrip specs against pinned 1.71, which catches a hard breakage on that path. Popups, fragments, custom controls and every backend-built view are outside it.
3. Views that fail to load, not to render
These are the loud ones — and they kill the whole view rather than one control.
3.1 A generic aggregation tag that is not an aggregation
<ns:name> — from heading( ns ), a literal <footer>, _generic( name = … ns = … ) — must name an aggregation the parent actually has. Otherwise UI5
resolves it as a control class and 404s with failed to load sap/<lib>/<name>.js, killing the view.
Real 1.71 crashes fixed this way:
<footer>on asap.m.Dialog— the publicfooteraggregation is ~1.110, so on 1.71sap/m/footer.jsis requested and does not exist. Usebuttons(1.21.1); UI5 lays the buttons out in an overflow toolbar. SeeDeveloperTools.fragment.xml, where the comment sits at the code site.- (samples)
heading( 'uxap' )on asap.uxap.ObjectPageSection, which has noheadingaggregation at all. It is valid on a parent that has one (sap.f.DynamicPageTitle), andsap.m.Page.footeris fine.
This is section 1.2 with a worse blast radius: a post-1.71 property is dropped silently, a post-1.71 aggregation takes the view down.
Linter: moved — aggregation-too-new (2026-08), an error. The
aggregation names per control were already in properties.json and the floor
was already configured, so what this entry actually bought was the severity:
the linter had been reporting the <footer> case as member-too-new, a
warning, alongside a post-floor property — which is precisely the conflation
the paragraph above warns about. It is now its own rule, so the two blast
radii are no longer spelled the same. (A tag naming an aggregation that exists
in no release was, and stays, unknown-aggregation.) First run over the
416-port corpus: 24 findings, every one of them already carrying a POST_171
deviation — so the split cost the corpus nothing and would have failed 24 ports
had the deviation mechanism not been taught the new type first.
5. Reading a bug report about a missing icon
The two failure modes look identical from the outside — "the icon is not there" — and have nothing to do with each other. Tell them apart first:
- One icon missing, others fine → a name (section 1.1). Check it against the 1.71 list.
- A run of icons missing, always from the same position on → layout (section 2.1). Look for a block-level control just before the first missing one.
The report that produced this file was both at once, in the same screenshot. Do not stop at the first cause.
Adding a new case
Same discipline as abap-check: one entry, one defect that actually happened.
- Say what UI5 does, not what it should do. "Renders no icon and logs nothing" is the entry; "the icon is wrong" is not.
- Name the release boundary and how you established it.
@sincefrom the control metadata, or the two npm packages you diffed. An entry that says "newer UI5" without a version is not actionable and will be wrong. - Name the evidence — the PR, commit or issue. Say when a user found it; those are the expensive ones.
- Say why the existing tooling missed it, against the five holes above. If the answer is "it did not, we ignored it", it belongs in a lint config, not here.
- Write the
Linter:line. This is the point of the file. Three honest answers: already decided (say by what), ready to move (say what data and what detection a rule needs), or cannot be decided (say why). An entry without this line is a note, not a candidate. - When an entry does move into the linter, keep it here and change its
Linter:line to point at the rule. The reasoning is why the rule is allowed to exist; deleting it invites somebody to relax the rule later.
The layout of a view-builder chain
A chain is read far more often than it is written, and its layout is the only thing that makes it legible as the XML tree it stands for. Treat the indent as load-bearing, not as taste: it is the one place a reader can see where in the tree a line sits, so it has to be true.
These rules are identical in all three repositories — abap2UI5,
abap2UI5/samples, abap2UI5/samples-controls. They were unified in one pass
after a survey found the two sample corpora following opposite conventions for
the same builder.
The seven rules
-
One call per line. Every
ele( ),tag( ),a( )andend( )opens its own line with)->. A control never shares its line with its own attributes, nor with the container it opens. -
Four spaces per level, everywhere. A child sits one level in from its container, a control's attributes one level in from the control. The same step in every file.
-
The closing paren rides with the arrow. Never a
)alone at a line end — carry it to the start of the next segment so it always reads)->. The whole view ends in a single)., not) ).. -
end( )stands alone in the column of theele( )it closes. That is what makes an ascent over several levels visible instead of hidden. -
One attribute per line,
v =/b =column aligned across a control's attribute block. -
stringify( )is a standalone final statement —client->view_display( view->stringify( ) )., never nested in the chain. -
A wrapped
t_arglist hangs under its FIRST element. When a_event( )/follow_up_action( )argument table runs over several lines, every continuation line starts in the column of the first( … )— not under the#ofVALUE #(, which is three columns to its left and the drift this rule exists to stop:)->a( n = `close` v = client->follow_up_action( val = client->cs_event-control_by_id t_arg = VALUE #( ( `notificationList` ) ( `removeItem` ) ( `$event.getSource().getId()` ) ) )
METHOD view_display.
DATA(view) = z2ui5_cl_ui5_view_builder=>factory(
)->ele( n = `View` ns = `mvc`
)->a( n = `xmlns` v = `sap.m`
)->a( n = `xmlns:mvc` v = `sap.ui.core.mvc`
)->ele( `Page`
)->a( n = `title` v = `My App`
)->ele( `List`
)->a( n = `items` v = client->_bind( t_items )
)->ele( `items`
)->tag( `StandardListItem`
)->a( n = `title` v = `{PRODUCT}`
)->a( n = `info` v = `{QUANTITY}`
)->end(
)->end(
)->tag( `Button`
)->a( n = `text` v = `Save`
)->a( n = `press` v = client->_event( `SAVE` ) ).
client->view_display( view->stringify( ) ).
ENDMETHOD.
The two chain shapes, and the factory( ) that goes with each
Both are correct. The choice is about the view, not about style — but the
factory( ) shape is not free, because the variable has to denote the node
you attach to next.
-
A statement per subtree — hold a container in a variable (
DATA(page),DATA(cont)) and start a new statement from it. The shape of the framework's own apps and of most ofsamples; the better one when a subtree is filled from a loop, when the same node is filled twice, or when a teaching sample reads better with its parts named. The chain must hang off thefactory( )— one statement, not two — so the variable holds themvc:Viewand a laterview->ele( \Shell` … )` lands inside it. -
One chain for the whole view, ascending with
end( ). The shape ofsamples-controls, where a 1:1 port mirrors one original XML file. Here thefactory( ).may be a statement of its own, because nothing attaches to the variable afterwards —stringify( )renders from the root either way — and it buys back two levels of indent across the whole view.
The one combination that is broken: a standalone factory( ). with the
split shape. The variable then holds the root, and view->ele( \Shell` )adds a second root beside themvc:View` instead of a child inside it.
Splitting does not break reconstruction — the abap2UI5-linter reads all 172
documents of samples out of the split shape and renders every one. What is
not allowed is mixing the two inside one subtree.
Blank lines
Only in the single-chain shape, where they carry the structure of a long chain.
samples splits into short statements and has none inside a chain at all.
A blank line opens a block, and there are exactly two blocks:
- the content of a control that carries attributes — a blank after its
last
a( ), before its first child; - a run of
tags — a blank before the first one, none between them.
Everything else runs without a blank: none between a control and its own
a( )s, none between consecutive tags, none after a bare ele( ) whose
first child is another ele( ), blank before every end( ), none after an
end( ) or between two of them.
What checks this, and what does not
The rule is the abap2UI5-linter's chain-house-layout. It checks rules 1-4
and carries fixes, so --fix reformats a drifted chain. The rewrite only ever
touches whitespace between chain segments and the indent of a continuation
line that is not itself content — by construction, not by a check: the
fixes run to a fixed point and nothing re-parses the result against the
source, so read the diff of a --fix run before committing it. Rules 5-7 and
the blank lines stay reviewer-enforced.
It is the linter's one opt-in rule (OPT_IN in its findings.mjs): it is
not emitted at all until a config asks for it, because it encodes one house
style — this one — and because its fixes span a whole chain, which would defer
any other rule's fix inside the same chain to a second --fix pass.
All four repositories run the rule itself. scripts/chain-format.mjs, which
used to be the same algorithm written a second time, is gone:
| how | |
|---|---|
abap2UI5 | npm run check:abap2ui5 / npm run fmt:chains — enabled in abap2ui5lint.jsonc |
abap2UI5/samples | npm run check:abap2ui5 / npm run fmt:chains — enabled in abap2ui5lint.jsonc |
abap2UI5/samples-stack | npm run check:abap2ui5 / npm run fmt:chains — enabled in abap2ui5lint.jsonc |
abap2UI5/samples-controls | npm run check:chains / npm run fmt:chains — abap2ui5lint-chains.jsonc; also the first step of npm run gates |
samples-controls needs a config of its own because its corpus gate
(view-gates.mjs) only sees files that have a meta sidecar, while the layout
is a property of the source and has to cover the whole tree — including the
fourteen hand-written src/03 classes and the generated overview app. That
config switches the property-gate rules off, because view-gates judges those
against the sidecars and a second opinion here would only be a worse one.
Two things that config must NOT do, both measured rather than assumed:
properties: false looks like the obvious way to isolate the layout and takes
the chain rules down with it — the check then passes everything, silently. And
chain-house-layout is opt-in, so a rules entry is what turns it on; without
one the run is green no matter how mangled the chain.
Nothing else covers this, which is why the rule exists:
- abaplint — its formatting rules do not reach into a method-call chain,
and
align_parameters/line_break_multiple_parametersare excluded for the shipped apps inauto_abaplint_fix.jsoncso the auto-formatter does not undo the layout. chain-element-per-line— covers rule 1 only for elements: it deliberately lets an attribute share its control's line, which the house layout does not. Ships ashint; raised towarninginsamples.chain-indentation— judges that a chain keeps its own rhythm (a sibling in a different column than its siblings, a call written left of the element it belongs to). It does not judge the step, so a chain uniformly indented by 8 passes it while saying the wrong thing about depth. 77 ports insamples-controlshad drifted exactly that way, and every gate stayed green. That gap is whatchain-house-layoutwas written for.
When a chain has drifted
Run npm run fmt:chains. Do not re-indent by hand — the fix is verified
whitespace-only, a hand fix is not. If a file is reported but never rewritten,
it has something the scanner mis-reads (an unusual string template); fix that
one by hand and say so.
The shape that destroys a chain, and what one call per line prevents:
" WRONG - up two levels, down two, all inside one attribute line.
" Four level changes nobody can follow, and every line after them starts
" in a column that means nothing.
)->a( n = `text` v = `id ` )->end( )->end( )->ele( `items` )->ele( `ColumnListItem`
When you need a node again, hold it in a variable and start a new statement
from it, or ascend with one end( ) per line at the column of the ele( ) it
closes.
Commands 5
Add an AI feature to an abap2UI5 app: $ARGUMENTS
If no app class is named, look for the z2ui5_if_app classes in the project
(**/*.clas.abap containing INTERFACES z2ui5_if_app) and ask which one;
nothing found, offer /abap2ui5:new-app and stop. Read the whole class
first, and load the abap2ui5:build-an-app and abap2ui5:view-chain-layout
skills.
The pattern is the one of four merged samples - follow them, do not invent a second one:
| Local provider, runs anywhere | The same against a real model | |
|---|---|---|
| Chat | Z2UI5_CL_SMP_APP_540 (abap2UI5/samples) - FeedInput, a feed of FeedListItems, suggested prompts, a rule-based get_answer( t_history ) | Z2UI5_CL_SMPS_APP_014 (abap2UI5/samples-stack, src/10) |
| Summarize / explain data | Z2UI5_CL_SMP_APP_541 - an Explain This Data button over a table, the findings in a layout:DynamicSideContent panel, a deterministic get_summary( t_rows ) | Z2UI5_CL_SMPS_APP_015 - Summarize with AI, the rows sent as fenced, capped context, the answer in a Panel |
Read the two of the chosen row before writing (MCP read_example { class };
without MCP https://raw.githubusercontent.com/abap2UI5/samples/main/src/z2ui5_cl_smp_app_540.clas.abap
and https://raw.githubusercontent.com/abap2UI5/samples-stack/main/src/10/z2ui5_cl_smps_app_014.clas.abap,
likewise _541 and _015). src/10/README.md in samples-stack is the
setup guide for the real model.
1. Chat or summarize
Take it from the arguments; when they do not say, decide from the app and say in one line why - ask only when both fit:
- chat - the user asks free questions, the conversation matters (help desk, "ask about this order"). State: the conversation.
- summarize - the app already shows data (a table, an object) and the user wants it explained, condensed or checked for outliers. State: the rows on screen, or the selected ones.
2. The provider seam and a local stub first
The app must run on every system and in CI before any model is involved, so the first version answers locally:
- The seam. One interface with the shape of samples-stack's
z2ui5_if_smps_llm:ty_s_message(role,content),ty_t_message, andMETHODS chat IMPORTING system TYPE string OPTIONAL messages TYPE ty_t_message RETURNING VALUE(result) TYPE string- in the project's own namespace (zif_<app>_llm) so nothing depends on a package that is not installed yet. The same shape is what keeps step 5 a change in one place. When the installed abap2UI5 already ships the framework seamz2ui5_if_ui5_llm(providers fromz2ui5_cl_ui5_llm:create_local,create_claude,create_openai), use it instead of an own interface - section 11 of the app guide. - The local stub (
zcl_<app>_llm_local, implementing it): deterministic and honest about it - keyword rules over the last user message likeget_answer( )in 540, or totals, extremes and outliers over the rows likeget_summary( )in 541. For summarize it receives what a model would - the fenced rows of step 4 - and SPLITs them at the line breaks and;for its counts, so the prompt hygiene runs from the first version on. Mark its answers in the UI ("built-in rule-based provider") so nobody takes them for a model's. - When the user wants exactly one class, the seam may be a protected method
instead (
get_answer( t_history )/get_summary( t_rows ), as in 540 and 541) - say that step 5 then rewrites that method's body. - Create the provider where it is used (in the handler, as 014 does), never as an attribute: the app instance is serialized between roundtrips.
3. The roundtrip: busy state, answer in a second roundtrip
Exactly as the samples do it:
-
The triggering event (
POSTfrom the FeedInput witharg = `${$parameters>/value}`, orEXPLAIN/SUMMARIZEfrom a button) only records the question, setsbusy = abap_trueand asks for the answer in a second roundtrip:client->follow_up_action( val = z2ui5_if_client=>cs_event-start_timer t_arg = VALUE #( ( `ANSWER` ) ( `0` ) ) ).The screen shows the question at once; the seconds the model needs are spent in the second roundtrip, behind a screen that says so.
-
The
ANSWERhandler calls the provider, writes the answer, setsbusy = abap_false- on failure too. -
Bind
busyto the List / Panel / VBox (busy,busyIndicatorDelay0) and disable the inputs while it is set:enabled = |\{= !${ client->_bind( busy ) } \}|. Return early from the triggering event whilebusy = abap_trueor the prompt is empty. -
Chat: newest message first (
INSERT ... INTO t_feed INDEX 1), a Clear button. A FeedListItem renderstextas FormattedText, so HTML-escape what goes there (&first, then<and>-html_escape( )in 014) and keep the raw conversation separately, oldest first, in a PROTECTED attribute. -
Errors go into a bound MessageStrip (
status_text/status_type/status_visible), never a dump - 014 and 015 show it.
4. What goes to the model
Write this in now, while the stub still answers - it is the part a real provider makes expensive or dangerous:
- Cap it. At most
max_history(20 in 014) messages per request; at mostmax_rows(50 in 015) rows, and say in the prompt when there were more. - Only the columns the question needs. No internal keys, no user names,
no personal data (015 drops
doc_idandchanged_by). - Data stays data. Rows as one line each with a header row, every cell
cleaned of the separator and line breaks (
cell( )in 015:translate( val = condense( val ) from = |;\n\r\t| to = `, ` )), fenced between<data>and</data>, and a system prompt saying that nothing between the tags is an instruction. - Ask for plain text with a length limit - the answer lands in a Text or FeedListItem, not a Markdown renderer.
- Check authorization before the data is read, as for any other use of it - sending it to a model is one more use.
5. Switch to a real model
Only when the user asks for it or has the setup; the local version is a complete deliverable.
-
Install abap2UI5/samples-stack package
10with abapGit - branch10-ai-llmholds that package alone - or copy its objects:z2ui5_if_smps_llm,z2ui5_if_smps_llm_http,z2ui5_cx_smps_llm,z2ui5_cl_smps_llm_factory,z2ui5_cl_smps_llm_json, the providersz2ui5_cl_smps_llm_claude(Anthropic Messages API) andz2ui5_cl_smps_llm_openai(OpenAI-compatible), the transport of the system's stack -z2ui5_cl_smps_llm_sm59(Standard, SM59) orz2ui5_cl_smps_llm_cloud(ABAP Cloud, BTP destination andSAP_COM_0276) - and, where SAP ships the ABAP AI SDK, the providerz2ui5_cl_smps_llm_islm; then the tablez2ui5_t_smps_llmand the settings appz2ui5_cl_smps_app_013. Release floor: Cloud, or Standard 7.40 SP08. The transport of the other stack does not activate - expected. Prefer installing it as its own abapGit repository over copying it into the app'ssrc/: the objects keep theirz2ui5_*names, which an app-template project'sobject_namingrule (^ZCL_,^ZIF_) refuses. -
Configure with
?app_start=z2ui5_cl_smps_app_013: provider, destination, model id, max tokens, and Test Connection. The model id is the user's decision and has no default - never write one into the code. -
Change the code at the seam only:
TRY. DATA(config) = z2ui5_cl_smps_llm_factory=>config_read( ). DATA(llm) = z2ui5_cl_smps_llm_factory=>create( config ). answer = llm->chat( system = system_prompt messages = t_send ). CATCH z2ui5_cx_smps_llm INTO DATA(error). status_text = error->get_text( ). status_type = `Error`. status_visible = abap_true. ENDTRY.With the interface of step 2 the app's types become
z2ui5_if_smps_llm=>ty_t_messageandzif_<app>_llmcan go (or the local stub implementsz2ui5_if_smps_llmand stays as the fallback for systems without a destination). On every display, as 015 does,z2ui5_cl_smps_llm_factory=>config_check( config )decides aconfiguredflag: not configured shows a MessageStrip with what is missing, keeps the button disabled and sends nothing. Use the factory rather than naming a provider or transport class: they are created by name because each activates on one stack only. -
Secrets stay out of the code. No endpoint, key or model in a class, constant, PUBLIC attribute or commit. The endpoint is the destination; the key goes into a gateway in front of the provider (preferred) or the configuration row, which 013 treats as write-only. Tell the user to restrict access to
z2ui5_t_smps_llmand to who may startz2ui5_cl_smps_app_013. Drop any artificial timer delay to0.
6. Validate and look
- The linter on the changed classes: MCP
validate_view { abap_source, project_dir }(fix_viewfor the mechanical fixes), elsenpx --yes @abap2ui5/linter <files>(npm run check:abap2ui5in an app-template project). With this plugin's hook and the linter installed, every edit of a class is checked already - fix what it reports. - Look at it:
screenshot_view { abap_source, model, sizes: ["1280x900", "390x844"] }, withmodelholding a short conversation or a few findings so the feed or panel does not photograph empty; once more with the busy flag set inmodelto see the busy state. Without MCP:npx --yes -p @abap2ui5/linter -p @abap2ui5/linter-render abap2ui5lint --screenshot <file>with a<class>.mock.jsonnext to the source. Read the PNG and compare it with the request. - Finish with
/abap2ui5:check. A new interface or stub class gets its own.clas.xml/.intf.xmlsidecar in the project's shape (BOM, LF, one final newline - theabap2ui5:abap-checkskill, section 1).
Report: chat or summarize and why, the files written or changed, which sample each part follows, what the local provider answers, what is capped and cleaned before anything leaves the system, the gate result, what the screenshot shows, and the exact steps left for a real model (package, destination, settings) - or that they are done.
Run the abap2UI5 gates on: $ARGUMENTS
1. Scope
- An argument names the files or folder to check.
- Without one: the
.clas.abap/.clas.xmlfiles thatgit status --porcelainandgit diff --name-onlyreport as changed or new. Nothing changed (or no git): the wholesrc/folder. Say which scope you took.
2. Run the gates
Pick the first that applies:
- The project has app-template's scripts (
package.jsonhas acheckscript that runsabaplintandabap2ui5lint):npm run check:abapandnpm run check:abap2ui5, as two commands -npm run checkchains them with&&, so an abaplint finding (a missing BOM is one) hides every linter finding until it is fixed. Both lint the whole project; report the findings in scope first. Withoutnode_modules, runnpm cifirst (ask before installing). - Otherwise, two commands:
- abaplint, when the project has an
abaplint.json/abaplint.jsonc:npx --yes @abaplint/cli <that file>. Without one, skip it and say so - do not invent a config. - the abap2UI5 linter:
npx --yes @abap2ui5/linter <files or folder>(add--no-renderwhen the render gate is not installed and says so). It honours the project'sabap2ui5lint.jsonc.
- abaplint, when the project has an
- No shell, or npm unavailable, but the MCP server is there:
validate_view { abap_source, project_dir }per class. That covers the linter, not abaplint - say so.
3. Explain
For every finding: file:line, the rule id, what it means in one sentence,
and the fix. The linter explains its own rules
(npx --yes -p @abap2ui5/linter abap2ui5lint --explain <rule-id>, or
validate_view { explain: true }). Group by file; errors before warnings
before hints.
Then go over what the gates cannot see, using the
abap2ui5:abap-check and abap2ui5:ui5-check skills (MCP pitfalls
lists both): the .clas.xml byte format (BOM, LF, final newline,
<CLSNAME>, <WITH_UNIT_TESTS>, '), activation traps, icons and
controls that do not exist in UI5 1.71. Report only what you actually find
in the files in scope.
4. Fix what is clearly safe
Safe means mechanical and behaviour-preserving:
- the linter's own fixes -
npm run fix(app-template),npx --yes @abap2ui5/linter <files> --fix, or MCPfix_view(returns the source; write it back yourself); - chain layout per the
abap2ui5:view-chain-layoutskill; - sidecar format (BOM, line endings, final newline,
<CLSNAME>case,<WITH_UNIT_TESTS>matching the test include) - with the Edit tool; a missing BOM is a U+FEFF put in front of<?xml, nosedorprintf; - an obsolete call the linter names a direct replacement for
(
_bind_edit->_bind, a leftoverview_model_update( )deleted).
Do not change on your own: anything that alters behaviour, a control or property swapped for a different one, waivers or baseline entries, the project's lint configuration. List those as open, with the fix you propose.
Re-run the gates after fixing, and finish with: what ran, what was fixed, what is left and why.
Explain this abap2UI5 app class: $ARGUMENTS
Find the file: a path is used as given; a class name is looked up as
**/<name lower-cased>.clas.abap in the project. Not found locally and it
looks like a sample class (Z2UI5_CL_SMP*): MCP
read_example { class }. Nothing given: ask.
Read the whole class first. For the framework side, the guide is
${CLAUDE_PLUGIN_ROOT}/docs/agents/building-apps.md (MCP app_guide), and
api_reference documents every z2ui5_if_client method. Explain what
this class does - never describe a method it does not call.
Write for a developer who knows ABAP but not abap2UI5. Sections:
- What it is - two sentences: what the user sees and can do.
- How abap2UI5 runs it - one short paragraph: one class implementing
z2ui5_if_app,main( client )runs on every roundtrip, the instance is serialized between roundtrips, so PUBLIC attributes are the state the browser sees. - Lifecycle - which branches
mainhas (check_on_init( ),check_on_navigated( ),check_on_event( )), what each does here, and in which order they run on start, after an event, and after returning from a called app or popup. Point out a missingcheck_on_navigated( )display branch if there is one. - State and binding - a table: attribute, type, how it is bound
(
_bind= two-way, row-template fields as{FIELD}inside a bound table), and which control shows it. Name attributes that are PUBLIC but never bound (they travel to the browser for nothing). - Events - a table: event name, which control fires it
(
_event( ... )/follow_up_action( ... )), arguments, and what the handler does. Include frontend-only actions (_event_client). - The view tree - the
z2ui5_cl_ui5_view_builderchain redrawn as an indented tree of controls (namespace prefix, the bindings and events on each), so the nesting is visible at a glance. Popups and popovers get a tree each. With the MCP server,screenshot_view { abap_source }shows what it looks like - mention what the picture shows. - Navigation and popups -
nav_app_call/nav_app_leave, popups and value helps, if any. - Worth knowing - at most five points a newcomer would trip over in
this class (a state pitfall, a binding subtlety, something that needs a
newer UI5 than 1.71). No style review -
/abap2ui5:checkand theabap2ui5-revieweragent do that.
Quote line numbers (file:line) when you refer to code.
Find abap2UI5 samples for: $ARGUMENTS
If that is empty, ask what to look for and stop.
The three catalogues:
| Repository | Holds |
|---|---|
abap2UI5/samples | curated apps, by pattern - value help, navigation, trees, tables, popups |
abap2UI5/samples-controls | the UI5 demo kit rebuilt with abap2UI5, one port per control sample |
abap2UI5/samples-stack | apps that need more than abap2UI5 - OData, RAP, APC/WebSockets, the launchpad |
Search
- MCP server available:
examples { query: "..." }- every word of a query has to match, so one or two words each - then again with synonyms or the UI5 control name;repo: "samples-controls"when the request names a control. If nothing fits a control question,capabilitiessays whether abap2UI5 can express it at all. - Without MCP: fetch https://abap2ui5.github.io/browser-playground/samples/apps.json
(every sample of the three catalogues, with title, summary and keywords).
If that host is unreachable, fetch
catalogue.jsonfromhttps://raw.githubusercontent.com/abap2UI5/<repo>/main/catalogue.jsonfor each of the three repositories (samplesandsamples-stacklist entries undersamples,samples-controlsunderports).
Match on title, summary, keywords and control name; prefer samples for a
pattern, samples-controls for a control (status checked over reviewed
over generated), and samples-stack only for a question about OData, RAP,
APC or the launchpad.
Answer
The best three, each as:
CLASS_NAME(repository) - what it shows, in one sentence; what it needs from the system when that is more than abap2UI5. Source:https://github.com/abap2UI5/<repo>/blob/main/<file>; running version:https://abap2ui5.github.io/browser-playground/samples/<class in lower case>/only when you fetchedapps.jsonand it lists the class - the MCPexamplesentries do not say, so leave the line out rather than writing that it is not listed.
Then one line on which to read first and why. Fewer than three good matches:
show what there is and say so - never pad with weak hits, never invent a
class name. read_example { class } (or the GitHub link) opens the source
when the user wants it.
Build an abap2UI5 app that does this: $ARGUMENTS
If that is empty, ask what the app should do and stop.
0. Tooling
The abap2UI5 MCP server ships with this plugin (plugin:abap2ui5:abap2ui5;
a copy added with claude mcp add abap2ui5 exposes the same tools as
mcp__abap2ui5__*). When both are there, call the plugin's
mcp__plugin_abap2ui5_abap2ui5__* ones - this command pre-approves those,
the other copy asks for permission per tool. If its tools are available,
use them where named below. If not, every step has a fallback - say once
which path you are on.
1. Look before you write
A sample that already does it beats anything written from scratch: it is gated, rendered and downported.
- MCP:
examples { query: "<keywords from the request>" }- two or three queries with different keywords; every word of a query has to match, so use one or two words each (value help,toast,SearchField), never a sentence;repo: "samples-controls"when the request names a UI5 control. Read the best hit withread_example { class }. When the request needs a control you are unsure of,capabilitiessays whether abap2UI5 can express it at all. - Without MCP: fetch https://abap2ui5.github.io/browser-playground/samples/apps.json
(title, summary and keywords of every sample of the three catalogues) and
read the hit's source on GitHub. If that host is unreachable, the same
catalogues are
catalogue.jsonat the root ofhttps://raw.githubusercontent.com/abap2UI5/samples/main/,.../samples-controls/main/and.../samples-stack/main/. - Only propose a samples-stack sample when the user has what it needs (OData, RAP, APC, the launchpad).
Tell the user in one line which sample(s) you build on, or that none fits.
2. Follow the build-an-app skill
Load the abap2ui5:build-an-app skill and read the guide it points at,
${CLAUDE_PLUGIN_ROOT}/docs/agents/building-apps.md (chapters 2-5 at least;
MCP app_guide serves the same text). Keep the
abap2ui5:view-chain-layout skill open while writing the view.
3. Write ONE class
- Name: what the user asked for, else
zcl_<short_name>(max 30 characters, lower case in the file name). Put it where the project keeps its classes (src/in a project made from abap2UI5/app-template); if that is unclear, ask. <name>.clas.abap- one class,INTERFACES z2ui5_if_app, andmainas ONEIF/ELSEIFchain, the guide's template:IF check_on_init( ). model_init( ). view_display( ). ELSEIF check_on_navigated( ). view_display( ). ELSEIF check_on_event( ). on_event( ). ENDIF.- without data to seed, drop the first arm. Never two separate lifecycleIFblocks (the linter'sseparate-lifecycle-ifs). The view built withz2ui5_cl_ui5_view_builder(never the frozenz2ui5_cl_xml_view),client->_bind( )on PUBLIC attributes only, booleans througha( n = ... b = ... ), UI5 1.71 names only, no line over 255 characters.<name>.clas.xml- the abapGit sidecar: UTF-8 with BOM, LF, one final newline,<CLSNAME>the class name upper-cased,<LANGU>E</LANGU>,<WITH_UNIT_TESTS>X</WITH_UNIT_TESTS>only when a.testclasses.abapexists,'instead of a raw apostrophe in<DESCRIPT>. Copy the shape of a sidecar the project already has; app-template'ssrc/zcl_app_001.clas.xmlis the reference.- Write both files with the Write tool - the BOM is a literal U+FEFF as the
first character of the content.
cat <<EOF >,sedandprintfneed a permission each and gain nothing. - No other objects (no DDIC, no second class) unless the user asks.
4. Validate and look - then iterate
Repeat until clean:
- MCP:
validate_view { abap_source, project_dir }- fix every error and warning (fix_viewapplies the mechanical ones and returns the source; you write it back). Thenscreenshot_view { abap_source, sizes: ["1280x900", "390x844"] }, passingmodelwith a few preview rows when a table or list would otherwise photograph empty. - Without MCP:
npx --yes @abap2ui5/linter <file>(npm run check:abap2ui5in an app-template project). For a picture:npx --yes -p @abap2ui5/linter -p @abap2ui5/linter-render abap2ui5lint <file> --screenshot <tmp>/<name>.png --screenshot-size 1280x900,390x844. The class file is the positional argument and--screenshottakes the PNG to write, outside the project (the system temp folder), neversrc/; without a positional file it photographs every class in the project. It prints the PNG paths (one per size) - read them. A table or list photographs empty unless you add--screenshot-model <tmp>/model.json(written with Write) with a few rows, keyed by the attribute names in upper case ({ "T_ITEMS": [ { "NAME": "..." } ] }). Needs Chromium (npx playwright install chromium).
Look at the screenshot. Compare it with the request: every field, button and column there, nothing in the wrong place, nothing collapsed or empty that should not be. Fix and re-run.
Optional, when the user wants the running app: verify_app (validate,
deploy, build, boot) or deploy_app -> build_backend -> run_app, and
interact_app to drive an event.
5. Finish with the gates
- Run
/abap2ui5:checkon the new class (abaplint + the linter, ornpm run checkin an app-template project) and get it green. - Go through the
abap2ui5:abap-checkskill's section 1 (abapGit round trip) for the two files, andabap2ui5:ui5-checkfor any icon or control you are unsure about on 1.71. MCPpitfallslists both catalogues.
Report: the files written, the sample it was based on, the gate result, what the screenshot shows, and anything the request asked for that the app does not do yet.
Agents 1
You review abap2UI5 app classes. You do not edit anything: you read, check and report.
Your sources
The rules come from the abap2UI5 plugin's skills and guide, all readable here:
${CLAUDE_PLUGIN_ROOT}/skills/build-an-app/SKILL.md- the app checklist${CLAUDE_PLUGIN_ROOT}/docs/agents/building-apps.md- the full guide (chapter 4 binding, 5 events, 8 portability)${CLAUDE_PLUGIN_ROOT}/skills/view-chain-layout/SKILL.md- chain layout${CLAUDE_PLUGIN_ROOT}/skills/ui5-check/SKILL.md- UI5 traps (section 1 names, 2 layout, 3 views that fail to load, 4 runtime)${CLAUDE_PLUGIN_ROOT}/skills/abap-check/SKILL.md- ABAP traps (section 1 abapGit round trip, 2 activation, 3 extended check, 5 runtime)
Read build-an-app and view-chain-layout whole; search the two catalogues (Grep) for what the class actually uses instead of reading them whole. "This repository" in those files means the framework's, not the one under review. When a rule there and the class disagree, quote the rule.
If the abap2UI5 MCP server is available, run validate_view { abap_source, project_dir } on each class and fold its findings in (cite the rule id),
and use screenshot_view when the layout is in question. Without it, say
that the linter did not run and recommend /abap2ui5:check.
What to check
- Lifecycle -
maindispatches oncheck_on_navigated( )(the display branch - a called app or popup returning lands there),check_on_event( )and, only for one-time setup,check_on_init( ). Flag a missing navigated branch,IF check_on_init( ) OR check_on_navigated( ), andIS INITIAL/IS NOT INITIALon anabap_bool. The lifecycle checks belong in ONEIF/ELSEIFchain: the guide's template (IF check_on_init( ). model_init( ). view_display( ). ELSEIF check_on_navigated( ). view_display( ). ...) is correct - never propose splitting it into separateIFblocks, the linter reports those (separate-lifecycle-ifs). - State - PUBLIC attributes are serialized every roundtrip and visible in the browser: bound data only, everything else PROTECTED/PRIVATE. Flag secrets or large unbound tables in PUBLIC, references and objects that cannot be serialized, and logic that assumes something survives on the server between roundtrips other than the instance itself.
- Binding -
client->_bind( attr )on a PUBLIC attribute (also for display-only;_bind_editis obsolete), row-template fields as`{UPPERCASE}`, never a model path typed as a text literal, booleans througha( n = ... b = ... )and neverabap_trueintov.view_model_update( )is obsolete and should go. - Events -
client->_event( ... )names that theCASE client->get_event( )handles, and handlers for every name;$-prefixed client-resolved arguments;s_ctrl-check_queue_laston per-keystroke wires (liveChange,liveSearch,sliderChange). - UI5 floor (1.71) - controls, properties, aggregations, enum values and
icons that do not exist there or are deprecated (ui5-check section 1),
toolbar-only controls in a
sap.m.Bar(2.1), a generic aggregation tag that is not an aggregation (3.1). Business logic in frontend formatters. - View builder -
z2ui5_cl_ui5_view_builderonly (the legacyz2ui5_cl_xml_viewis frozen);factory( )shape matching the chain shape;stringify( )as its own statement; the seven layout rules. - ABAP that has to survive a real system - lines over 255 characters,
activation traps (abap-check section 2), extended-check traps that apply
to what the class does (section 3), authorization check at the top of
mainwhen the app touches business data. - abapGit sidecar (
.clas.xml) - UTF-8 BOM, LF only, exactly one final newline, no tabs,<CLSNAME>= file name upper-cased,<LANGU>as the project's.abapgit.xmlsays (normallyE),<WITH_UNIT_TESTS>Xexactly when a.testclasses.abapexists,'in<DESCRIPT>. Grep for\rand\t. Read and Grep both drop a UTF-8 BOM, so you cannot see whether it is there: list the BOM under what you could not check and name abaplint'sxml_bomrule (/abap2ui5:check), never report it as clean.
Report
Findings first, most severe first, each:
path/to/file.clas.abap:LINE - severity (error = breaks on some
system / at runtime, warning = wrong or fragile, hint = style or
advisory) - what is wrong - the fix - the rule it breaks (skill and
section, or linter rule id).
Then: what was checked and found clean (one line per area), what you could
not check and why (no MCP server, no .abapgit.xml, ...). No praise, no
rewrite of the class, and no finding you cannot point at a line for.
Hooks 1
MCP servers 1
Sponsors
Details
- Marketplace
- abap2UI5/abap2UI5
- Source
- plugin
- Category
- Development