Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  program editing →  Dynamic Program Editing →  Source Code →  Internal Statements for Source Code Processing 

SYNTAX-CHECK FOR PROGRAM

Other versions: 7.31 | 7.40 | 7.54

This statement is for internal use only. It must not be used in application programs.

Syntax


SYNTAX-CHECK FOR PROGRAM prog 
                 MESSAGE mess LINE lin WORD wrd
                 [WITH CURRENT SWITCHSTATES]
                 [error_handling]
                [REPLACING itab]
                 [SHORTDUMP-ID sid]
                 [TRACE-TABLE trt]
                 [ID id TABLE idt]
                 [FILTER flt].

Extras

1. ... REPLACING itab

2. ... SHORTDUMP-ID sid

3. ... TRACE-TABLE trt

4. ... ID id TABLE idt
5. ... FILTER flt

Effect

This statement performs a syntax check for the program specified in prog. prog must be a character-like data object which contains the name of an existing ABAP program. If the program specified does not exist, then sy-subrc is set to the value 8. The system uses the properties of the program specified for the syntax check. The additions MESSAGE, LINE, WORD and error_handling as well as the return values in sy-subrc are subject to the same rules as the statement SYNTAX-CHECK FOR itab.

Addition 1

... REPLACING itab

Effect

For itab you must specify a standard table without secondary keys of table type SREPTAB with line type SREPTABLN from the ABAP Dictionary which contains a replacement list for the include programs specified in the program being checked. Each include program specified after INCLUDE in the program contained in prog is searched for in the column NAME of the internal table. If the name is found, the syntax check does not include the specified include program but instead the source code contained in the table-like column SCR_INCLUDE. The properties used for the check are taken from the structure named in the column TRDIR.

Addition 2

... SHORTDUMP-ID sid

Addition 3

... TRACE-TABLE trt

Addition 4

... ID id TABLE idt

Addition 5

...FILTER flt

Effect

These additions work as described in SYNTAX-CHECK - Internal Additions.