Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  program editing →  Testing and Checking Programs →  Checkpoints 

LOG-POINT

Quick Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


LOG-POINT ID group 
          [SUBKEY sub]
          [FIELDS val1 val2 ...].

Extras

1. ... ID group

2. ... SUBKEY sub
3. ... FIELDS val1 val2 ...

Effect

This statement defines a static logpoint whose activation is controlled using the addition ID.

Once the program reaches an active logpoint, an entry is created in the log that is also used by the statement ASSERT and the program execution proceeds with the statement after LOG-POINT. During this process, any existing entry of the same LOG-POINT statement is overwritten by default. Each time an entry is written, a counter for the entry is incremented. The log can be evaluated using transaction SAAB .

No log entry is written for an inactive logpoint and the program execution proceeds with the statement after LOG-POINT.


Notes

  • Alongside the static logpoints defined using LOG-POINT, dynamic logpoints can be defined using the transaction SDLP or in the ABAP Development Tools (ADT).
  • Logpoints are only designed to be used for test purposes in the transaction SAAB. There is no API for importing the logged data, which means that logpoints are not suitable for general logging purposes.

Addition 1

... ID group

Effect

The addition ID controls the activation of the logpoint from outside the program using a checkpoint group group or an activation variant . The same rules apply when specifying the checkpoint group as for the statement ASSERT. The possible operation modes for logpoints are inactive and logging.

Addition 2

... SUBKEY sub

Effect

If SUBKEY is specified, the content of sub is stored in the log as a subkey. Existing log entries of the same LOG-POINT statement are only overwritten if the subkeys have the same content. If SUBKEY is not specified, the subkey is initial.

sub is a character-like expression position of which the first 200 characters are evaluated. An expression or function specified here is executed only if the logpoint is active.

Addition 3

... FIELDS val1 val2 ...

Effect

After the addition FIELDS, a list of values val1 val2 ... (no reference variables) can be specified that are used in the log.

val1 val2 ... are functional operand positions in which data objects or functional methods can be specified. The methods are executed only if the logpoint is active.


Note

The size of each data object saved in the log with the FIELDS addition is restricted by the profile parameter abap/aab_log_field_size_limit. The value of the profile parameter specifies the size in bytes. The default value is 1,024. The value 0 means there is no restriction. When a log entry is generated, the content of each data object is truncated when this limit is reached, and full lines are removed from internal tables.


Example

Static logpoint with all possible additions.

LOG-POINT ID demo_checkpoint_group 
             SUBKEY sy-uname 
             FIELDS sy-batch sy-cprog.