SAP NEWS-70-CLEANUP



Get Example source ABAP code based on a different SAP table
  



ABAP Syntax Cleanup in ABAP Release 7.0
For ABAP_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 ABAP_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 ABAP_RELEASE 7.0. Errors in Language Construct Program Structure Statement cannot be reached.X Missing forward declaration of a class using CLASS - DEFERRED.- Declarations Program-internal name with more than 30 characters.X Special characters in a program-internal name in obsolete ABAP (non-Unicode).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 Reference to a data type of the compilation unit in a public parameter interfaceX Reference to a data type of the compilation unit 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 pool has the same name as an existing type in ABAP Dictionary.- A constant in a type pool has the same name as an existing flat structure or table in ABAP Dictionary.- A macro in a type pool does not have the name of the type pool as a prefix. A reserved component name such as the pseudo component table_line is used in a DDIC structure. X 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 the superclass in the instance constructor of a subclass.- Instance component accessed before the call of the instance constructor of the superclass in the instance constructor of a subclass.- Short form meth( a ) with a non-unique assignment to a formal parameter.- Fixture method in test class is not private.- 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.- Addition SORTED BY specified after COLLECT .X Addition LANGUAGE specified after CREATE OBJECT for OLE.X Additions AND SKIP FIRST SCREEN and USING both specified 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).- Length less than or equal to zero in the offset/length specification for fields of fixed length.X Empty offset/lengths specified.X Superfluous trailing blanks in text field literals.X Line-spanning text field literal. X Line-spanning 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 ranges table in a comparison expression after IN.X sy-subrc assigned to a CHANGING, EXPORTING, or RETURNING parameter.X Data object passed to a formal parameter typed using STRUCTURE in a program of ABAP language version ABAP_STANDARD , where the fragment view does not match completely.- Data object specified 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 Table type defined for a hashed table without specifying UNIQUE before KEY.- Non-index table specified after SEARCH.X Incompatible work area for group level processing using internal tables with AT and SUM.X 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.- DDIC projection view accessed in connection with a correlated subquery. Too many subqueries in a SELECT statement.- Work area or lines of an internal table are shorter than the structure of the database table when specifying the lines 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 len specified after WRITE AT .- Write-protected data object specified after HIDE .X




Latest notes:

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 are known statically in advance.
ABAP_HINT_END