Show TOC

TABLEBUF_TRACE( StackOn|StackOff ) Locate this document in the navigation structure

Semantics

Switches the table buffer trace on before the first statement in the current ABAP source code line is processed. The trace is switched off automatically before a next ABAP statement is processed (that starts at any other line or is executed in another procedure).

By means of the function’s argument, you have, in addition, the option to switch on or switch off the tracing of the ABAP stack (as a part of the table buffer trace’s capability).

Note that it can also happen that the table buffer trace has already been activated with such an additional option (for switching the ABAP stack on or off) by means of the transaction ST05 - that is: independent from the function TABLEBUF_TRACE () used by dynamic logpoints. The ABAP stack is written to the table buffer trace if, at least, one activation has switched on the ABAP stack capability.

Return value

1 - If the table buffer trace has been switched on successfully.

0 - If the table buffer trace could NOT be switched on.

Return values have ABAP type I

Argument

This function can have only one argument of ABAP type C with length = 1.

The argument may contain the values ‘X’ or ‘ ‘, with the following meaning :

‘X’ - In addition to the SQL trace, it also switches on tracing for the ABAP

stack (Default value).

‘ ’ - Switches additional tracing for the ABAP stack off.

If a value other than ‘X’ or ‘ ‘ is specified, the value ‘ ‘ for the argument is assumed.

If no argument is specified, the ‘X’ value is assumed (default value).

If an argument of a type other than ABAP type C with length = 1 is specified, the string ’<INVALID_SYMBOL>’ is returned by the function.

For better code readability, usage of the built-in constants StackOn and S tackOff is recommended:

sql_trace( StackOn ) or sql_trace( StackOff )

Note that these built-in constants are defined in the scope of the parameter list of built-in functions used in dynamic logpoints only. This means they are not valid inside standard ABAP code, nor can they be used as normal variables in conditions of dynamic logpoints, in the key, or in the results fields section outside the parameter list of built-in functions.