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/development/general.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# General
2
2
3
-
abap2UI5 offers great flexibility in developing your app. Most samples follow a process similar to the sequence shown below. Use it as a starting point, and feel free to create your own sequence or build a wrapper on top of abap2UI5.
3
+
abap2UI5 offers great flexibility in app development. Most sample applications follow a process similar to the sequence outlined below. You can use it as a starting point, but feel free to create your own sequence or build a wrapper on top of abap2UI5 for more customized behavior:
4
4
5
5
```abap
6
6
CLASS z2ui5_cl_app DEFINITION PUBLIC.
@@ -47,4 +47,4 @@ CLASS z2ui5_cl_app IMPLEMENTATION.
47
47
ENDMETHOD.
48
48
ENDCLASS.
49
49
````
50
-
Refer to the specific sections of this development guide for more details on implementation.
50
+
Refer to the specific sections of this development guide for more details on the implementation process.
Copy file name to clipboardExpand all lines: docs/development/messages.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ outline: [2, 4]
4
4
5
5
# Messages, Errors
6
6
7
-
Outputting messages and errors is an everyday requirement for ABAP developers. Functions are provided for the most common situations.
7
+
Displaying messages and errors is an everyday requirement for ABAP developers. The following functions handle the most common scenarios.
8
8
9
9
#### Message Toast
10
10
11
-
Messages that are displayed for a short period, such as success notifications, can be shown with:
11
+
For short-duration messages, such as success notifications, you can use the message toast:
12
12
13
13
```abap
14
14
METHOD z2ui5_if_app~main.
@@ -20,7 +20,7 @@ ENDMETHOD.
20
20
21
21
#### Message Box
22
22
23
-
If you want to ensure that the user acknowledges the message, you can display a message box that requires a manual close:
23
+
If you want the user to acknowledge the message, you can display a message box that requires manual closure:
24
24
25
25
```abap
26
26
METHOD z2ui5_if_app~main.
@@ -43,7 +43,7 @@ ENDMETHOD.
43
43
```
44
44
45
45
#### SY, BAPIRET, CX_ROOT
46
-
Common message structures, objects, and variables can be passed directly to the functions:
46
+
You can directly pass common message structures, objects, and variables to the functions:
47
47
###### SY
48
48
```abap
49
49
METHOD z2ui5_if_app~main.
@@ -81,10 +81,10 @@ METHOD z2ui5_if_app~main.
81
81
82
82
ENDMETHOD.
83
83
```
84
-
Many other imports are supported. Just import your message structure, and the message box will display it.
84
+
Other imports are supported as well. Simply import your message structure, and the message box will display it.
85
85
86
86
#### Popup Multi Message
87
-
The message box provides basic output, if you want to generate a detailed output, use the popup `z2ui5_cl_pop_messages`:
87
+
The message box provides basic output. For a more detailed output, use the popup `z2ui5_cl_pop_messages`:
88
88
```abap
89
89
METHOD z2ui5_if_app~main.
90
90
@@ -97,7 +97,7 @@ METHOD z2ui5_if_app~main.
97
97
ENDMETHOD.
98
98
```
99
99
#### Popup Error
100
-
To show a detailed view of your exception:
100
+
To show a detailed view of your exception, use the following code:
101
101
```abap
102
102
METHOD z2ui5_if_app~main.
103
103
@@ -110,7 +110,7 @@ METHOD z2ui5_if_app~main.
110
110
ENDMETHOD.
111
111
```
112
112
#### Popup Confirm
113
-
If interaction is required, the `z2ui5_cl_pop_to_confirm`can be used:
113
+
If interaction is required, you can use `z2ui5_cl_pop_to_confirm`:
114
114
```abap
115
115
METHOD z2ui5_if_app~main.
116
116
@@ -128,15 +128,15 @@ METHOD z2ui5_if_app~main.
128
128
ENDMETHOD.
129
129
```
130
130
#### Uncatched Errors
131
-
What happens if errors are uncaught? In this case, the default HTTP handler exception output is used. The processing is interrupted and the user need to refresh the browser. So only use this for unexpected behaviour:
131
+
What happens if errors are uncaught? In this case, the default HTTP handler exception output is used. The processing is interrupted, and the user will need to refresh the browser. Use this only for unexpected behavior:
132
132
```abap
133
133
METHOD z2ui5_if_app~main.
134
134
135
135
ASSERT 1 = `This is an error message!`.
136
136
137
137
ENDMETHOD.
138
138
```
139
-
Or achieve the same behavior with an uncaught exception:
139
+
Alternatively, achieve the same behavior with an uncaught exception:
140
140
```abap
141
141
METHOD z2ui5_if_app~main.
142
142
@@ -145,5 +145,5 @@ METHOD z2ui5_if_app~main.
145
145
ENDMETHOD.
146
146
```
147
147
::: tip **Improvements**
148
-
All these message functions are continually improved. Feel free to open an issue if you encounter errors or incompatibilities, or submit a PR to extend the functionality.
148
+
These message functions are continually being improved. Feel free to open an issue if you encounter errors or incompatibilities, or submit a PR to extend the functionality.
Copy file name to clipboardExpand all lines: docs/development/model.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ outline: [2, 4]
3
3
---
4
4
# Model
5
5
6
-
There are three ways to exchange data with the frontend in abap2UI5.
6
+
In abap2UI5, there are three ways to exchange data with the frontend.
7
7
8
8
#### One-Way Binding
9
+
Use one-way binding when you need to display data on the frontend without allowing changes. The `client->_bind` method sends data to the frontend and connects it to the view:
9
10
10
-
When you need to display data on the frontend without allowing any changes, use one-way binding. The `client->_bind` method sends the data to the frontend and connects it to the view:
11
11
```abap
12
12
CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.
13
13
@@ -29,10 +29,10 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
29
29
ENDMETHOD.
30
30
ENDCLASS.
31
31
```
32
-
This method also works for tables, trees, and other complex data structures. For more details, refer to the samples repository and explore the table or tree samples.
32
+
This method works with tables, trees, and other complex data structures. For more details, refer to the samples repository and explore the table or tree samples.
33
33
34
34
#### Two-Way Binding
35
-
If the user should be able to modify data, enable two-way binding to update data in the ABAP backend. Use the `client->_bind_edit` method so that after an event, the framework will synchronize the data with your ABAP class.
35
+
If the user should be able to modify data, enable two-way binding to update the data in the ABAP backend. Use the `client->_bind_edit` method so that, after an event, the framework will synchronize the data with your ABAP class:
36
36
37
37
```abap
38
38
CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.
@@ -64,7 +64,7 @@ ENDCLASS.
64
64
```
65
65
66
66
#### Local Binding
67
-
When you only have local access to data but want to bind it for display (e.g., for a value help or lookup), use local binding. The `client->_bind_local` method copies the data and sends it to the frontend without impacting backend logic:
67
+
When you only have local access to data but still want to bind it for display (e.g., for value help or lookups), use local binding. The `client->_bind_local` method copies the data and sends it to the frontend:
68
68
69
69
```abap
70
70
CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.
@@ -88,8 +88,8 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
88
88
ENDMETHOD.
89
89
ENDCLASS.
90
90
```
91
-
For an example of local binding in action, see the value help use case in `Z2UI5_CL_DEMO_APP_002`.
91
+
For an example of local binding in action, refer to the value help use case in `Z2UI5_CL_DEMO_APP_002`.
92
92
93
93
::: tip **Data in Public Attributes**
94
-
When using One-Way or Two-Way binding, remember to store your data in public attributes of your class, as the framework needs to access it from outside. This is similar to the PBO/PAI screen days, where data needed to be stored in global variables.
94
+
When using One-Way or Two-Way binding, ensure your data is stored in the public attributes of your class. This allows the framework to access it from outside. This is similar to the PBO/PAI screen days, where data had to be stored in global variables.
Copy file name to clipboardExpand all lines: docs/development/popups.md
+4-8Lines changed: 4 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,7 @@ ENDMETHOD.
23
23
```
24
24
25
25
#### Flow Logic
26
-
Typically, a common flow for using popups involves displaying a normal view, then showing a popup, and finally closing it. Here’s how this can be structured:
27
-
26
+
A common flow for using popups typically involves displaying a normal view, then showing a popup, and finally closing it. Here’s how to structure this:
28
27
```abap
29
28
METHOD Z2UI5_if_app~main.
30
29
@@ -62,12 +61,10 @@ ENDMETHOD.
62
61
```
63
62
64
63
#### Separated App
65
-
For better source code structure, it's possible to encapsulate the popups in separate classes and call them through navigation.
64
+
For better source code structure, it's possible to encapsulate popups in separate classes and call them through navigation.
66
65
67
66
### Popover
68
-
69
-
Use the method client->popover_display and specify the ID of the control where you want to display the popover:
70
-
67
+
To display a popover, use the method `client->popover_display` and specify the ID of the control where you want the popover to appear:
71
68
```abap
72
69
METHOD Z2UI5_if_app~main.
73
70
@@ -108,7 +105,6 @@ ENDMETHOD.
108
105
```
109
106
110
107
### Built-in Popups
111
-
112
108
Several pre-built popup classes are available for specific scenarios:
113
109
114
110
* z2ui5_cl_pop_error
@@ -126,4 +122,4 @@ Several pre-built popup classes are available for specific scenarios:
Copy file name to clipboardExpand all lines: docs/development/translation.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ outline: [2, 4]
6
6
In UI5 apps, translations are typically managed through i18n files, with translation content stored in frontend artifacts. In abap2UI5, since all apps reside on the ABAP backend, we can leverage ABAP's built-in translation mechanisms, such as text elements or message classes.
7
7
8
8
### Text Element
9
-
The message can be translated using the ABAP text element mechanism, making it available in different languages without changing the code:
9
+
Messages can be translated using the ABAP text elements, making them available in different languages without changing the code:
10
10
```abap
11
11
METHOD z2ui5_if_app~main.
12
12
@@ -17,7 +17,7 @@ ENDMETHOD.
17
17
```
18
18
19
19
### Messages
20
-
Messages are translated using message classes, which ensures that translations are managed centrally and can be maintained easily in different languages:
20
+
Messages are translated using message classes, ensuring that translations are managed centrally and can be maintained easily in different languages:
21
21
```abap
22
22
METHOD z2ui5_if_app~main.
23
23
@@ -28,7 +28,7 @@ ENDMETHOD.
28
28
```
29
29
30
30
### Data Element
31
-
You can also retrieve and display the short, medium, or long descriptions of data elements (DD04T). Here’s how to access these text types programmatically:
31
+
You can also retrieve and display the short, medium, or long descriptions of data elements (DD04T). Here's how to access these text types programmatically:
Copy file name to clipboardExpand all lines: docs/development/troubleshooting.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,4 @@ Here, you can inspect the XML View and check the Data Model bound to the view.
17
17
18
18
##### UI5 Inspector
19
19
20
-
Another useful option is SAP’s default debugging tool, the [UI5 Inspector.](https://chromewebstore.google.com/detail/ui5-inspector/bebecogbafbighhaildooiibipcnbngo?hl=es)
21
-
22
-
20
+
Another useful option is SAP’s default debugging tool, the [UI5 Inspector.](https://chromewebstore.google.com/detail/ui5-inspector/bebecogbafbighhaildooiibipcnbngo?hl=es)
Copy file name to clipboardExpand all lines: docs/development/view.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,7 @@
2
2
outline: [2, 4]
3
3
---
4
4
# View
5
-
Output in abap2UI5 is generated by importing a UI5 XML View. Here’s a basic example:
6
-
5
+
In abap2UI5, the output is generated by importing a UI5 XML View. Here’s a basic example:
7
6
```abap
8
7
METHOD z2ui5_if_app~main.
9
8
@@ -19,7 +18,7 @@ METHOD z2ui5_if_app~main.
19
18
20
19
ENDMETHOD.
21
20
```
22
-
You can use any UI5 control available in the UI5 SDK. However, working with XML can be cumbersome. The current best practice is to use the class `Z2UI5_CL_XML_VIEW`:
21
+
You can use any UI5 control available in the UI5 SDK. However, working with XML can become cumbersome. A more efficient approach is to use the `Z2UI5_CL_XML_VIEW` class. Here's an improved version of the code using this class:
23
22
```abap
24
23
METHOD z2ui5_if_app~main.
25
24
@@ -32,6 +31,6 @@ You can use any UI5 control available in the UI5 SDK. However, working with XML
32
31
33
32
ENDMETHOD.
34
33
```
35
-
Check the API of the class `Z2UI5_CL_XML_VIEW` and use code completion to easily find the right controls and properties. Additionally, it’s recommended to explore the sample repository, where pre-written XML examples for most use casesare available for easy copy, paste, and adjustment to fit your needs.
34
+
Check the API of the `Z2UI5_CL_XML_VIEW`class and leverage code completion to easily find the correct controls and properties. Additionally, it’s recommended to explore the sample repository, which contains pre-written XML examples for most use cases. These examples are available for easy copy-pasting and can be adjusted to suit your specific needs.
36
35
37
-
Currently, this setup is quite static; we’ll explore how to bind and exchange data in the next section.
36
+
Currently, this setup is quite static. In the next section, we will explore how to bind and exchange data between the view and the app logic.
0 commit comments