Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2.
Choose Table view - Other view. A structure overview is displayed for selection.
3.
Position the cursor on "Sub-objects", and choose Choose. The sub-object display window for the chosen object is displayed.
4.
5.
Enter a sub-object name (beginning with "Y" or "Z") and a descriptive short text.
6.
/BA1/B0
SubObject -
DEFAULT
*"
*" TABLES
*"
*"---------------------------------------------------------------------FIELD-SYMBOLS:
<lv_msg> TYPE bapiret2.
DATA:
lv_message(300) TYPE c,
ls_log
TYPE bal_s_log,
lv_loghandle
TYPE balloghndl,
lt_loghandle
TYPE bal_t_logh.
* open log
ls_log-object
= fi_object.
ls_log-subobject = fi_subobject.
ls_log-aluser
= sy-uname.
ls_log-alprog
= sy-repid.
"#EC *
EXPORTING
i_s_log
= ls_log
IMPORTING
e_log_handle = lv_loghandle
EXCEPTIONS
OTHERS
= 1.
message_v1. ENDIF.
IF NOT <lv_msg>-message_v2 IS INITIAL. REPLACE FIRST OCCURRENCE OF '&' IN lv_message WITH <lv_msg>message_v2. ENDIF.
IF NOT <lv_msg>-message_v3 IS INITIAL. REPLACE FIRST OCCURRENCE OF '&' IN lv_message WITH <lv_msg>message_v3. ENDIF.
IF NOT <lv_msg>-message_v4 IS INITIAL. REPLACE FIRST OCCURRENCE OF '&' IN lv_message WITH <lv_msg>message_v4. ENDIF.
CALL FUNCTION 'BAL_LOG_MSG_ADD_FREE_TEXT'
EXPORTING
i_log_handle
= lv_loghandle
i_msgty
= <lv_msg>-type
i_text
= lv_message
EXCEPTIONS
log_not_found
=1
msg_inconsistent
log_is_full
=2
=3
OTHERS
= 4.
ENDLOOP.
INSERT lv_loghandle INTO TABLE lt_loghandle.
CALL FUNCTION 'BAL_DB_SAVE'
EXPORTING
i_save_all
=''
i_t_log_handle = lt_loghandle
EXCEPTIONS
log_not_found
=1
save_not_allowed = 2
numbering_error = 3
OTHERS
= 4.
ENDFUNCTION.
Results
Lets execute the function module with default parameters
FI_OBJECT
FI_SUBOBJECT
/BA1/B0
DEFAULT
"#EC *
"#EC *
For getting into more details of Application log you have following Function Groups in hand.
Create application log - Function group SLG0
Display application log - Function group SLG3
Read application log