Skip to Content
avatar image
-3
Former Member

BAL_LOG_MSG_ADD not displaying complete message

Hi
I am using BAL_LOG_MSG_ADD to add message to the log but the ALV in the log is not displaying the complete message. How can i display the complete message in the logs?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Nov 04, 2016 at 07:04 AM

    BAL_LOG_MSG_ADD doesn't display anything, SLG1 and some of the BAL* FM can display data.

    If you correctly fill the parameters, the message should be correctly displayed, did you map fields' value in your code or did you use a tool like cl_ops_ehp_mapping_helper=>map_bapiret2_to_bal_s_msg, also the four parameter of a message are limited in size to 50 characters.

    NB: The displayed tree has limitations too, but there is easily found options to display a message in a pop-up.

    There is a trick to add information, you can add one "context" structure (not too wide) to the message that can be displayed in SLG1, map a structure to context-value (max length 256, if possible use char type, Unicode use method cl_abap_container_utilities=>fill_container_c) and the ddic reference name to context-tabname.

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

    • Double-click or click on display icon trigger two pop-up (if that was not as easy as I supposed)

      • Double-click : display message as for any transaction when you double-click on the lower displayed message
      • Click on display icon: display technical data of cursor selected item, those related to message itself and the fields values of the context structure

      Regards,
      Raymond

  • avatar image
    Former Member
    Oct 25, 2016 at 09:36 AM
    -2

    It is a grid display.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 25, 2016 at 11:10 AM
    -2

    Dear Pratishtha Bhatnagar,

    Please Let us know clearly about your Query.

    Why you are using this FM?

    What you are displaying in Report Output?

    Here from this FM, you are importing parameters are,

    E_S_MSG_HANDLE - Message handle

    E_MSG_WAS_LOGGED - Message collected

    E_MSG_WAS_DISPLAYED - Message output

    Here Logged and Displayed parameter is boolean. Msg_Handle is type of structure BALMSGHNDL.

    In that structure two fields Log_Handle and Msgnumber.

    Those fields length is only 22 characters.

    So you should receive that export parameters with same character length variable.

    data: Msg_handle LIKE BALMSGHNDL OCCURS 0 WITH HEADER LINE,

    I_LOG_HANDLE type BALLOGHNDL,

    I_S_MSG type BAL_S_MSG.

    CALL FUNCTION 'BAL_LOG_MSG_ADD'
    EXPORTING
    I_LOG_HANDLE = I_LOG_HANDLE

    i_s_msg = i_s_msg

    IMPORTING
    E_S_MSG_HANDLE = MSG_HANDLE

    * E_MSG_WAS_LOGGED =
    * E_MSG_WAS_DISPLAYED =
    * EXCEPTIONS
    * LOG_NOT_FOUND = 1
    * MSG_INCONSISTENT = 2
    * LOG_IS_FULL = 3
    * OTHERS = 4
    .
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.

    Thanks,

    Sivaraj Sadasivam.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 25, 2016 at 01:33 PM

    We are using this FM to log error messages in SLG1. so when i am looking for the error message in SLG1 the message is not displayed completely. Some part of it is truncated because of which we are not able to know about the reason of error.

    Add comment
    10|10000 characters needed characters exceeded