Skip to Content
avatar image
Former Member

SLG1 - different message than posted


I've encountered a big problem with logging in my report to SLG1 via functions BAL_LOG_MSG_ADD and BAL_DB_SAVE - after using function BAL_DB_SAVE message in SLG1 is different than posted by me:

But in SLG1 it appears as:

Type of message is correct (Informations and Warnings), but text is different and I have no clue where in code this message was replaced. I tried to debug standard code of function BAL_DB_SAVE but couldn't find place where this message was replaced. I invoke adding messages in loop and commiting messages at the end of each iteration - logging runtime of creating documents - and this is not only one occourence of a problem:

Sy-SUBRC is always 0 after finishing BAL_LOG_MSG_ADD and BAL_DB_SAVE, and ABAP Support Package is SAPKA74008. The invocation of function BAL_DB_SAVE is provided below:

Have you ever encounter similar problem?

Kind regards,


Add comment
10|10000 characters needed characters exceeded

  • Can you add the code where BAL_LOG_MSG_ADD is called and the content of the actual parameters?

  • Former Member

    Good morning,

    I'm developing my program in ABAP OOP, so I've created separated class for logger and methods to reuse them in whole my program. Object of logger (go_log) is global, and initialized at start of program.

    I'm calling a method like this (for case provided with earlier post):

    Where text-117 is: "Starting creating Document with ID: ", and <ls_document>-doc_id is 849.

    Below I provided implementation of method, which I call:

    Method "add_msg" is used only to add to "queue" and is protected:

    In debug everything seems to be fine, but finally in slg1 message is "*** SLED/Date of Production **********************************".

    The correct flow of logging should look like this for this section:

    This problem is reapeatable for running program with same parameters on selection screen - with every run messages are always in the same lines of log.

  • Get RSS Feed

1 Answer

  • Jun 12, 2017 at 02:24 PM

    How did you fill the i_s_msg structure, and did you insure the handle, get from BAL_LOG_CREATE in parameter e_log_handle, is correctly passed to BAL_LOG_MSG_ADD and appended once to table parameter i_t_log_handle of BAL_DB_SAVE?

    Add comment
    10|10000 characters needed characters exceeded