ABAP Keyword Documentation → ABAP - Release-Specific Changes → Changes in Release 7.0 and its EhPs → Changes in Release 7.0
Syntax Cleanup in Release 7.0
For Release 7.0, the ABAP syntax has been cleaned up. Incorrect language constructs, which previously only led to syntax warnings, now cause syntax errors. The profile parameter abap/warn2error_release can be used to control whether the new syntax errors continue to be reported as syntax warnings.
The following tables show the situations that lead to syntax errors as of Release 7.0. An "X" in the final column of the table indicates that the syntax in question already led to a syntax error in classes before Release 7.0.
Errors in Language Construct |
---|
Program Layout |
Statement cannot be reached. |
Missing forward declaration of a class using CLASS - DEFERRED . |
Declarations |
Program-internal name with more than 30 characters. |
Special characters in a program-internal name in obsolete ABAP (non-Unicode). |
Single digit as the name of a data object. |
Incorrect namespace prefix. |
Operational statement within the definition of astructure with BEGIN OF ... END OF . |
Reference to a data type of the master program in a publicparameter interface |
Reference to a data type of the master program in the declaration of a public attribute of a global class |
Incompatible or non-convertible value specified after DEFAULT for a formal parameter. |
An interface parameter of a function module, which has been defined both as input and output parameter, was declared with different or generic types. |
A type of a type group has the same name as an existing type in ABAP Dictionary. |
A constant in a type group has the same name as an existingflat structure or table in ABAP Dictionary. |
A macro in atype group does not have the name of the type group as a prefix. |
A reserved component name such as the pseudo component table_line is used in a structure in ABAP Dictionary. |
Internal table with the predefined name screen . |
ABAP Objects |
Unknown global class or interface after GLOBAL FRIENDS . |
IMPORTING , CHANGING , or RECEIVING specified in dynamic CREATE OBJECT . |
Missing call of the instance constructor of thesuperclass in the instance constructor of asubclass. |
Instance component accessed before the call of theinstance constructor of thesuperclass in the instance constructor of asubclass. |
Short form meth( a ) with a non-unique assignment to a formal parameter. |
Fixture method in test class is not private. |
Selector ->> used instead of theinstance component selector -> when calling interface methods. |
Operators and Additions |
Invalid one-character operator in a comparison expression, which has temporarily been interpreted as an abbreviation, for example, as E for EQ . |
AND or OR at the end of alogical expression not followed by a logical expression. |
More than one LENGTH addition after DESCRIBE FIELD . |
Addition SORTED BY specified after COLLECT . |
Addition LANGUAGE specified after CREATE OBJECT for OLE. |
Additions AND SKIP FIRST SCREEN and USING both specified after CALL TRANSACTION . |
Addition OBJECT missing after AUTHORITY-CHECK . |
More than ten FIELD additions after AUTHORITY-CHECK . |
Operand Positions |
Operand cannot be converted in assignment. |
Operand that cannot be converted to a number at a numeric operand position (for example, after DECIMALS for ASSIGN ). |
Length less than or equal to zero in the offset/length specification for fields of fixed length. |
Empty offset/lengths specified. |
Superfluous trailing blanks in text field literals. |
Line-spanning text field literal. |
Line-spanning element of a bulleted list. |
Invalid use of a text symbol as the target of a call. |
Internal table does not have the structure of aranges table in acomparison expression after IN . |
sy-subrc assigned to a CHANGING , EXPORTING , or RETURNING parameter. |
Data object passed to a formal parameter typed using STRUCTURE in a program of ABAP language versionStandard ABAP (Unicode), where thefragment view does not match completely. |
Data object specified whose name contains an address specification such as aninstance component selector or anoffset/length specification,without an explicit assignment to a parameter when using EXPORT , IMPORT ,or CALL DIALOG . |
Internal Tables |
Table type defined for ahashed table without specifyingUNIQUE before KEY . |
Non-index table specified after SEARCH . |
Incompatible work area for group level processing using internal tables with AT and SUM . |
Component of a structured field symbol specified as a sort criterion after SORT . |
Database Accesses |
Columns of type STRING or RAWSTRING in aggregate expressions,grouping,sort keys of SELECT . |
Projection view accessed in connection with a correlated subquery. |
Too many subqueries in a SELECT statement. |
Work area or rows of an internal table are shorter than the structure of the database table when specifying the rows in DELETE dbtab . |
Indicator variable in Native SQL, which is not of the external type INT2. |
List Statements |
Dynamic position specification in WRITE or ULINE without AT . |
Negative length len specified after WRITE AT . |
Write-protected data object specified after HIDE . |
Other versions: 7.31 | 7.40 | 7.54
Note
Programs that so far have used the language constructions stated above must now be considered as incorrect. If the respective positions in the program have been executed, runtime errors or undefined states occurred. The current syntax cleanup is intended to avoid error situations like the ones described here, when they can be recognized statically in advance.