Ansicht
Dokumentation

BAL_S_PARM - Application log: Parameters

BAL_S_PARM - Application log: Parameters

CL_GUI_FRONTEND_SERVICES - Frontend Services   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book


The Application Log can contain message header and message detail display parameter information, which can be used in two ways:

  • As "extended long text"
    If the T100 message long text is not sufficient because more than the 4 message variables are needed, you can enter an additional 'Text in Dialog' containing any number of place holders, which are passed in the table PARAMS-T_PAR, in the field PARAMS-ALTEXT, with transaction SE61.
    The form routine MSG_ADD_WITH_EXTENDED_LONGTEXT in the program SBAL_DEMO_02 contains an example.
  • As callback routine
    If you specify a callback routine to display your own detail information, in PARAMS-CALLBACK, it is called in the detail display.

An Application Log callback routine can be realized in two ways:
as a FORM routine or as a function module
The following fields must be specified to setup a callback routine:
USEREXITT: Routine type (' ' = FORM, 'F' = function module)
USEREXITP: Program containing the routine (only for FORM)
USEREXITF: Routine name (form routine or function module name)
A function module must be parameterized like a form routine (USING is replaced by IMPORTING). The same parameter names must be used.

|---------------------------------------------------------------------|
| Further Callback Routine Information |
|---------------------------------------------------------------------|

BAL_CALLBACK_DETAIL_LOG
======================================================================

Purpose and event
This callback routine can display user log header detail information. It is called when the cursor is positioned on a log header row and ‘Detail’ is chosen, in the log display.

Definition
The callback routine is set for each log header when a log is created by BAL_LOG_CREATE. The I_S_LOG-PARAMS-CALLBACK field must be set in the transfer structure I_S_LOG (structure BAL_S_LOG).

Parameterization
FORM bal_callback_detail_log
       TABLES
         i_t_params  STRUCTURE spar.
...
ENDFORM.

The internal table I_t_params contains the fields:
PARAM,,(CHAR10),,Parameter name
VALUE,,(CHAR75),,Parameter contents.
I_t_params contains the parameters created under BAL_S_LOG-PARAMS-T_PAR for a log.
The table also contains the log number under the name '%LOGNUMBER'.

If this information is insufficient, you can get the data which describes the currently selected objects in the log display, with the function module BAL_DSP_USER_COMMAND_DATA_GET.
This data includes the handle of the current log (E_S_USER_COMMAND_DATA-TREE_LOGH).
You can use this value to get more log data (e.g. with the function module BAL_LOG_HDR_READ).

Example program
The program SBAL_CALLBACK is an example and template.
You can e.g. select BAL_CALLBACK_DETAIL_LOG in the selection screen of this program. You go to the debugger if:
- this callback routine is defined
- this callback routine is processed
You can also search for the string "BAL_CALLBACK_DETAIL_LOG" in the program coding.

BAL_CALLBACK_DETAIL_MSG
======================================================================

Purpose and event
This callback routine can display user message detail information. It is called when the cursor is positioned on a message row and ‘Detail’ is chosen, or the detail icon next to the message is chosen.

Definition
The callback routine is set for each message when it is sent by BAL_LOG_MSG_ADD. The I_S_MSG-PARAMS-CALLBACK field must be set in the importing parameter I_S_MSG (structure BAL_S_MSG).

Parameterization
FORM bal_callback_detail_msg
       TABLES
         i_t_params  STRUCTURE spar.
...
ENDFORM.

The internal table I_t_params contains the fields:
PARAM,,(CHAR10),,Parameter name
VALUE,,(CHAR75),,Parameter contents.
I_t_params contains the parameters created under BAL_S_MSG-PARAMS-T_PAR for a message (e.g. using BAL_LOG_MSG_ADD).
The table also contains the log number under the name '%LOGNUMBER', and the four message variables ('V1' to 'V4').

If this information is insufficient, you can get the data which describes the currently selected objects in the log display, with the function module BAL_DSP_USER_COMMAND_DATA_GET.
This data includes the handle of the current message (E_S_USER_COMMAND_DATA-LIST_MSGH).
You can use this value to get more log data (e.g. with the function module BAL_LOG_MSG_READ).

Example program
The program SBAL_CALLBACK is an example and template.
You can e.g. select BAL_CALLBACK_DETAIL_MSG in the selection screen of this program. You go to the debugger if:
- this callback routine is defined
- this callback routine is processed
You can also search for the string "BAL_CALLBACK_DETAIL_MSG" in the program coding.

Further information

Overview of the most important function groups

Quick start documentation

Application Log: Technical documentation






BAL Application Log Documentation   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 6933 Date: 20240512 Time: 194943     sap01-206 ( 85 ms )