This statement is for internal use only.
Incompatible changes or further developments may occur at any time without warning or notice.
SYNTAX-CHECK FOR itab ...MESSAGE f ...LINE g ...WORD h.
Parts marked with " ..." are interchangeable
1. ... PROGRAM
f1
2. ...
INCLUDE f2
3. ...
OFFSET f3
4.
... TRACE-TABLE itab1
5.
... DIRECTORY ENTRY f4
6.
... REPLACING f5
7. ...
FRAME ENTRY f6
8. ...
MESSAGE-ID f7
9. ...
ID id TABLE itab2
10....
SHORTDUMP-ID f8
11.... FILTER f9
Syntax check for programs
The program code is taken from the internal
table itab. itab
must have the table type STANDARD. If a syntax error is
detected during the check, the fields f, g and h are filled as follows:
f and h are declared as text fields and g as an integer.
DATA: f(240),
g TYPE I,
h(72).
The Return Code is set as follows:
... PROGRAM f1
Specifies a program name
If the addition DIRECTORY ENTRY is missing, the program name is used to determine the program attributes required for the check, e.g.:
The field f1 is meant to contain the field attributes of SY-REPID.
... INCLUDE f2
If there is a syntax error, this field contains the name of the include program where the error occurred.
The field f2 is meant to contain the field attributes of SY-REPID.
... OFFSET f3
If there is a syntax error, this field contains the position of the incorrect word in the incorrect line.
The field f3 should be declared as an integer.
... TRACE-TABLE itab1
Trace output is stored in this table. To switch trace output on or off during program checks, you use
the SYNTAX-TRACE ON and SYNTAX-TRACE OFF statements.
... DIRECTORY ENTRY f4
The program attributes required for the check are taken from the field
f4
which must correspond to the structure of the table TRDIR.
... REPLACING f5
The field f5 is meant to contain the field attributes of SY-REPID.
The program code placed in the internal table is an include, not the main program. Therefore, it is
the main program specified under PROGRAM which is to be
checked. If this program contains an include named f5,
the contents of the internal table should be taken into account instead.
You should use this addition only with PROGRAM.
... FRAME ENTRY f6
The main program attributes required for the check (e.g. logical database, program type) are taken from
the field f6. f6 should have the structure of the table TRDIR.
... MESSAGE-ID f7
If a syntax error occurs, the field f7 contains the relevant
message key which has a structure similar to the table TRMSG.
... ID id TABLE itab2
Returns syntax check information. id contains the type
of information written to the internal table itab2.
For
correction proposals (
ID 'CORR'), the type group SLIN
must be included, for other information the type group SYNT.
Both these type groups contain the necessary type specifications.
Please do not use this
addition. It is intended only for internal use!
id outputs the following information from the program code:
... SHORTDUMP-ID f8
If a short dump occurs, the key of that short dump is returned in the field f8. This key consists of at most 30 characters.
... FILTER f9
Includes only those ABAP statements in the check specified using the filter specification f9. The specification must have the type SYNT_FILTER from the type group SYNT. Possible values are: