SYNTAX-CHECK - error_handling

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 integrated in the source code contained in itab, and one of these programs contains the first syntax error of the subroutine pool, the name of this include program is assigned to the variable incl. incl must be a character-type (before release 6.10 flat) 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 text is assigned to the variable off. For off, the data type i is expected.

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 character can contain a blank character or a letter. For error messages with several 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.

In Unicode programs mid must have the data type TRMSG_KEY from the ABAP Dictionary, which has been available since release 6.10 and which is made up of the components SPRAS of length 1, KEYWORD of length 20, and MSGNUMBER of length 3. In non-Unicode systems, an appropriate structure or a flat character-type data object can be entered.