Get Example source ABAP code based on a different SAP table
Internal Tables in ABAP Release 4.6A In ABAP_99A , the following new features have been introduced in internal tables: ITOC
ABAP_MODIFICATION_NN New Keys Specified in Unstructured Internal Tables>
If the line type of an internal table does not have a structure, the pseudo component> table_line> can be used to specify or address the entire table line as the key. The previous form TABLE LINE> is now obsolete. If a structure> contains a component called table_line>, this produces a warning in the syntax check.
ABAP_MODIFICATION_NN References as Table Keys>
References are now allowed as the key of an internal table.
ABAP_MODIFICATION_NN Strings as Table Keys>
Strings>> are now allowed as the key of an internal table. This applies to all categories of tables.
ABAP_MODIFICATION_NN Key Definition for Tables in ABAP Dictionary >
It is now possible to specify the table key explicitly for internal tables defined in ABAP Dictionary.
ABAP_MODIFICATION_NN Default Key of Unstructured Tables>
The default key of an internal table without a line structure always consists of the whole line. An exception are tables of tables for which an empty key is defined.
ABAP_MODIFICATION_NN Changes to the Internal Structure>
Previously, internal tables were represented at runtime using a structure 256 bytes long. This has now been replaced by a reference that is only 8 bytes long. This means that structures that contain tables as components or tables that include other tables can now be save much more efficiently. This is because tables without content now need only 8 bytes instead of 256 bytes. The benefits are particularly clear in thinly populated structures. Furthermore, the header of a filled table now only requires approximately half of the 256 bytes previously required (the actual figure depends on the platform). In ABAP Dictionary, all structures containing a field of length 256 bytes intended to include a table header must be modified accordingly.
ABAP_MODIFICATION_NN Sorting without Sort Key Specified>
Sorting an internal table with type > STANDARD>> or HASHED>> using the statement SORT>> now returns a correct result, even if the sort key is not specified in the addition BY> .
ABAP_MODIFICATION_NN Access to Read-Only Tables>
If the statements DELETE>>, INSERT>>, and MODIFY>> are applied to read-only tables (for example, IMPORTING-REFERENCE> parameters in function modules or READ-ONLY > attributes of classes), the system returns a syntax error. This error used to produce a runtime error.
ABAP_MODIFICATION_NN Index Ranges in Table Extensions>
The statements INSERT LINES OF itab ...>> and APPEND LINES OF itab ...>> return syntax errors if the source table has the type HASHED> or ANY> and the additions FROM> and TO> are used to specify an index range. This error used to produce a runtime error.
ABAP_MODIFICATION_NN IS REQUESTED> with TABLES> Parameter>
If the predicate operator IS REQUESTED >> is used with TABLES>> parameters in update modules, the syntax check produces a warning>. These parameters are always supplied.
ABAP_MODIFICATION_NN Tables as Attributes of Objects>
The statements LOOP>>, READ>>, SORT>>, DELETE>>, and MODIFY>> now support access to the attributes of objects as the keys of internal tables. If the line type of an internal table contains object reference variables from ABAP Objects>> as components comp>, the attributes attr> of the object to which the reference points can be used as key values when reading, sorting, and changing the table. This is possible in the following statements: LOOP AT itab ... WHERE comp->attr ...> READ TABLE itab ... WITH $[TABLE$] KEY comp->attr = ...> SORT itab BY comp->attr ...> DELETE itab WHERE comp->attr ...> MODIFY itab ... TRANSPORTING ... WHERE comp->attr ...>
ABAP_MODIFICATION_NN References as Line Type>
In the declarative statements DATA>>, STATICS>>, and TYPES> >, object references and data references can be used as the line type of an internal table.