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/logging.md
+44-51Lines changed: 44 additions & 51 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, 6]
3
3
---
4
4
# Logging, BAL
5
5
6
-
Logging is essential for developing end-user business processes. In ABAP systems, the standard tool for this is the Business Application Log, which is supported in both on-premise systems and ABAP Cloud (via new APIs). With abap2UI5 you can use the BAL functions as you would do it in classic development. to display logs just create a table with the entries or use predefinded popups of the framework.
6
+
Logging is essential for developing end-user business processes. In ABAP systems, the standard tool for this purpose is the Business Application Log (BAL), supported in both on-premise systems and ABAP Cloud (via new APIs). With abap2UI5, you can use BAL functions just as you would in classic development and create a table with the entries or use predefined popups provided by the framework.
7
7
8
-
######BAL structure
9
-
In on-premise ABAP systems, you can use the classic BAL APIs. As no specific logging object exists, simply import the BAL table into `z2ui5add_cl_bal_cl`:
10
-
```abp
8
+
##### BAL Variables
9
+
In ABAP classic, you can use the classic BAL function modules and display the BAL table with the popup `z2ui5_cl_pop_messages`:
10
+
```abap
11
11
METHOD z2ui5_if_app~main.
12
12
13
13
DATA(lt_bal) = VALUE bal_t_msgr(
@@ -18,73 +18,66 @@ METHOD z2ui5_if_app~main.
18
18
19
19
```
20
20
21
-
######ABAP Cloud Log
22
-
Similar to messages you can display bal log directly in the message_popup. Just drop the into it:
21
+
##### ABAP Cloud
22
+
In ABAP cloud, you can just import the logging object into the message popup:
you can also use the abap logger in the it is built in an running
50
-
In on-premise systems, you also have the option to install the open-source project [**abap-logger**](https://github.com/ABAP-Logger/ABAP-Logger), which simplifies logging with BAL. Here’s an example of how to use it with abap2UI5:
47
+
##### abap-logger
48
+
In on-premise systems, you also have the option to use the fantastic open-source project [**abap-logger**](https://github.com/ABAP-Logger/ABAP-Logger). This tool simplifies working with BAL logs and integrates seamlessly with abap2UI5. Here’s an example:
51
49
```abap
52
-
CLASS z2ui5add_cl_abap_logger_sample DEFINITION PUBLIC FINAL
53
-
CREATE PUBLIC .
54
-
55
-
PUBLIC SECTION.
56
-
INTERFACES z2ui5_if_app.
57
-
58
-
ENDCLASS.
59
-
60
-
CLASS z2ui5add_cl_abap_logger_sample IMPLEMENTATION.
Compared to T100 messages, BAL logs include more detailed information, such as timestamps. You can also use the BAL log popup to display this information. All the examples above can be used as is, but for the popup app, you should use the `z2ui5_cl_pop_bal` popup instead:
77
65
78
-
#### BAL Popup
79
-
Comparet to T100 the BAL log contains a lot more specific information. You can also use the ballog popup to get more detailed information.
80
-
81
-
82
-
In ABAP Cloud environments, the BAL includes a new API. Use this API to import logging objects directly into the class `z2ui5add_cl_bal_cl` to display messages:
This popup is in its early stages, with basic functionality currently available. If you’ve implemented BAL functionality with abap2UI5, consider sharing your work! Contributions and pull requests are welcome.
81
+
This popup is still in its early stages, offering basic functionality. If you’ve implemented BAL features with abap2UI5, consider sharing your work! Contributions and pull requests are always welcome.
0 commit comments