[ABAP] Interne Tabelle deklarieren

Variante 1

* Definition Zeilen-Typ
TYPES: BEGIN OF ty_bestand,
         isbn     TYPE n LENGTH 10,
         titel    TYPE string,
         bestand  TYPE i,
         autor    TYPE string,
       END OF ty_bestand.

* Definition Tabellen-Typ
TYPES: ty_it_bestand TYPE SORTED TABLE OF ty_bestand WITH UNIQUE KEY isbn.

DATA: it_bestand TYPE ty_it_bestand.

Variante 2

* Definition Zeilen-Typ
TYPES: BEGIN OF ty_bestand,
         isbn     TYPE n LENGTH 10,
         titel    TYPE string,
         bestand  TYPE i,
         autor    TYPE string,
       END OF ty_bestand.

DATA: it_bestand TYPE SORTED TABLE OF ty_bestand WITH UNIQUE KEY isbn.

* oder kurz, ohne Sortierung
DATA: it_bestand2 TYPE STANDARD TABLE OF ty_bestand WITH DEFAULT KEY.