Skip to Content
0
Feb 25, 2011 at 04:18 PM

LOG functionality issue in ABAP screen

185 Views

Hi,

I am creating a log in a sub-screen using the following flow logic:-

1. Create log using FM 'BAL_LOG_CREATE'

2. Adding messages using FM 'BAL_LOG_MSG_ADD'

3. Create a display profile where the column is set as Message text from stru BAL_S_SHOW-T_MSG

4. Initialization of display profile using FM 'BAL_DSP_OUTPUT_INIT'

5. And finally setting the data to be displayed using FM 'BAL_DSP_OUTPUT_SET_DATA'

Though everything works fine and log gets generated but in the message text column i get the message no, message class also which i need to suppress which i am not able to figure out how.

Below you can find the subroutine called for each message:-

FORM LOG_MSG_ADD USING

value(i_log_handle) TYPE balloghndl.

DATA: l_s_msg TYPE bal_s_msg.

  • define data of message for Application Log

l_s_msg-msgty = sy-msgty.

l_s_msg-msgid = sy-msgid.

l_s_msg-msgno = sy-msgno.

l_s_msg-msgv1 = sy-msgv1.

l_s_msg-msgv2 = sy-msgv2.

l_s_msg-msgv3 = sy-msgv3.

l_s_msg-msgv4 = sy-msgv4.

  • add this message to log file

CALL FUNCTION 'BAL_LOG_MSG_ADD'

EXPORTING

i_log_handle = i_log_handle

i_s_msg = l_s_msg

EXCEPTIONS

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.

ENDIF.

ENDFORM.

Kindly suggest me pointers.

Thanks,

Jatin