ABAP Keyword Documentation → ABAP - Reference → program editing → Dynamic Program Editing → Source Code → SYNTAX-CHECK
SYNTAX-CHECK - error_handling
Other versions: 7.31 | 7.40 | 7.54
Syntax
... [INCLUDE incl]
[OFFSET off]
[MESSAGE-ID mid] ...
Extras
1. ... INCLUDE incl
2. ... OFFSET off
3. ... MESSAGE-ID mid
Effect
These additions can be used for analyzing the syntax errors identified using the statement SYNTAX-CHECK
.
Addition 1
... INCLUDE incl
Effect
If one or more include
programs are included in the source code contained in itab
, and one of
these programs contains the first syntax error of the checked program, the name of this include program
is assigned to the variable incl
. incl
must be a character-like data object.
Addition 2
... OFFSET off
Effect
If the source code in itab
contains one or more syntax errors, the offset
of the first token with errors in relation to the line in the source code is assigned to the variable
off
. off
expects the data type i
.
Addition 3
... MESSAGE-ID mid
Effect
If the source code in itab
contains one or more syntax errors, the key under
which the first error message in the database table TRMSG is stored is assigned to the variable mid
.
The key of the database table TRMSG is made up of the components SPRAS of length 1, KEYWORD of length 20, and MSGNUMBER of length 4. The component MSGNUMBER is used for a three-character ID. The fourth position can contain a blank character or a letter. For error messages with multiple parts that occupy more than one line in TRMSG, all parts have the same three-character ID, while the fourth character indicates a part of the message.
The data object mid
must have the data type TRMSG_KEY
from ABAP Dictionary, constructed from the components SPRAS with length 1, KEYWORD with length 20, and MSGNUMBER with length 3.
Note
In obsolete
non-Unicode programs, mid
can have any structure constructed like TRMSG_KEY or be a
flat character-like data object.