Log Display


Function module



Display messages in memory




Display profile


Log header data filter criteria


Message data filter criteria


Context data filter criteria


Log handle table


Message handle table


What information can be displayed?

You can imagine the set of messages in memory as an extremely wide table with a large number of fields (the data is not really stored in this way). The fields in this table are:

·        Message line (MSGTY, MSGID, MSGNO, MSGV1, EXCLS, and so on)

·        Message attributes (PROBCLASS, DETLEVEL, etc.)

·        Message context fields

·        Message texts

i.         formatted message line

ii.       field long texts ("very important" for problem class 1, etc.)

·        data of log header to which this message belongs

i.         Log header data (EXTNUMBER, USER, DATUM, etc.)

ii.       Fields of all log header contexts

iii.      Log header texts (field long texts)

·        External data, e.g. material short text, added by user in a callback routine

The displayable fields are listed in the structure BAL_S_SHOW. This structure does not contain the context fields or the external data which Application Log cannot know a priori.


This data must be presented to the user appropriately. The data formatting can be controlled by specifying a profile.  This profile is a caller-defined complex data type (structure BAL_S_PROF) which is passed to the output module BAL_DSP_LOG_DISPLAY, not an end-user-defined display variant.

The format is based on certain assumptions:

·        The messages are displayed in a list. The list contains a subset of the displayed fields. This subset can be specified in a field catalog in the display profile BAL_S_PROF (as in ABAP List Viewer).

·        Detail information can be called to each message:

i.         Message long text

ii.       Extended long text or callback routine

iii.      Technical message information (message type, work area, message number, etc.)

·        The set of messages can be found (search) or restricted (filter) with the ABAP List Viewer functions. You can also restrict the data set quickly by message type (A, E; W; I/S) in the list header. Show or hide, e.g. the I and S messages by clicking on icons.

·        You can also add a navigation hierarchy tree because the messages list can be very long and confusing. This tree is a sort on message set contents page. You can list the messages in a node by clicking on it or a pushbutton. You can specify the tree structure in the display profile.

Function module BAL_DSP_LOG_DISPLAY

The transaction SLG1 performs the standard display of Application Log in the database. It displays the logs in a standard form.

The log display must often be different, depending on the application, and you may need to display logs which have not been saved.

We assume that a set of logs and their messages, which were either collected or loaded from the database (function module BAL_DB_LOAD), are in memory.

The data can be displayed by calling the function module  BAL_DSP_LOG_DISPLAY. It is a display generator which you tell:

what is to be displayed (filter criteria BAL_TP_FILTERS)

how the data is to be displayed (display profile BAL_S_PROF)

·        I_AMODAL
whether to display in a new session.

If you display in a new session, you lose control of the program. You cannot refresh the log display.

Program SBAL_DEMO_04 demonstrates several log display possibilities.

What is to be displayed?

The data set to display is specified in the importing parameters:

·        Log filter criteria

i.         I_S_LOG_FILTER: log header field ranges

ii.       I_S_LOG_CONTEXT_FILTER: log header context field ranges

iii.      I_T_LOG_HANDLE: Log handle table

·        Message filter criteria

i.         I_S_MSG_FILTER: message field ranges

ii.       I_S_MSG_CONTEXT_FILTER: message context field ranges

iii.      I_T_MSG_HANDLE: Message handle table

The filters are the data types which are used to search for messages and logs. If filtering is not sufficient, you can specify the set of dat to be displayed by a set of log and message handles which you selected by criteria.

If you specify several parameters, they are linked by a logical AND. Only those messages are displayed which satisfy all conditions. If no parameters are specified, all messages in memory are displayed.

How is the data to be displayed?

The display profile (structure BAL_S_PROF) specifies how the logs are displayed. It contains field catalogs which describe which fields are to be in the list and in the levels of the navigation tree.

Application Log provides display profiles which you can get with function modules (starting with BAL_DSP_PROFILE_...). You can also create your own display profiles. If no display profile is specified, the standard display profile from transaction SLG1 is used.

The most important display profile fields (all fields except MESS_FCAT are optional) are:

General parameters




Screen title


Message list field catalog. This field catalog contains the table name and field name (REF_TABLE, REF_FIELD) and e.g. the column in which the field is to appear (COL_POS) and its length (OUTPUTLEN).


Message sort sequence table. Contains tables and field names, sequence number and sort ascending or descending flag. The fields must be in MESS_FCAT.

Navigation tree parameters




You can create a navigation tree next to (or above) the message list. This tree sorts the message set by specified criteria (e.g. document and item number). You must specify the sort criteria in the field catalogs for navigation tree levels 1 to maximum 9 (e.g. document number for level 1 and item number for level 2). Several fields can be combined into one sort criterion at one level (e.g. shipping point/loading point at level 1), so you can specify a field catalog and not just one field for each level. The field catalog has the same structure as MESS_FCAT.


Chapter level sort sequence table.

Callback routines

You can use callback routines (FORM routines or function modules) at certain events in the log display.  The events are:




Read external data for display (e.g. material short text)


Read external data for display (e.g. material short text)


Perform user commands


Called before performing a user command


Called after performing a user command


Display PBO (e.g. to set a user status)

User pushbuttons




You can put your own pushbuttons in the menu with this component, without having to define your own GUI status. When you choose a User command at PAI, "%EXT_PUSH1", ..., "%EXT_PUSH4", to which you can react in a callback routine (see CLBK_UCOM), is called.