Callback Routine Overview

Use

You can affect the program flow at various events in Application Log with callback routines.

Callback routines can be FORM routines or function modules.

The program SBAL_CALLBACK is an example (and parameterization template).

Procedure

BAL_CALLBACK_DISPLAY

Specifies how a message appears when it is created. For example, all messages (or some) are put in an amodal window, so that you are constantly informed about the progress of the program.

This solution is not yet available.

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.

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 it is sent, e.g. by BAL_LOG_MSG_ADD. You must set the field I_S_MSG-PARAMS-CALLBACK in the importing parameter I_S_MSG (structure BAL_S_MSG).

BAL_CALLBACK_READ

This callback routine reads log display data, e.g. material short text. It is called for messages and fields which are defined as external in the field catalog. Read 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 profile I_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 the field catalogs LEV1_FCAT, ..., LEV9_FCAT or MESS_FCAT.

BAL_CALLBACK_PBO

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

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 in

  • BAL_CALLBACK_UCOMM in the display profile, field CLBK_UCOM
  • BAL_CALLBACK_BEFORE_UCOMM in the display profile, field CLBK_UCBF
  • BAL_CALLBACK_AFTER_UCOMM in the display profile, field CLBK_UCAF

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 include other 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.