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/navigation.md
+44-4Lines changed: 44 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,51 @@ outline: [2, 4]
3
3
---
4
4
# Navigation
5
5
6
-
### Backend
6
+
In abap2UI5, each application is represented by a single ABAP class. While you can embed all logic within a single class and call different views or popups within it, it is generally better practice to keep individual classes manageable in size. This can be achieved by creating multiple classes that interact with each other, allowing you to build reusable, generic applications and popups that can be called in various contexts.
7
7
8
+
### Backend
9
+
To call an ABAP class, use the following code:
10
+
```abap
11
+
METHOD z2ui5_if_app~main. root app
12
+
DATA(lo_app) = NEW z2ui5_cl_demo_app_025( ).
13
+
client->nav_app_call( lo_app ).
14
+
ENDMETHOD.
15
+
```
16
+
The framework maintains a call stack. In the newly called class, you can return to the previous application using:
17
+
```abap called app
18
+
METHOD z2ui5_if_app~main.
19
+
client->nav_app_leave( ).
20
+
ENDMETHOD.
21
+
```
22
+
If you need to access data from the previous application, use casting as follows:
client->message_box_display( `Input made in the previous app:` && lo_called_app->mv_input ).
28
+
ENDIF.
29
+
ENDMETHOD.
30
+
```
31
+
To navigate to an application without adding it to the call stack, use:
32
+
```abap
33
+
METHOD z2ui5_if_app~main. root app
34
+
DATA(lo_app) = NEW z2ui5_cl_demo_app_025( ).
35
+
client->nav_app_call( lo_app ).
36
+
ENDMETHOD.
37
+
```
38
+
::: tipp
39
+
Sound familiar? The abap2UI5 framework is designed to emulate the classic “call screen” and “leave to screen” logic.
40
+
:::
8
41
9
42
### Launchpad
10
-
11
-
43
+
It is recommended to use backend communication exclusively for view changes or popup calls. If you’re using a launchpad, consider navigating through the launchpad to utilize browser navigation and history. Here’s an example:
To learn more about launchpads and routing, refer to the documentation (here.)[configuration/launchpad]
12
52
### Frontend
13
-
In app
53
+
Further frontend navigation features, including back button support with routing, are currently a work in progress. Track updates (here.)[https://github.com/abap2UI5/abap2UI5/issues/1420]
0 commit comments