Skip to content

Commit ee5b62b

Browse files
authored
Merge pull request #48 from abap2UI5/claude/iterative-improvements-3r6Uc
improve documentation
2 parents 5c626f3 + 3572069 commit ee5b62b

85 files changed

Lines changed: 1107 additions & 1151 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*node_modules
2-
docs/.vitepress/cache
2+
docs/.vitepress/cache
3+
docs/.vitepress/dist

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
## abap2UI5-docs
1+
# abap2UI5-docs
22

33
Welcome! 👋
44

55
This repository contains the source files for the [abap2UI5 documentation](https://abap2ui5.github.io/docs/).
66

7-
#### Contributing
7+
## Contributing
88

99
We appreciate your help! If you spot a typo, want to improve existing content, or have ideas for new topics, feel free to open a pull request or issue.
1010

docs/.vitepress/config.mjs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ export default defineConfig({
2626
// Montserrat
2727
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
2828
['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
29-
['link', {
30-
rel: 'stylesheet',
31-
href: 'https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap'
29+
['link', {
30+
rel: 'stylesheet',
31+
href: 'https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap'
3232
}],
3333
// Optional: Fira Code
34-
['link', {
35-
rel: 'stylesheet',
36-
href: 'https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap'
34+
['link', {
35+
rel: 'stylesheet',
36+
href: 'https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&display=swap'
3737
}]
3838
],
3939
title: "abap2UI5",
@@ -48,7 +48,7 @@ export default defineConfig({
4848
},
4949
editLink: {
5050
pattern:
51-
"https://github.com/abap2UI5/abap2UI5-documentation/tree/main/docs/:path",
51+
"https://github.com/abap2UI5/docs/tree/main/docs/:path",
5252
text: "Edit this page on GitHub",
5353
},
5454
search: {
@@ -109,7 +109,7 @@ export default defineConfig({
109109
{ text: "Hello World", link: "/get_started/hello_world" },
110110
{ text: "Sample Apps", link: "/get_started/samples" },
111111
{ text: "Use Cases", link: "/get_started/use_cases" },
112-
{ text: `What's next?`, link: "/get_started/next" },
112+
{ text: `What's Next?`, link: "/get_started/next" },
113113
],
114114
},
115115
{
@@ -145,7 +145,7 @@ export default defineConfig({
145145
},
146146
{ text: "Messages, Errors", link: "/development/messages" },
147147
{ text: "Translation, i18n", link: "/development/translation" },
148-
{ text: "Popups, Popover", link: "/development/popups" },
148+
{ text: "Popups, Popovers", link: "/development/popups" },
149149
{
150150
text: "Specifics",
151151
collapsed: true,
@@ -170,7 +170,7 @@ export default defineConfig({
170170
link: "/development/specific/geolocation",
171171
},
172172
{ text: "URL", link: "/development/specific/url" },
173-
{ text: "Formatter", link: "/development/specific/formatter" },
173+
{ text: "Formatter", link: "/development/specific/formatter" },
174174
{ text: "CL_DEMO_OUTPUT", link: "/development/specific/demo_output" },
175175
],
176176
},
@@ -198,7 +198,7 @@ export default defineConfig({
198198
link: "/configuration/s4_public_cloud",
199199
},
200200
{ text: "Fiori Launchpad", link: "/configuration/launchpad" },
201-
{ text: "BTP Workzone", link: "/configuration/btp" },
201+
{ text: "BTP Work Zone", link: "/configuration/btp" },
202202
],
203203
},
204204
],
@@ -217,7 +217,7 @@ export default defineConfig({
217217
},
218218
{ text: "Local", link: "/advanced/local" },
219219
{ text: "RFC Connector", link: "/advanced/rfc" },
220-
{ text: "FE Integration", link: "/advanced/fiori" },
220+
{ text: "Fiori Elements Integration", link: "/advanced/fiori" },
221221
{
222222
text: "Extensibility",
223223
items: [
@@ -258,7 +258,7 @@ export default defineConfig({
258258
items: [
259259
{ text: "abapGit", link: "/technical/tools/abapgit" },
260260
{ text: "ajson", link: "/technical/tools/ajson" },
261-
{ text: "s-rtti", link: "/technical/tools/srtti" },
261+
{ text: "S-RTTI", link: "/technical/tools/srtti" },
262262
{ text: "abaplint", link: "/technical/tools/abaplint" },
263263
{ text: "open-abap", link: "/technical/tools/open_abap" },
264264
{ text: "abap-cleaner", link: "/technical/tools/abap_cleaner" },
@@ -272,7 +272,7 @@ export default defineConfig({
272272
link: "/resources/addons",
273273
collapsed: true,
274274
items: [
275-
{ text: "Addons", link: "/resources/addons" },
275+
{ text: "Add-ons", link: "/resources/addons" },
276276
{ text: "References", link: "/resources/references" },
277277
{ text: "Who Uses abap2UI5?", link: "/resources/who_uses" },
278278
{ text: "Releases", link: "/resources/changelog" },
@@ -287,7 +287,7 @@ export default defineConfig({
287287
outline: [2, 6],
288288
socialLinks: [
289289
{ icon: "linkedin", link: "https://www.linkedin.com/company/abap2ui5/" },
290-
{ icon: "github", link: "https://www.github.com/abap2UI5/abap2UI5" },
290+
{ icon: "github", link: "https://github.com/abap2UI5/abap2UI5" },
291291
],
292292
},
293293
});

docs/advanced/builds.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ outline: [2, 4]
33
---
44
# Builder
55

6-
If you use abap2UI5 extensively, you may consider creating your own build by defining a custom namespace and including the specific addons you need:
7-
- Use abap2UI5 in the `z2ui5` namespace for improvements and pull requests, while maintaining a separate namespace for your production version.
8-
- Install multiple instances of abap2UI5 and upgrade each version at its own pace.
9-
- Create a customized abap2UI5 build with frontend components and addons tailored to your specific scenario.
6+
For heavy abap2UI5 use, consider building your own version by defining a custom namespace and including the add-ons you need:
7+
- Use abap2UI5 in the `z2ui5` namespace for improvements and pull requests, and keep a separate namespace for your production version.
8+
- Install multiple instances of abap2UI5 and upgrade each one at its own pace.
9+
- Build a custom abap2UI5 release with frontend components and add-ons matched to your needs.
1010

1111
#### Builder
12-
Generate your own abap2UI5 build using the [builder](https://github.com/abap2UI5/builder).
12+
Make your own abap2UI5 build with the [builder](https://github.com/abap2UI5/builder).
1313

14-
<img width="700" alt="Screenshot 2025-03-02 at 14 44 06" src="https://github.com/user-attachments/assets/7c7f55d4-6667-4036-bc71-4cd7472f2ae9" />
14+
<img width="700" alt="abap2UI5 builder interface for generating custom namespaced builds" src="https://github.com/user-attachments/assets/7c7f55d4-6667-4036-bc71-4cd7472f2ae9" />

docs/advanced/downporting.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ outline: [2, 4]
33
---
44
# Downporting
55

6-
abap2UI5 works out of the box with ABAP version 750. If you're using a lower release, you can install the downported version, which is compatible with R/3 NetWeaver >702.
6+
abap2UI5 works right away on ABAP 7.50 and later. On an earlier release, install the downported version, which supports R/3 NetWeaver 7.02 and later.
77

88
#### Branch
9-
To install the project on an older system, use the `702` branch:
10-
| Branch | System |
9+
To install on an older system, use the `702` branch:
10+
| Branch | System |
1111
|-----------| ----------------------------|
12-
| main | S/4 Public Cloud, BTP ABAP Environment, S/4 Private Cloud, S/4 On-Premise, R/3 NetWeaver >750 |
13-
| 702 | R/3 NetWeaver >702 |
12+
| main | S/4 Public Cloud, BTP ABAP Environment, S/4 Private Cloud, S/4 On-Premise, R/3 NetWeaver ≥7.50 |
13+
| 702 | R/3 NetWeaver ≥7.02 |
1414

15-
Some sample projects and additional repositories also have a downported version. Simply check whether a `702` branch is available.
15+
Some sample projects and other repositories also ship a downported version. Check whether a `702` branch is available.
1616

1717
#### Functionality
18-
For more details on downport functionality, check out the blog post [Running abap2UI5 on older R/3 Releases](https://www.linkedin.com/pulse/running-abap2ui5-older-r3-releases-downport-compatibility-abaplint-mjkle).
18+
For more on the downport feature, see the blog post [Running abap2UI5 on older R/3 Releases](https://www.linkedin.com/pulse/running-abap2ui5-older-r3-releases-downport-compatibility-abaplint-mjkle).
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
---
22
outline: [2, 4]
33
---
4-
# Custom Controls
4+
# Custom Controls
55

6-
You can develop your own UI5 custom controls and use them in your abap2UI5 apps.
6+
You can build your own UI5 custom controls and use them in abap2UI5 apps.
77

8-
Set up your VS Code environment with the abap2UI5 frontend artifacts as described in the frontend chapter.
8+
First, set up your VS Code environment with the abap2UI5 frontend artifacts, following the [Frontend](/advanced/extensibility/frontend) page.
99

1010
#### Frontend
1111

12-
Create the JS code for your new custom control. You can copy and paste an existing custom control of this file and adjust it to your needs:
13-
https://github.com/abap2UI5/abap2UI5/blob/main/app/webapp/controller/App.controller.js
12+
Write the JS code for your new custom control. Copy an existing control from [App.controller.js](https://github.com/abap2UI5/abap2UI5/blob/main/app/webapp/controller/App.controller.js) and adapt it.
1413

15-
#### Backend
16-
Extend the custom control view class by adding an additional method and defining the properties of your custom control here:
14+
#### Backend
15+
Extend the custom control view class by adding a method and defining the new control's properties:
1716
[z2ui5_cl_xml_view_cc.clas.abap](https://github.com/abap2UI5/abap2UI5/blob/main/src/02/z2ui5_cl_xml_view_cc.clas.abap)
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
outline: [2, 6]
2+
outline: [2, 4]
33
---
44
# Custom JS
55

6-
If the standard UI5 framework functionalities do not fulfill all your requirements, you can define and call your own custom JavaScript functions. For example, this approach is used in the scanner section to play a sound after scanning.
6+
If the standard UI5 framework doesn't cover all your needs, define and call your own JavaScript functions. [Barcode Scanning](/development/specific/barcodes), for example, uses this approach to play a sound after a scan.
77

8-
The idea is to send the custom JavaScript function along with the view to the frontend and invoke it later when an event is triggered.
8+
The idea: send the JavaScript function with the view to the frontend, then call it later when an event fires.
99

10-
Below is a working example that you can use as a starting point. The `_generic` method creates an arbitrary XML/HTML element — here an HTML `<script>` tag (namespace `html`). The `_cc_plain_xml` method injects raw content into that element, in this case the JavaScript function definition. On the backend side, `client->follow_up_action` then executes the function by name on the frontend:
10+
Below is a starting point that works. The `_generic` method creates a custom XML/HTML element — here an HTML `<script>` tag (namespace `html`). The `_cc_plain_xml` method inserts raw content into that elementin this case, the JavaScript function definition. On the backend, `client->follow_up_action` then runs the function by name on the frontend:
1111

1212
```abap
1313
METHOD z2ui5_if_app~main.
@@ -16,7 +16,7 @@ Below is a working example that you can use as a starting point. The `_generic`
1616
DATA(view) = z2ui5_cl_xml_view=>factory( ).
1717
view->_generic( name = `script` ns = `html`
1818
)->_cc_plain_xml(
19-
|function myFunction() \{ console.log( `Hello World` ); \}|
19+
|function myFunction() \{ console.log( `Hello World` ); \}|
2020
).
2121
view->page(
2222
)->button( text = `call custom JS`
@@ -29,4 +29,4 @@ Below is a working example that you can use as a starting point. The `_generic`
2929
ENDIF.
3030
3131
ENDMETHOD.
32-
```
32+
```

docs/advanced/extensibility/frontend.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,31 @@ outline: [2, 4]
33
---
44
# Frontend
55

6-
The abap2UI5 frontend artifacts are stored in the app folder. If you want to make adjustments, follow these steps:
6+
The abap2UI5 frontend artifacts live in the `app` folder. To adjust them:
77

8-
#### Setup
9-
Open VS Code or an editor of your choice, use the terminal:
10-
```
8+
#### Setup
9+
Open VS Code (or your editor of choice), then run in the terminal:
10+
```sh
1111
git clone https://github.com/abap2UI5/abap2UI5
1212
cd app
1313
```
14-
Replace the backend with your abap system in all three files:
15-
16-
<img width="400" alt="Code 2024-11-22 07 44 12" src="https://github.com/user-attachments/assets/155c9a3f-8a0a-494b-8fc4-a4bba2bf0e90">
14+
Point all three files to your ABAP backend system:
1715

16+
<img width="400" alt="Frontend config files where the backend system URL must be replaced" src="https://github.com/user-attachments/assets/155c9a3f-8a0a-494b-8fc4-a4bba2bf0e90">
1817

19-
#### Develop & Test
20-
Set the correct backend system in the yamls <br>
21-
Replace "/sap/bc/z2ui5" with your endpoint in the manifest
22-
```
18+
#### Build & Test
19+
Set the backend system in the YAML files.<br>
20+
Replace `/sap/bc/z2ui5` with your endpoint in the manifest, then run:
21+
```sh
2322
npm i
2423
npm run start-noflp
2524
```
26-
This is the output in the terminal:
27-
<img width="1000" alt="388832058-b7df2e48-7bf4-4454-9d05-d2bc8c4a6b49" src="https://github.com/user-attachments/assets/3e0118e8-d05f-48d1-bcc0-28073adf6e47">
25+
You'll see output like this:
26+
<img width="1000" alt="npm run start-noflp output showing the local dev server running" src="https://github.com/user-attachments/assets/3e0118e8-d05f-48d1-bcc0-28073adf6e47">
2827

29-
30-
#### Before PR (optional)
31-
Transform UI5 App to stringified ABAP
32-
```
28+
#### Before PR (Optional)
29+
Convert the UI5 app to stringified ABAP:
30+
```sh
3331
cd ..
3432
npm run auto_app2abap
3533
```
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
---
22
outline: [2, 4]
33
---
4-
# User Exits
5-
6-
abap2UI5 contains predefined user exits which can be used to modify the standard behavior. The user exits are exposed by the interface [`Z2UI5_IF_EXIT`](https://github.com/abap2UI5/abap2UI5/blob/main/src/02/z2ui5_if_exit.intf.abap). To use them in your system you have to create a new class which implements the interface and its methods. They're called dynamically by abap2UI5 class [`Z2UI5_CL_EXIT`](https://github.com/abap2UI5/abap2UI5/blob/main/src/02/z2ui5_cl_exit.clas.abap). You should **not** include your class into abap2UI5 packages but in any other custom package.
7-
8-
The interface provides two exit methods:
9-
* **`set_config_http_get`** — called during the initial HTTP GET request (page load). Use it to customize frontend settings like the page title, UI5 theme, or UI5 version.
10-
* **`set_config_http_post`** — called on every subsequent HTTP POST request (each roundtrip). Use it to configure backend behavior like the draft expiration time.
11-
12-
Both methods receive a `cs_config` changing parameter whose fields you can set as needed. The following example changes the title, theme and the time drafts are saved in the backend:
13-
14-
```abap
15-
CLASS zcl_a2ui5_user_exit DEFINITION PUBLIC.
16-
17-
PUBLIC SECTION.
18-
INTERFACES z2ui5_if_exit.
19-
20-
ENDCLASS.
21-
22-
CLASS zcl_a2ui5_user_exit IMPLEMENTATION.
23-
24-
METHOD z2ui5_if_exit~set_config_http_get.
25-
26-
cs_config-title = `my title`.
27-
cs_config-theme = `sap_belize`.
28-
29-
ENDMETHOD.
30-
31-
METHOD z2ui5_if_exit~set_config_http_post.
32-
33-
cs_config-draft_exp_time_in_hours = 8.
34-
35-
ENDMETHOD.
36-
37-
ENDCLASS.
38-
```
4+
# User Exits
5+
6+
abap2UI5 offers predefined user exits for tweaking the standard behavior. The interface [`Z2UI5_IF_EXIT`](https://github.com/abap2UI5/abap2UI5/blob/main/src/02/z2ui5_if_exit.intf.abap) exposes the user exits. To use them on your system, build a class that implements the interface and its methods. The abap2UI5 class [`Z2UI5_CL_EXIT`](https://github.com/abap2UI5/abap2UI5/blob/main/src/02/z2ui5_cl_exit.clas.abap) calls them dynamically. Put your class in a custom package — **not** in the abap2UI5 packages.
7+
8+
The interface exposes two exit methods:
9+
- **`set_config_http_get`** — called on the initial HTTP GET request (page load). Use it to set frontend properties like the page title, UI5 theme, or UI5 version.
10+
- **`set_config_http_post`** — called on every later HTTP POST request (each roundtrip). Use it to set backend behavior like the draft expiration time.
11+
12+
Both methods take a `cs_config` changing parameter whose fields you can set as needed. The example below changes the title, the theme, and how long the backend keeps drafts:
13+
14+
```abap
15+
CLASS zcl_a2ui5_user_exit DEFINITION PUBLIC.
16+
17+
PUBLIC SECTION.
18+
INTERFACES z2ui5_if_exit.
19+
20+
ENDCLASS.
21+
22+
CLASS zcl_a2ui5_user_exit IMPLEMENTATION.
23+
24+
METHOD z2ui5_if_exit~set_config_http_get.
25+
26+
cs_config-title = `my title`.
27+
cs_config-theme = `sap_belize`.
28+
29+
ENDMETHOD.
30+
31+
METHOD z2ui5_if_exit~set_config_http_post.
32+
33+
cs_config-draft_exp_time_in_hours = 8.
34+
35+
ENDMETHOD.
36+
37+
ENDCLASS.
38+
```

docs/advanced/fiori.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
---
22
outline: [2, 4]
33
---
4-
# Integration to Fiori Element Apps
4+
# Integration into Fiori Elements Apps
55

6-
You can extend the object page of Fiori list report apps with an abap2UI5 app. A repository to showcase the use case can be found [here](https://github.com/axelmohnen/ABAP2UI5_COMP_CONT).
6+
Extend the object page of a Fiori list report app with an abap2UI5 app. See the [ABAP2UI5_COMP_CONT repository](https://github.com/axelmohnen/ABAP2UI5_COMP_CONT) for a complete example.
77

88
<img width="747" height="387" alt="abap2UI5 app embedded in Fiori Elements object page" src="https://github.com/user-attachments/assets/c14d5732-3b8c-4fa5-83ab-6d188a4d87db" />
99

10-
1110
### Guide
1211

13-
Follow the following steps:
14-
1512
1. Register the FLP integration in the component.js:
1613

1714
```javascript
18-
// Register ABAP2UI5 FLP integration for component container
15+
// Register abap2UI5 FLP integration for component container
1916
jQuery.sap.registerModulePath("z2ui5", "/sap/bc/ui5_ui5/sap/z2ui5");
2017
```
2118

@@ -38,16 +35,16 @@ sap.ui.core.Component.create({
3835
component: oComponent,
3936
async: true
4037
});
41-
38+
4239
// Add component container to your VBox
4340
var oVBox = that.getView().byId("VBoxId")
4441
oVBox.destroyItems();
4542
oVBox.addItem(oCompContainer);
46-
43+
4744
//Overwrite default height of object page section
4845
var oSection = that.getView().byId("[This is the ID of your object page section::Section]");
4946
oSection.addStyleClass("customSectionHeight");
50-
47+
5148
});
5249
```
5350

@@ -69,7 +66,7 @@ sap.ui.core.Component.create({
6966

7067
5. Create abap2UI5 app class
7168

72-
On the ABAP side, the app receives the Fiori startup parameters (such as the app class name and any custom key-value pairs) via `client->get( )-t_comp_params`. The `check_initialized` flag ensures the parameters are only read once on the first roundtrip. Setting `backgrounddesign = 'List'` gives the page a white background that blends in with the Fiori object page:
69+
On the ABAP side, the app receives the Fiori startup parameters (like the app class name and any custom key-value pairs) via `client->get( )-t_comp_params`. The `check_initialized` flag ensures the parameters are read only once, on the first roundtrip. Setting `backgrounddesign = 'List'` gives the page a white background matching the Fiori object page:
7370
```abap
7471
METHOD z2ui5_if_app~main.
7572

0 commit comments

Comments
 (0)