TABLES

This statement is not allowed in an ABAP Objects context. See TABLES statement not allowed and the note below.

Basic form

TABLES dbtab.

Effect

Creates an structure - the table work area - in a program, for the database table , view , or structure dbtab with the same name. The structure of the table work area corresponds exactly to the line structure of the database table dbtab. dbtab must be declared in the ABAP Dictionary. ABAP Dictionary.
The fields of the table work area are filled with the initial value appropriate for their ABAP data type. (See DATA).

Example

Display all flight connections:

TABLES spfli

SELECT * FROM spfli
  WRITE: / spfli-carrid, spfli-connid
ENDSELECT.

Notes

You should only use the TABLES statement in an ABAP program where it is absolutely necessary, namely to transport fields with an ABAP Dictionary reference between screens and an ABAP program, or to transport data between a logical database and an executable program. You can also use the NODES statement with logical databases. The TABLES statement is no longer necessary for:

Related

DATA, TYPES

Additional help

Interface Work Areas