2008 Dec 18 5:45 AM
Hi,
I have used the Function Module - BAL_LOG_MSG_ADD.
But when i try to find the Logs using transaction "slg1", it says no logs found in the database.
Is there any other Function Module which persist the Logs in the database.
Thanks
Piyush
2008 Dec 18 5:57 AM
HI ,
use the FM: BAL_LOG_CREATE
BAL_DSP_LOG_DISPLAY
BAL_DB_SAVE
BAL_DSP_MSG_LONGTEXT
AND ALSO refer the following link it will solve your problem :
http://help.sap.com/saphelp_nw04/Helpdata/EN/bb/6811f980ae11d3966f00a0c930660b/content.htm
regards
rahul
Edited by: RAHUL SHARMA on Dec 18, 2008 6:59 AM
Hi,
I have used the Function Module - BAL_LOG_MSG_ADD.
But when i try to find the Logs using transaction "slg1", it says no logs found in the database.
Is there any other Function Module which persist the Logs in the database.
Thanks
Piyush
2008 Dec 18 5:57 AM
HI ,
use the FM: BAL_LOG_CREATE
BAL_DSP_LOG_DISPLAY
BAL_DB_SAVE
BAL_DSP_MSG_LONGTEXT
AND ALSO refer the following link it will solve your problem :
http://help.sap.com/saphelp_nw04/Helpdata/EN/bb/6811f980ae11d3966f00a0c930660b/content.htm
regards
rahul
Edited by: RAHUL SHARMA on Dec 18, 2008 6:59 AM
2008 Dec 18 6:08 AM
Hi,
Try this:
BAL_DB_SEARCH
Find logs in the database
BAL_DB_LOAD
Load logs from the database
Thanks & Regards,
Krishna...
2008 Dec 18 7:08 AM
Hi,
Here is a piece of coding ...use it to your effect
DATA: lv_object TYPE balobj_d VALUE 'INVRPT',
lv_suboject TYPE balsubobj VALUE 'ZMI39',
create a function module ZPCO_1453_ERROR_HANDLING
constants :
lc_mstyp_E type msid value 'E',
lc_probclass_1 type BALPROBCL value '1',
lc_mstyp_w type msid value 'W',
lc_probclass_2 type BALPROBCL value '2'.
DATA: lv_loghead TYPE bal_s_log.
DATA: lv_loghandle TYPE BALLOGHNDL.
DATA: ls_logmsg TYPE bal_s_msg.
DATA: ls_message TYPE bal_s_msg.
DATA: lt_log_handle TYPE bal_t_logh,
ls_log_handle LIKE LINE OF lt_log_handle.
*initialize the log object/subobject (lv_loghandle is a global variable)
lv_loghead-EXTNUMBER = EXTERNAL_ID.
lv_loghead-object = OBJECT.
lv_loghead-subobject = SUBOBJECT.
lv_loghead-aldate_del = sy-datum + 90. "expires in 90 days
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
i_s_log = lv_loghead
IMPORTING
e_log_handle = lv_loghandle
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 1.
RAISE OTHERS.
ENDIF.
*add the messages to the log
Loop at MESSAGE into ls_message.
if ls_message-MSGTY = lc_mstyp_w.
ls_message-PROBCLASS = lc_probclass_2.
endif.
if ls_message-MSGTY = lc_mstyp_E.
ls_message-PROBCLASS = lc_probclass_1.
endif.
MOVE-CORRESPONDING ls_message to ls_logmsg.
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
i_log_handle = lv_loghandle
i_s_msg = ls_logmsg
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 1.
RAISE OTHERS.
ENDIF.
ENDLOOP.
*save the log
ls_log_handle = lv_loghandle.
APPEND ls_log_handle TO lt_log_handle.
CALL FUNCTION 'BAL_DB_SAVE'
EXPORTING
i_t_log_handle = lt_log_handle
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC = 1.
RAISE OTHERS.
ENDIF.
Pass your data to this function module..
CALL FUNCTION 'ZPCO_1453_ERROR_HANDLING'
EXPORTING
object = lv_object
subobject = lv_suboject
MESSAGE = lv_message1.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |