ABAP - Keyword Documentation →  ABAP - ABAP Release News →  News for ABAP Release 7.5x →  News for ABAP Release 7.56 → 
Mail Feedback

Internal Tables in ABAP Release 7.56


1. Access to Generically Typed Internal Tables

2. Alias Names for Secondary Keys



Modification 1  

Access to Generically Typed Internal Tables

Earlier, in statements for accessing internal tables, the internal table had to be known statically. The operand had to be typed at least with any table.

Now, this restriction is partly removed. In the statements INSERT, APPEND, COLLECT, MODIFY, DELETE, READ, LOOP, and SORT, operands can be field symbols and formal parameters that are typed fully generically with TYPE data or TYPE any. Such operands can be used as if typed with any table. If an index access is involved, operands are still required that are typed at least with TYPE index_table.

Hint

This is not yet possible in expressions as FOR expressions or table expressions.

Example

The following was not possible in older releases.

DATA itab TYPE TABLE OF scarr.

FIELD-SYMBOLS <itab> TYPE ANY.
ASSIGN itab TO <itab>.

LOOP AT <itab> ASSIGNING FIELD-SYMBOL(<fs>).
  ...
ENDLOOP.


Modification 2  

Alias Names for Secondary Keys

Alias names can now be declared for secondary keys of internal tables by using the addition ALIAS of TYPES and DATA. This can be helpful when changing existing secondary keys without invalidating users.