Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding BAL_LOG_CREATE

0 Likes
756

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.

5 REPLIES 5
Read only

Former Member
0 Likes
708

Please give me reward points..

Read only

0 Likes
708

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.

Read only

0 Likes
708

yes sham you have call this every time after creating log file

i ll send you code for this

Read only

0 Likes
708

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.

Read only

0 Likes
708

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.