File tree Expand file tree Collapse file tree 1 file changed +66
-0
lines changed
Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ # Logging
2+
3+ ## Use Cases
4+
5+ ### 1. UI for abap-logger
6+
7+ UI for the Open Source Project [ ** abap-logger** ] ( https://github.com/ABAP-Logger/ABAP-Logger )
8+
9+ ``` abap
10+ CLASS z2ui5add_cl_abap_logger_sample DEFINITION PUBLIC FINAL
11+ CREATE PUBLIC .
12+
13+ PUBLIC SECTION.
14+ INTERFACES z2ui5_if_app.
15+
16+ ENDCLASS.
17+
18+ CLASS z2ui5add_cl_abap_logger_sample IMPLEMENTATION.
19+
20+ METHOD z2ui5_if_app~main.
21+
22+ DATA: log TYPE REF TO zif_logger.
23+ log = zcl_logger_factory=>create_log( object = 'ZINTERFACES'
24+ subobject = 'ACCOUNTING'
25+ desc = 'Stuff imported from legacy systems' ).
26+
27+ log->e( 'You see, what had happened was...' ).
28+
29+ client->nav_app_call( z2ui5add_cl_abap_logger_ui=>display_popup( log ) ).
30+
31+ ENDMETHOD.
32+
33+ ENDCLASS.
34+ ```
35+
36+ ### 2. POPUP for BAL Messages
37+
38+ ``` abap
39+ CLASS z2ui5add_cl_abap_logger_sample DEFINITION PUBLIC FINAL
40+ CREATE PUBLIC .
41+
42+ PUBLIC SECTION.
43+ INTERFACES z2ui5_if_app.
44+
45+ ENDCLASS.
46+
47+ CLASS z2ui5add_cl_abap_logger_sample IMPLEMENTATION.
48+
49+ METHOD z2ui5_if_app~main.
50+
51+ DATA: log TYPE REF TO zif_logger.
52+ log = zcl_logger_factory=>create_log( object = 'ZINTERFACES'
53+ subobject = 'ACCOUNTING'
54+ desc = 'Stuff imported from legacy systems' ).
55+
56+ log->e( 'You see, what had happened was...' ).
57+
58+ client->nav_app_call( z2ui5add_cl_abap_logger_ui=>display_popup( log ) ).
59+
60+ ENDMETHOD.
61+
62+ ENDCLASS.
63+ ```
64+
65+ <br >
66+ <img width =" 800 " alt =" SAPGUI 2024-09-05 08 00 51 " src =" https://github.com/user-attachments/assets/02c6a23a-e4cc-4439-afa0-7842897c8468 " >
You can’t perform that action at this time.
0 commit comments