sapdev logo background
sapdev logo sapdev logo
Comments

SAP NEWS-740-ITAB documentation, setup help and example usage



Return to SAP documentation index



Internal Tables in Release 7.40

1 Table expressions
2 Predefined functions for internal tables
3 Explicit definition of an empty key
4 MOVE-CORRESPONDING for internal tables
5 Table sharing for boxed components
6 References in specified components
7 WHERE condition optimized
8 Expression for dynamic sorts


ABAP_MODIFICATION_1 Table Expressions

The new table expressions permit reads to be performed on internal tables in operand positions.


ABAP_MODIFICATION_2 Predefined Functions for Internal Tables

The table function line_index can be used to identify a row number in an index of an internal table and use it in operand positions.
The predicate function line_exists can be used to check the existence of table rows; the resulting logical value can then be used directly.


ABAP_MODIFICATION_3 Explicit Definition of an Empty Key

The new addition EMPTY KEY of the statements TYPES , DATA , and so on can be used to define an empty table key explicitly for standard tables. Without this addition, empty table keys occur only if the standard key of a standard table does not contain any components suitable as key fields.


ABAP_MODIFICATION_4 MOVE-CORRESPONDING for Internal Tables


This variant is not yet released and cannot be used.

From Release 7.40, the operands of the statement MOVE-CORRESPONDING can be internal tables, as well as structures. This has been enabled by a new variant of this statement, which assigns identically named components of internal tables row by row. The new addition EXPANDING NESTED TABLES enables tabular components of structures to be resolved. The addition KEEPING TARGET LINES adds rows to target tables instead of overwriting them.


ABAP_MODIFICATION_5 Table Sharing for Boxed Components

Until now there was no table sharing if the row types contained boxed components . This restriction has now been lifted.


ABAP_MODIFICATION_6 References in Dynamically Specified Components

Object component selectors can now be specified when components are specified dynamically (this was not previously the case). However, those specifications can be made that are statically possible. For example, when using ASSIGN attributes cannot be accessed that are not known statically. This is the case, for example, when using superclass references to access subclass components.


ABAP_MODIFICATION_7 WHERE Condition Optimized

The rules described under
Optimization of the WHERE Condition have been modified as follows:
Except in comparisons for equality, optimizations are now also performed for the predicate expression IS INITIAL . This enables a simple check to be made on the initial value, in particular for columns typed as reference variables
. A static WHERE condition cannot contain any duplicate or overlapping specified keys, if the prerequisites for optimizations are met. This means that this change is occasionally incompatible: Syntax errors are now produced in those WHERE conditions in which a key column is checked using both a comparison for equality with one value and using IS INITIAL .
Syntax warnings are no longer produced by mistake for non-optimizable type combinations in comparisons, even if the comparison does not contain any key columns. Non-optimizable type combinations now produce syntax warnings only if they actually modify key fields of a hash key or of the initial part of a sorted key. The syntax warnings have been improved so that the non-optimizable combination is mentioned in the text.
The following type combinations were not previously detected as non-optimizable when secondary keys were used in comparisons:
  • string with n , i (

  • int8 , b , s ), f , decfloat16 , and decfloat34
  • xstring with c and string

  • There was no syntax error or exception in these cases. Instead, all rows of the internal table were checked linearly when the statement was executed or reads performed using the primary key. Optimized reads are guaranteed when using secondary keys, which is why the combinations above now produce syntax errors or raise exceptions. This represents an incompatible change.


    ABAP_MODIFICATION_8 Expression for Dynamic Sorts

    In the statement SORT itab , the table (otab) can now be specified for dynamic sorts as the result of an expression or functional method call.
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    NEWS-740-EXPRESSIONS
    NEWS-740-JSON




    comments powered by Disqus