Ansicht
Dokumentation

BAL_CH_DISPLAY_FUNCTION -

BAL_CH_DISPLAY_FUNCTION -

Addresses (Business Address Services)   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

|---------------------------------------------------------------------|
| Log display: Function module BAL_DSP_LOG_DISPLAY |
|---------------------------------------------------------------------|

Overview
======================================================================

Function modules:
BAL_DSP_LOG_DISPLAY Display logs

Types
BAL_S_PROF Display profile
BAL_S_LFIL Filter criteria for log header data
BAL_S_MFIL Filter criteria for message data
BAL_T_CFIL Filter criteria for context data
BAL_T_LOGH Log handle
BAL_T_MSGH Message handle table

Function module BAL_DSP_LOG_DISPLAY
======================================================================

Functionality

The transaction SLG1 displays database Application Logs in a standard format.

Logs must often be output in a different, application-dependent format, and logs which have not been saved must also be displayed.

Assume that a set of logs containing messages, which were either collected or loaded from the database (BAL_DB_LOAD), is in memory.

This data can be displayed by calling the function module BAL_DSP_LOG_DISPLAY, passing:

  • I_S_LOG_FILTER, ... I_T_MSG_HANDLE
    What is to be displayed (via filter criteria)
  • I_S_DISPLAY_PROFILE
    How the data is to be displayed (via a display profile)
  • I_AMODAL
    Whether the display is in another session.
  • I_SRT_BY_TIMSTMP
    Whether the logs are sorted by timestamp.

==>Note
You lose program control of displays in a new session and cannot refresh the log display.

The exporting parameter E_S_EXIT_COMMAND gives information on why the log display has been left.

Example

Prgram SBAL_DEMO_04 shows various ways of displaying logs ( ==>Run ==>Coding).

WHAT is to be displayed?
======================================================================

The IMPORTING parameters determine the dataset to be displayed by specifying the:

  • log filter criteria

  • message filter criteria

The filters are the same data types as are used to search for messages and logs.
If specifying filters is not sufficient, you can specify the dataset to be displayed by specifying a set of log and message handles which you have collected by your own criteria.

  • If you specify several parameters, they are linked by a logical AND, so only those messages which satisfy all conditions are displayed.
  • If you only specify log filter criteria, all messages in memory whose log headers satisfy the specified criteria are displayed (logs containing no messages can also be displayed).
  • If there are only message criteria, all messages in memory which satisfy these criteria are displayed.
  • If none of these 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 log is to appear. It contains the field catalog, which describes which fields are in the list and in the various chapter levels of the navigation tree.

The Application Log provides predefined display profiles which you can get with function modules (see here).
You can also construct your own display profile. If no display profile is specified, the standard display profile of transaction SLG1 is chosen.
The display profile contains the following fields (all fields are optional except MESS_FCAT):

  • General parameters
  • LANGU
    Log output language

  • TITEL
    Screen title

  • USE_GRID
    Messages are to be displayed with the ALV Grid Control, not the standard ALV (ignored if the display uses Grid Control by default).

  • NO_TOOLBAR
    'X': The toolbar above the ALV grid is hidden (only meaningful if USE_GRID = 'X').
    If you manipulate the toolbar, you can insert your own buttons (see EXT_PUSH1, ..., EXT_PUSH4) or completely modify the toolbar (see CLBK_TOOLB).

  • START_COL, START_ROW, END_COL, END_ROW
    Coordinates if the log is displayed in a popup.
    POP_ADJST
    If this parameter is 'X', the system adjusts the dialog box height
    (if the log is displayed in a dialog box) to the data to be displayed. The values entered above are then upper limits.

  • NOT_EMPTY
    If this parameter is 'X', branches which are just one entry and all data (in the field catalog) are initial, are not displayed.
    Example:
    As document 1000013 initially has no position-dependent messages, the tree is initially (by document and item numbers):
    Document 1000012
    -- Item 0010
    -- Item 0020
    Document 1000013
    -- Item 0000
    Document 1000014
    -- Item 0010
    If NOT_EMPTY = 'X' the entry "Item 0000" is omitted because all fields after it are initial (including invisible ones).

  • COLORS
    Problem class display colors. COLORS-PROBCLASS1 = "3" e.g. highlights all problem class 3 messages in yellow (standard).
    Message list parameters

  • MESS_FCAT
    Message list field catalog (table type BAL_T_FCAT with structure BAL_S_FCAT).
    All fields of the structure BAL_S_SHOW and message or log header context fields can be displayed.

  • MESS_SORT
    Message sort sequence table (table type BAL_T_SORT with structure BAL_S_SORT).
    Contains table and field name, serial number and sort ascending or descending flag. Fields mentioned here must have been previously mentioned in MESS_FCAT.

  • SHOW_ALL
    "X": all messages are immediately visible in the list and need not be selected in the tree first.

  • MESS_MARK
    "X": messages selectable via checkbox

  • CWIDTH_OPT
    Optimize message list column width

  • DISVARIANT
    Structure DISVARIANT: List viewer display variant data (Report name, handle, etc.)
    Note: if other ALV lists (or ALV grids) are displayed in the same program, you should use the handle to avoid confusing the diaplay variants of the various lists.

  • Navigation tree parameters
  • LEV1_FCAT, ..., LEV9_FCAT
    Field catalogs for chapter levels 1 to 9 (table type BAL_T_FCAT with structure BAL_S_FCAT).
    You can display all fields of the structure BAL_S_SHOW and message or log header context fields.

  • LEV1_SORT, ..., LEV9_SORT
    Chapter level sort sequence table (table type BAL_T_SORT with structure BAL_S_SORT).

  • HEAD_TEXT, HEAD_SIZE
    CHAR/INTEGER: Contents and width of the tree header

  • ROOT_TEXT
    CHAR: Root node text (only to be used in exceptional cases. The root node should not be a header, which should be in HEAD_TEXT).

  • TREE_SIZE
    INTEGER Tree Control size (in CHARACTER). This value is only approximate because of proportional font.

  • TREE_ONTOP
    "X": tree control is displayed above the message list

  • TREE_ADJST
    "X": if the tree is above the messages ( TREE_ONTOP = 'X'), try to adjust the hight of the tree to the number of rows to be displayed. TREE_SIZE is the maximum hight of the tree.

  • EXP_LEVEL
    1,.., 9 the level to which the tree is to be expanded

  • BYDETLEVEL
    "X": construct navigation tree by message field DETLEVEL.

  • TREE_NOMSG
    "X": the tree contains no message data. It consists exclusively of log header data.

  • Callback routines
    The callback routines are defined according to the DDIC structure BAL_S_CLBK.
  • CLBK_READ
    Read external display data (e.g. material short text)
    (see here).

  • CLBK_UCOM
    Perform user commands
    (see here).

  • CLBK_UCBF
    Called BEFORE performing a user command
    (see here).

  • CLBK_UCAF
    Called AFTER performing a user command
    (see here).

  • CLBK_PBO
    Display PBO (e.g. to set a user status)
    (see here).

  • CLBK_TOOLB
    Modification of toolbar using ALV Grid
    (USE_GRID = 'X' is prerequisite)
    (see here).

  • User pushbuttons
  • EXT_PUSH1, ..., EXT_PUSH4
    These components put user pushbuttons in the menu, without having to define a GUI status. Choosing one of these pushbuttons at PAI calls the user command "%EXT_PUSH1", ... "%EXT_PUSH4", to which you can react in the corresponding callback routine. A pushbutton definition has the following elements:
    EXT_PUSH1-ACTIVE = "X":,,pushbutton is active
    EXT_PUSH1-DEF-TEXT,, ,,pushbutton text
    EXT_PUSH1-DEF-ICON_ID,,pushbutton icon
    EXT_PUSH1-DEF-ICON_TEXT,,icon text
    EXT_PUSH1-DEF-QUICKINFO,,quick info
    EXT_PUSH1-DEF-PATH,, ,,fastpath
    EXT_PUSH1-POSITION,, ,,position at which the button is to appear
    ,, ' ': in the application toolbar
    ,, '3': in the toolbar above the message list on the left
    ,, (only if USE_GRID = 'X')
    ,, '4': in the toolbar above the message list on the right
    ,, (only if USE_GRID = 'X')

Field catalog BAL_T_FCAT
======================================================================

The field catalog BAL_T_FCAT defines the fields in the message list and in the various levels of the navigation tree in the Application Log display.
A field catalog entry (structure BAL_S_FCAT) contains the following information:

  • REF_TABLE, REF_FIELD
    Table field name of the field to be displayed (e.g. BAL_S_SHOW-PROBCLASS).
    All fields from the structure BAL_S_SHOW can be displayed and also fields from the context of the message or the log header.
    These two fields are required, all others are optional.
  • COL_POS
    Position at which this field is to be displayed.
    Note: the Application Log puts the error seriousness icon in the first column by default. This column is fixed and is in all outputs (for recognizability). The delivered standard profile starts with column 2 (e.g. for the field T_MSG, message text). The message long text and detail icons are also automatically added.
    If you change a standard profile and insert a column before the message text (in position 2), the column positions of the other fields must be incremented by 1.
  • OUTPUTLEN
    Output length
  • HOTSPOT
    'X': Field is hotspot (only possible in the list of messages).
  • COLTXT_ADD, COL_SEP
    Each navigation tree level should normally only display a small number of fields (ideally only one) to avoid overloading the user with unnecessary information. The name of a field cannot be a navigation tree column header, because it can have up to 9 levels, but you can put the field name in front of the field contents by setting the COLTXT_ADD flag to ‘X’ in the field catalog. You can also put a separator (e.g. a colon) between the field name and the value (COL_SEP = ‘:’).
    Example: ‘Problem class: 1’ instead of only ‘1’.
  • COLTEXT, COLDDICTXT, CLTXT_LEN
    You can specify the text before a field (or above a column) in COLTEXT. It is normally got from DDIC as specified in COLDDICTXT (COLDDICTXT = "L", "M", "S", "R" specifies whether the long, medium or short field name or the header is to be taken). CLTXT_LEN specifies the length.
  • IS_TREECOL
    You can only put fields with a column header next to the tree at level 1, by setting the field IS_TREECOL to ‘X’.
  • IS_EXTERN
    Some fields are not in a message or its context, but they can be derived from it. For example, if the material number is in the context, you can get the material short text in the callback routine BAL_CALLBACK_READ, which handles all fields which are flagged IS_EXTERN = "X" in the field catalog.
  • NO_OUT
    Some fields are technical and should not be displayed (z.B. LOG_HANDLE). Flag them as NO_OUT.
  • TECH
    'X': Field is a technical field and does appear in the field selection catalog.

Sort catalog BAL_T_SORT
======================================================================

The sort catalog BAL_T_SORT defines the message or navigation tree entry sort sequence in the Application Log display.
A sort catalog entry (structure BAL_S_SORT) contains the following information:

  • REF_TABLE, REF_FIELD
    Table field name to be displayed (e.g. BAL_S_SHOW-PROBCLASS)
    ==>Note
    This field MUST be in the message or chapter level field catalog.
  • SPOS
    Sort sequence
  • UP, DOWN
    Sort in ascending or descending order





rdisp/max_wprun_time - Maximum work process run time   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 19009 Date: 20240510 Time: 000257     sap01-206 ( 133 ms )