You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/technical/dx.md
+16-27Lines changed: 16 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,11 @@ ENDCLASS.
22
22
```
23
23
24
24
Why this is great for developers:
25
-
- Single-class design is easy to debug and share
25
+
- Single-class design: quick to create and easy to debug
26
26
- Minimal boilerplate
27
27
- Fully abapGit-ready
28
28
29
-
This simplicity also inspired the entry point for abap2UI5 apps:
29
+
This simplicity also inspired the entry point for abap2UI5 apps. For a simple output you don't need more than this:
30
30
```abap
31
31
CLASS zcl_app_ui5 DEFINITION PUBLIC CREATE PUBLIC .
32
32
PUBLIC SECTION.
@@ -42,13 +42,11 @@ ENDCLASS.
42
42
43
43
What abap2UI5 adds:
44
44
- Runs in the browser, no ADT needed
45
-
- End-user ready without extra deployment
46
-
- Conform to SAP Fiori Design guidelines
45
+
- With UI5 Frontend, its conform to SAP Fiori Design guidelines
47
46
48
47
### Input Handling Inspired by Selection Screens
49
48
50
-
Classic ABAP supports user input through selection screens:
51
-
49
+
Inputting data was never a big topic for ABAP developers, just create a report and `parameters` and `select-options`give you a UI fro free. Although this term was not used at that time, you get with 4 lines of code an app which today is called `fullstack` application:
52
50
```abap
53
51
REPORT zre_app_input.
54
52
PARAMETERS pa_arbgb TYPE t100-arbgb DEFAULT 'MDG_TR'.
@@ -59,8 +57,8 @@ Why this is great for developers:
59
57
- Rapid prototyping with minimal code
60
58
- Built-in input functionaity and events
61
59
- Fullstack behavior with no setup
62
-
63
-
abap2UI5 brings this idea into the browser using an XML view builder and data binding:
60
+
61
+
abap2UI5 mirrors this classic selection logic but browser based. Just use the class `z2ui5_cl_xml_view` to create simple views and exchange data with the client via `_bind_edit` methods:
64
62
```abap
65
63
CLASS zcl_app_input DEFINITION PUBLIC CREATE PUBLIC.
66
64
PUBLIC SECTION.
@@ -79,19 +77,16 @@ CLASS zcl_app_input IMPLEMENTATION.
- Mirrors classic ABAP selection logic, making it familiar
89
-
- Easy to test: reload the page, enter input, press the button
90
-
- Everything is still in a single class — no external UI tooling needed
85
+
It is easy to test: reload the page, enter input, press the button while everything is still in a single class — no external UI tooling needed.
91
86
92
87
### Tabular Output like ALV
93
88
94
-
ALV tools such as`CL_SALV_TABLE` helped make tabular output effortless:
89
+
Table output is one of the most used features for ABAP developers, and using ALV for that is just iconic.`CL_SALV_TABLE` helped make tabular output effortless:
95
90
96
91
```abap
97
92
REPORT zre_app_alv.
@@ -109,12 +104,12 @@ cl_salv_table=>factory(
109
104
go_salv->display( ).
110
105
```
111
106
112
-
Why it matters:
107
+
Why this is great for developers:
113
108
- Generates full UI from internal tables
114
109
- No external annotations or CDS needed
115
110
- Ideal for admin tools and quick overviews
116
111
117
-
abap2UI5 brings this to the browser:
112
+
abap2UI5 creates outputs completely based an internal tables, no ddictionry artifacts are needed, no designtime definitions have to be made. just throw the actual table into the binding use a ui5 table control to display the data:
118
113
119
114
```abap
120
115
CLASS zcl_app_alv DEFINITION PUBLIC.
@@ -148,14 +143,12 @@ CLASS zcl_app_alv IMPLEMENTATION.
148
143
ENDMETHOD.
149
144
ENDCLASS.
150
145
```
151
-
From here to make an outing output with salv is a small step to make rtti salv like
146
+
From here it is just a small step to make it even more dynamic and create everything with RTTI at runtime. Just how it is done with the newer (but still old now) SALV. While the ALV onbly works with sapgui, these snippets are the exttrem quick way to bring your table into your browser.
152
147
153
-
Additional Benefits in abap2UI5:
154
-
- Fully works in browser and on any device, no SAP GUI dependencies
155
148
156
149
### Classic Popups, Modern Events
157
-
Classic ABAP offered a straightforward way to ask user decisions:
158
150
151
+
How often have you been to transaction `SE37` and search with `POPUP_TO*` for a popup matching wxactly what you need. yes function modules are old but still very often used and extremely practicable, giving you some event logic with just a serveal lines of code. Lets take a look the the `POPUP_TO_CONFIRM`:
159
152
```abap
160
153
REPORT zre_app_alv.
161
154
@@ -174,12 +167,12 @@ CASE event.
174
167
MESSAGE `the result is NO` TYPE 'I'.
175
168
ENDCASE.
176
169
```
177
-
Benefits:
170
+
Why this is great for developers:
178
171
* event logic at a central place
179
172
* easy to understand program flow
180
173
* popups are encapsulated in abap code and can be reused
181
174
182
-
abap2UI5 offers a matching approach using z2ui5_cl_pop_to_confirm:
175
+
abap2UI5 offers a matching approach giving you the chance to create multiple apps, which can call each other. Encapsulate your popup funcitonality in a separated class and call it whenever you want. Check these snippet mimicing the popup to confirm:
183
176
```abap
184
177
CLASS zcl_app_alv_event DEFINITION PUBLIC.
185
178
PUBLIC SECTION.
@@ -208,11 +201,7 @@ CLASS zcl_app_alv_event IMPLEMENTATION.
208
201
ENDMETHOD.
209
202
ENDCLASS.
210
203
```
211
-
212
-
Why it matters:
213
-
- Dialog logic stays class-based and readable
214
-
- UI and logic stay in sync
215
-
- The flow mimics classic ABAP screen logic with modern UI5 behavior
204
+
Browsr based roundtrip need a sligthly different program flow but the approach is still close and should feel familiar for ABAP developers.
0 commit comments