sapdev logo background
sapdev logo sapdev logo
Comments

SAP NEWS-70-CLEANUP documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

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.
Error in Language Construct



Program Layout
Statement cannot be reached.X
Missing forward declaration of a class with
CLASS - DEFERRED -



Declarations
Program-internal name with more than 30 characters.X
Special characters in a program-internal
name outside of Unicode programs.X
Single digit as the name of a data object.X
Incorrect namespace prefix .X
Operational statement within the definition of a structure with BEGIN OF ... END OF .X
Angabe eines Startwerts f�r eine Struktur
mit numerischen Komponenten au�erhalb von Unicode-Programmen.-
Reference to a framework program in a public parameter interface X
Reference to a data type of the framework program in the declaration of a public attribute of a global class-
Specification of an incompatible or non-convertible value 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 existing flat structure or table in ABAP Dictionary.-
A macro in a type 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.X
Declaration of an internal table with the predefined name screen .-



ABAP Objects
Unknown global class or interface after
GLOBAL FRIENDS .-
Specification of IMPORTING , CHANGING , or RECEIVING with dynamic CREATE OBJECT .-
Missing call of the instance constructor of the superclass in the instance constructor of a subclass .-
Access to an instance component before the call of the instance constructor of the superclass in the instance constructor of a subclass .-
Short form static_meth( a ) with a non-unique assignment to a formal parameter.-
Fixture method in test class is not private.-
Use of the selector - instead of the instance 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 a logical expression not followed by a logical expression.-
More than one LENGTH addition after
DESCRIBE FIELD .-
Specification of the addition SORTED BY after
COLLECT .X
Specification of the addition LANGUAGE after CREATE OBJECT for OLE .X
Simultaneous specification of the additions AND SKIP FIRST SCREEN
and USING after CALL TRANSACTION
.X
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 ).-
Nicht-zeichenartiger Operand in der
Zeichenkettenverarbeitung au�erhalb von
Unicode-Programmen.X
Length less than or equal to zero in the offset/length specification for fields of fixed length.X
Offset, L�nge oder deren Summe sind gr��er als die Feldl�nge bei
Offset-/L�ngenangabe f�r
Felder fester L�nge.-
Offset ohne L�ngenangabe bei
Offset-/L�ngenangaben .-
Empty offset/length specifications.X
Superfluous trailing blanks in text field literals .X
Line-exceeding text field literal .
X
Line-exceeding element of a bulleted list.X
Invalid use of a text symbol as the target of a call.-
Internal table does not have the structure of a selection table in a comparison expression after IN .X
Assignment of sy-subrc to a CHANGING , EXPORTING , or
RETURNING parameter.X
Passing of a data object to a formal parameter typed with STRUCTURE
in a Unicode program, where the Unicode fragment view does not match completely.-
Specification of a data object whose name contains an address specification such as an instance component selector or an
offset/length specification , without an explicit assignment to a parameter when using EXPORT
IMPORT , or CALL DIALOG .X



Internal Tables
Definition of a table type for a hashed table without specifying
UNIQUE before KEY .-
Specification of a non- index table after SEARCH .X
Incompatible work area for control level processing using internal tables with AT and SUM
.X
Specification of a component of a structured field symbol as a sort criterion after SORT .



Database Accesses
Columns of type STRING or RAWSTRING in aggregate expressions , grouping , sort keys
of SELECT .-
Access to a projection view 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 .X
Negative length specification len after WRITE AT .-
Specification of a write-protected data object after
HIDE .X


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.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




NEWS-70
NEWS-70-DATASET




comments powered by Disqus