‎2007 Oct 18 10:08 AM
Hi All,
I have one question regarding the usage. Do I need to call this method every time I add the message using BAL_LOG_MSG_ADD??
Thanks in advance,
Sham.
‎2007 Oct 18 10:33 AM
‎2007 Oct 18 10:48 AM
Hi Murali,
My question is not answered still. It gives me details that i have already looked into. After this I got a doubt.
Thanks,
Sham.
‎2007 Oct 18 11:07 AM
yes sham you have call this every time after creating log file
i ll send you code for this
‎2007 Oct 18 11:14 AM
FORM log_add_msg USING pu_log_handle TYPE balloghndl
msgtype TYPE char1
msgno LIKE sy-msgno
l_msg TYPE char100 .
Add Message to Application Log
DATA:
ls_msg TYPE bal_s_msg.
CHECK: NOT pus_msg-type IS INITIAL.
ls_msg-msgty = msgtype.
ls_msg-msgid = '/BMW/GIS_TP_PAR01'.
ls_msg-msgno = msgno.
ls_msg-msgv1 = l_msg.
ls_msg-msgv2 = pus_msg-message_v2.
ls_msg-msgv3 = pus_msg-message_v3.
ls_msg-msgv4 = pus_msg-message_v4.
*
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
i_log_handle = pu_log_handle
i_s_msg = ls_msg
EXCEPTIONS
log_not_found = 0
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
MESSAGE s000(/bmw/gis_tp_par01) WITH 'Message added to log'
pc_log_handle.
ENDIF.
ENDFORM.
‎2007 Oct 18 11:17 AM
since 'i_s_msg' parameter is a work area u need to pass message each time with log handle...
u can do one thing to avoid call again and again...put all messages in internal table and then
loop i_messages into wa_message.
CALL BAL_LOG_CREATE for each workarea.
endloop.