ABAP Keyword Documentation → ABAP − Release-Specific Changes → Changes in Release 6.10
Internal Tables in Release 6.10
In Release 6.10 the following enhancements have been made to internal table functions:
1. Creating any table object
2. Checking the convertibility of key fields
3. Duplicate or overlapping key specifications
4. Support for accessing attributes
5. Table types for text pools and IN-conditions
6. Dealing with overflow in/ COLLECT
and SUM
statements
7. Additions ASSIGNING and REFERENCE INTO
8. Upper and lower case spelling in dynamic components
9. Combined key specifications with table_line
10. Establishing the number of rows in an internal table
11. Optimization when accessing internal tables
12. Offset and length declarations for the table definition
Other versions: 7.31 | 7.40 | 7.54
Modification 1
Creating any table object
You can create any desired table objects at runtime using the CREATE DATA statement. If the table type is known then this is already taken into account during the syntax check.
Modification 2
Checking the convertibility of key fields
With the statementsREAD TABLE itab WITH KEY k1 = v1 .... kn = vn and DELETE TABLE itab WITH KEY = v1 .... kn = vn the system already checks during the syntax check whether the key values are convertible to the component type. This convertibility check is also effective for the newer variant READ ... WITH TABLE KEY .... Previously, the runtime error MOVE_NOT_SUPPORTED was caused if the conversion was not possible.
Modification 3
Duplicate or overlapping key specifications
In the case of duplicate or overlapping key specifications, the statement READ TABLE itab WITH KEY k1 = v1 .... kn = vn now triggers a syntax error instead of a syntax warning. With dynamic statements it was previously the case that the last key specification was used; now the runtime error DYN_KEY_DUPLICATE occurs.
Modification 4
Support for accessing attributes
The ... COMPARING o->attr
addition now lets you access the attributes of
objects that are components of internal tables. The syntax has a similar effect to the syntax used when reading, changing, deleting, or sorting internal tables.
Modification 5
Table types for text pools and IN
conditions
As well as standard tables, the system now also supports the
table types HASHED and SORTED for the statements
READ
, DELETE
INSERT TEXTPOOL ...
. The IN
conditions for
SELECT ... WHERE
and
LOOP ... WHERE
are also no longer dependent on the table type.
Modification 6
Dealing with overflow in COLLECT and SUM statements
Previously, fields of type f
were only checked for possible overflow in the case of arithmetic additions. When using
COLLECT and
SUM the addition was terminated in accordance with the IEEEstandard
and a runtime error was caused, as soon as the overflow limit (Infinity) was reached. Now this causes the exception CX_SY_ARITHMETIC_OVERFLOW, which can be caught using
TRY.
Modification 7
Additions ASSIGNING and REFERENCE INTO
The additions ASSIGNING and
REFERENCE INTO are now available for the statements
READ,
LOOP,
INSERT,
APPEND,
MODIFY, and
COLLECT. Previously there was only the ASSIGNING
addition for the keywords LOOP
and READ
.
Modification 8
Upper and lower case spelling in dynamic components
Previously, the field content of a dynamic component always had to written in capitals, for example SORT ... BY ('KOMP'). Now lower case spelling is permissible in instructions for all internal tables.
Modification 9
Combined key specifications with table_line
Now there are additional key specifications for the pseudo component table_line. Previously, for example, a specification in the form READ ... WITH KEY table_line->attr = ... table_line = ... BINARY SEARCH, for which the both the value of the attribute ATTR and the value of the attribute itself were to be used as keys, was not possible
Modification 10
Establishing the number of rows in an internal table
You can establish the number of rows in an internal table using the LINES function. For reasons of uniformity, this function is to replace the statement DESCRIBE TABLE itab in the long term , since you cannot describe all ABAP types using DESCRIBE.
Modification 11
Optimization when accessing internal tables
For Release 6.10, optimizations for accessing tables of the types SORTED and HASHED have been introduced. For more details refer to the chapter optimized key operations.
In addition, in the case of assignments between internal tables
Modification 12
Offset and length declarations for the table definition
Previously, components of the table key could be specified with offset and length declarations, which caused an undefined runtime behavior. This is no longer possible and a syntax error is triggered instead.