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 that contains the name of an existing ABAP program. If the program specified does not exist, sy-subrc is set to 8. The attributes of the specified program are used for the syntax check. The additions MESSAGE, LINE, WORD, and error_handling as well as the return codes in sy-subrc are subject to the same rules as the statement SYNTAX-CHECK FOR itab.

Addition 1

... REPLACING itab

Effect

itab specifies a standard table without secondary keys of table type SREPTAB with the row type SREPTABLN from ABAP Dictionary, containing a replacement list for the include programs specified in the checked program. Each include program specified after INCLUDE in the program specified in prog is found in the column NAME of the internal table. If the name is found, the syntax check does not include the specified include program but the source code in the table-like column SCR_INCLUDE instead. The attributes used for the check are taken from the structure specified 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.