Callback Routine Overview

You can affect the program flow at various events in the application log by using callback routines. Callback routines can be FORM routines or function modules. Program SBAL_CALLBACK is an example (and parameterization template).

BAL_CALLBACK_DISPLAY

Specifies how a message appears when it is created.

The definition is in the parameter I_S_CONFIGURATION of the function module BAL_GLB_CONFIG_SET in the field I_S_CONFIGURATION-DISPLAY-CALLBACK. A visualization routine is delivered with the standard system (function module BAL_MSG_DISPLAY_ABAP).

BAL_CALLBACK_DETAIL_LOG

This callback routine displays user detail information for a log header. It is called when the cursor is set on a log header line in the log display and the Detail pushbutton is selected.

The callback routine is set per log header when the log is created with BAL_LOG_CREATE. You must set the field I_S_LOG-PARAMS-CALLBACK in the transfer structure I_S_LOG (structure BAL_S_LOG).

BAL_CALLBACK_DETAIL_MSG

This callback routine displays user detail information for a message. It is called when the cursor is set on a log message line in the log display and the Detail pushbutton is selected. You can also select the Detail icon next to the message.

The callback routine is set for each message when the message is triggered with BAL_LOG_MSG_ADD. You must set the field I_S_MSG-PARAMS-CALLBACK in importing parameter I_S_MSG (structure BAL_S_MSG).

BAL_CALLBACK_READ

This callback routine reads log display data, e.g. material short text. The routine is called for each message and field defined as external in the field catalog. Read the data buffered to avoid performance problems. You cannot perform a prefetch or process the table of data to be read subsequently at once because the data is constructed dynamically.

The display profileI_S_DISPLAY_PROFILE (structure BAL_S_PROF) is passed to the log display (e.g. called by BAL_DSP_LOG_DISPLAY). The callback routine is defined in the field I_S_DISPLAY_PROFILE-CLBK_READ. It is called for all fields which have the attribute IS_EXTERN = 'X' in field catalogs LEV1_FCAT, ..., LEV9_FCAT, or MESS_FCAT.

BAL_CALLBACK_PBO

This callback routine sets a user log display menu. You can put additional application-specific elements in the log display. It is called at log display PBO.

It is defined in the display profile, field CLBK_PBO.

BAL_CALLBACK_UCOMM, ...BEFORE_UCOMM, ..._AFTER_UCOMM

BAL_CALLBACK_UCOMM is called when a command which does not belong to Application Log is called at PAI. BAL_CALLBACK_BEFORE_UCOMM is called for such commands and some standard commands, before the command is performed. BAL_CALLBACK_AFTER_UCOMM similarly, after performance.

The definitions are as follows:

BAL_CALLBACK_UCOMM Field CLBK_UCOM in the display profile
BAL_CALLBACK_BEFORE_UCOMM Field CLBK_UCBF in the display profile
BAL_CALLBACK_AFTER_UCOMM

Field CLBK_UCAF in the display profile

BAL_CALLBACK_TOOLBAR

If ALV logs are displayed with Grid Control (parameter USE_GRID = 'X' in display profile), you can modify the toolbar above the ALV grid in this routine. You can put additional application-specific elements in the log display.

This routine is called when:

  • the toolbar is created

  • a toolbar button is pressed.

It is defined in the display profile, field CLBK_TOOLB.