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/addons/srtti.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,6 @@
1
+
---
2
+
outline: [2, 4]
3
+
---
1
4
# RTTI
2
5
3
6
<iclass="fa-brands fa-github"></i> [S-RTTI Project on GitHub](https://github.com/sandraros/S-RTTI)
@@ -7,7 +10,7 @@ In abap2UI5, you don’t necessarily need to type your data model at design time
7
10
abap2UI5 serializes your app instances to ensure stateless behavior in client communication. Unfortunately, the SAP standard serialization features are limited; for example, they do not support local types created at runtime. If you encounter problems, just install the fantastic project [S-RTTI](https://github.com/sandraros/S-RTTI) filling this gap.
8
11
9
12
#### Basic
10
-
Fully typed at design time, it works out of the box:
13
+
Fully typed data at design time, it works out of the box:
11
14
12
15
```abap
13
16
CLASS z2ui5_cl_app DEFINITION PUBLIC.
@@ -32,8 +35,7 @@ CLASS z2ui5_cl_app IMPLEMENTATION.
32
35
33
36
mt_tab = VALUE #(
34
37
( title = 'entry 01' value = 'red' descr = 'this is a description' )
35
-
( title = 'entry 02' value = 'blue' descr = 'this is a description' )
36
-
( title = 'entry 02' value = 'gray' descr = 'this is a description' ) ).
38
+
( title = 'entry 02' value = 'blue' descr = 'this is a description' ) ).
37
39
38
40
client->message_box_display( `this works without problems` ).
39
41
@@ -42,7 +44,7 @@ ENDCLASS.
42
44
```
43
45
44
46
#### Generic Data Reference (local type)
45
-
Typed at runtime with local types; this only works with S-RTTI:
47
+
Data typed at runtime with local types; this only works with S-RTTI:
46
48
```abap
47
49
CLASS z2ui5_cl_app DEFINITION PUBLIC.
48
50
@@ -71,8 +73,7 @@ CLASS z2ui5_cl_app IMPLEMENTATION.
71
73
ASSIGN mr_tab->* TO <tab>.
72
74
<tab> = VALUE #(
73
75
( title = 'entry 01' value = 'red' descr = 'this is a description' )
74
-
( title = 'entry 02' value = 'blue' descr = 'this is a description' )
75
-
( title = 'entry 02' value = 'gray' descr = 'this is a description' ) ).
76
+
( title = 'entry 02' value = 'blue' descr = 'this is a description' ) ).
76
77
77
78
client->message_box_display( `this works only with S-RTTI` ).
0 commit comments