‎2007 Nov 14 10:44 AM
Hi all,
I have some problem with the SAP application log.
I would like to create a log and write message to the log and at last close my log
The problem is when i created log first time messages are written in the log as well. But when I created a new log my messages are written wihin the previous log and no message have been witten within the new log.
Is it necessary to call a commit work after saving message into a log? Or is there a standard function to close the log? For instance I used the function BAL_DB_SAVE to write message in my log and then to close it.
Thanks in advance for your answer.
Regards,
Philippe
‎2007 Nov 14 10:54 AM
hi Philippe,
i think you need to create new log with different object or different subobject name.
if u create this by same name, the message will be written in the old log only.
also check whether you are saving the log when you finish with all your messages.
here is a code to the save the log.
If log created, save to database
if e_bal_hndl is not initial.
refresh: bal_hndl.
append e_bal_hndl to bal_hndl.
call function 'BAL_DB_SAVE'
exporting
i_client = sy-mandt
i_in_update_task = 'X'
i_t_log_handle = bal_hndl
importing
e_new_lognumbers = log_no
exceptions
log_not_found = 1
save_not_allowed = 2
numbering_error = 3
others = 4.
‎2007 Nov 14 10:54 AM
hi Philippe,
i think you need to create new log with different object or different subobject name.
if u create this by same name, the message will be written in the old log only.
also check whether you are saving the log when you finish with all your messages.
here is a code to the save the log.
If log created, save to database
if e_bal_hndl is not initial.
refresh: bal_hndl.
append e_bal_hndl to bal_hndl.
call function 'BAL_DB_SAVE'
exporting
i_client = sy-mandt
i_in_update_task = 'X'
i_t_log_handle = bal_hndl
importing
e_new_lognumbers = log_no
exceptions
log_not_found = 1
save_not_allowed = 2
numbering_error = 3
others = 4.