Skip to content

Commit f62a527

Browse files
committed
docs: fix verified technical errors from deep review
- formatter: read-only _bind paths have no /XX/ segment — correct the resolved expression-binding string and the path = abap_true note (verified against z2ui5_cl_core_srv_bind=>get_client_name) - lock: reorder INTO after WHERE in the two inline optimistic-check SELECTs (strict ABAP SQL) to match the full source below them - agent guide: check_on_navigated fires on return from apps called via nav_app_call, not from same-app popup_display popups — make both comments precise - how_it_all_works: remove self-referential cross-reference in section 16 and qualify the "2,300 lines" figure as the original core communication layer Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EC2cWJafPETwcMbh3NCsgH
1 parent 7a0bb7e commit f62a527

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

docs/advanced/agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ENDCLASS.
5454
```abap
5555
IF client->check_on_init( ). " first call
5656
" load data + render view
57-
ELSEIF client->check_on_navigated( ). " returned from sub-app / popup
57+
ELSEIF client->check_on_navigated( ). " returned from a called sub-app (nav_app_call), incl. built-in popup apps
5858
" refresh state
5959
ELSEIF client->check_on_event( `POST` ). " user fired event 'POST'
6060
" handle it
@@ -135,7 +135,7 @@ CLASS zcl_app_xxx DEFINITION PUBLIC.
135135
136136
METHODS on_init. " first call: load data, render view
137137
METHODS on_event. " user triggered an event
138-
METHODS on_navigation. " returned from sub-app or popup
138+
METHODS on_navigation. " returned from a sub-app called via nav_app_call
139139
METHODS view_display. " build and render the view
140140
METHODS data_read. " SELECT
141141
METHODS data_update. " INSERT / UPDATE / DELETE

docs/cookbook/expert_more/lock.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,15 @@ On read, remember the record's change timestamp. On save, re-read and reject if
297297
```abap
298298
METHOD data_read.
299299
SELECT SINGLE aedat, UPD_TMSTMP FROM vbak
300-
INTO ( @token_aedat, @token_aezet )
301-
WHERE vbeln = @vbeln.
300+
WHERE vbeln = @vbeln
301+
INTO ( @token_aedat, @token_aezet ).
302302
ENDMETHOD.
303303
304304
METHOD on_event_save.
305305
306306
SELECT SINGLE aedat, UPD_TMSTMP FROM vbak
307-
INTO ( @DATA(now_aedat), @DATA(now_aezet) )
308-
WHERE vbeln = @vbeln.
307+
WHERE vbeln = @vbeln
308+
INTO ( @DATA(now_aedat), @DATA(now_aezet) ).
309309
310310
IF now_aedat <> token_aedat OR now_aezet <> token_aezet.
311311
client->message_box_display( `Record changed — please reload.` ).

docs/cookbook/model/formatter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ UI5 formatter types use a special JSON-based binding syntax with these key eleme
1313

1414
Note on ABAP syntax: inside string templates (`|...|`), escape the curly braces as `\{` and `\}`, because `{ }` normally denotes an embedded ABAP expression.
1515

16-
The `path = abap_true` parameter on `_bind` / `_bind_edit` returns only the raw model path (e.g., `/XX/AMOUNT`) rather than the full binding expression (`{/XX/AMOUNT}`), so you can embed it inside the `parts` array or a single-path `path:` entry.
16+
The `path = abap_true` parameter on `_bind` / `_bind_edit` returns only the raw model path rather than the full binding expression, so you can embed it inside the `parts` array or a single-path `path:` entry. For `_bind_edit` the path is e.g. `/XX/AMOUNT`; read-only `_bind` paths have no `/XX/` segment (`/AMOUNT`).
1717

1818
For example, this ABAP code:
1919
```abap
@@ -93,7 +93,7 @@ ABAP `abap_bool` is `"X"` or `""`. UI5's `CheckBox` expects `true` / `false`. Tw
9393
```abap
9494
)->checkbox( selected = `{= $` && client->_bind( mv_flag ) && ` === 'X' }` )
9595
```
96-
This resolves to `{= ${/XX/MV_FLAG} === 'X' }`. Note that expression bindings cannot write back — checking the box will not flip the ABAP attribute.
96+
This resolves to `{= ${/MV_FLAG} === 'X' }` — read-only `_bind` paths have no `/XX/` prefix (that segment marks two-way `_bind_edit` bindings). Note that expression bindings cannot write back — checking the box will not flip the ABAP attribute.
9797

9898
**ABAP-side conversion** — keep a parallel `string`-typed attribute (`'true'` / `'false'`) for two-way binding, and translate before/after each event:
9999
```abap

docs/technical/how_it_all_works.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ SAP GUI (stateful) vs. abap2UI5 (restful)
214214

215215
But use this feature only for interim results; take care when serializing other parts of your app.
216216

217-
We've earned significant flexibility with (9) (10) (11) (16); the next sections focus on how the framework cuts its complexity, starting with the initial request.
217+
We've earned significant flexibility with (9) (10) (11) and the drafts from this section; the next sections focus on how the framework cuts its complexity, starting with the initial request.
218218

219219
#### 17. Initial Request
220220

@@ -307,7 +307,7 @@ And Fiori Elements, with all its floorplans and templates, is simple and will ke
307307

308308
#### 25. System Footprint
309309

310-
We keep the system footprint small — abap2UI5 ships only ABAP classes, with no CDS or RAP artifacts. Most of the code lives in user apps outside the framework (21) (22). Overall, the framework comes to about 2,300 lines of code spread across one HTTP-Handler, two interfaces, and one database table:
310+
We keep the system footprint small — abap2UI5 ships only ABAP classes, with no CDS or RAP artifacts. Most of the code lives in user apps outside the framework (21) (22). Overall, the core communication layer originally came to about 2,300 lines of code spread across one HTTP handler, two interfaces, and one database table (the framework has grown since — most notably the optional fluent view builder — but the core stays this small):
311311

312312
<img width="600" alt="System footprint of abap2UI5" src="https://github.com/user-attachments/assets/981ab684-d2cf-4f56-b25c-c333db3c6dcc" />
313313

@@ -365,7 +365,7 @@ Automated ABAP downporting greatly boosts efficiency. See the abaplint dashboard
365365

366366
In short: inspired by "HTML Over-the-Wire" (1)(2)(3), we combined UI and Data (7) and created a "UI5 Over-the-Wire" approach by sending the XML-View from the server (6). We then used a single generic HTTP-Service for all apps (13), independent of the View and Data Model (12). This gives us great flexibility, so we can create Data Models (10) and Views (11) dynamically at runtime, which greatly cuts the number of backend artifacts.
367367

368-
Next, we explored several ideas for how the framework cuts its complexity by avoiding frontend artifacts (17), removing extra customizing layers (19), and separating the view from the framework (21), along with app-specific JS or HTML (22). The result is a pure source-code approach with only one database table, two interfaces, one class, and about 2,300 lines of code (25). We build it in a single code line (27), making it cloud- and on-premise-ready and downportable to older releases (28). Paired with abapGit, you can build apps that run on nearly every release.
368+
Next, we explored several ideas for how the framework cuts its complexity by avoiding frontend artifacts (17), removing extra customizing layers (19), and separating the view from the framework (21), along with app-specific JS or HTML (22). The result is a pure source-code approach whose core needs only one database table, two interfaces, one handler class, and roughly 2,300 lines of code (25). We build it in a single code line (27), making it cloud- and on-premise-ready and downportable to older releases (28). Paired with abapGit, you can build apps that run on nearly every release.
369369

370370
Overall, with abap2UI5 you need to set aside some common rules: no separation between View and Model in the HTTP communication (12), HTML and JavaScript live directly in the source code (17) (22), we don't use OData or RAP (7), and there are other tradeoffs to weigh (24). But if you accept all of this, you get a very minimal approach where you only need to write a single method to build standalone UI5 apps (15).
371371

0 commit comments

Comments
 (0)