-
Notifications
You must be signed in to change notification settings - Fork 12
/
z_sitfra_2016_.prog.abap
57 lines (42 loc) · 1.58 KB
/
z_sitfra_2016_.prog.abap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
*&---------------------------------------------------------------------*
*& Include z_sitfra_2016_
*&---------------------------------------------------------------------*
" For demonstration purposes we extent the standard class
" usually you'll have a custom z-class
CLASS lcl_log DEFINITION INHERITING FROM cl_sbal_logger.
PUBLIC SECTION.
METHODS:
if_logger~add_message REDEFINITION,
add_text IMPORTING i_text TYPE csequence.
ALIASES: add_message FOR if_logger~add_message.
PRIVATE SECTION.
DATA: mt_messages TYPE bal_tt_msg.
ENDCLASS.
CLASS lcl_log IMPLEMENTATION.
METHOD if_logger~add_message.
INSERT VALUE #( msgty = i_msgty
msgid = i_msgid
msgno = i_msgno
msgv1 = i_msgv1
msgv2 = i_msgv2
msgv3 = i_msgv3
msgv4 = i_msgv4
probclass = i_probcl ) INTO TABLE mt_messages.
super->if_logger~add_message(
EXPORTING
i_msgid = i_msgid " Message Class
i_msgno = i_msgno " Text field
i_probcl = i_probcl " Application Log: Message Problem Class
i_msgty = i_msgty " Message Type
i_msgv1 = i_msgv1 " Message Variable
i_msgv2 = i_msgv2 " Message Variable
i_msgv3 = i_msgv3 " Message Variable
i_msgv4 = i_msgv4 ).
ENDMETHOD.
METHOD add_text.
add_message( i_msgid = 'BC'
i_msgno = '701'
i_msgty = 'S'
i_msgv1 = i_text ).
ENDMETHOD.
ENDCLASS.