Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  Classic Objects in ABAP Dictionary →  Database Tables →  Dictionary DDL for Defining Database Tables 

DEFINE TABLE

Other versions: 7.31 | 7.40 | 7.54

Syntax


structure_annos 
table_annos

DEFINE TABLE dbtab {
  ...
  field;
  ...
  include;
  ...
}

Effect

Dictionary DDL statement for defining an ABAP Dictionary database table dbtab in the ABAP Development Tools.

  • A database table is defined using the statement DEFINE TABLE. The restrictions for database tables apply to the name dbtab.
  • In front of the statement DEFINE TABLE,
  • any mandatory table properties must be specified as annotations table_annos. Any other properties are optional.
  • The table fields are defined in a semicolon-separated list in curly brackets { } using one of the following methods:
  • by defining single fields field
  • by including include structures include. The same applies when including include structures as to the statement DEFINE STRUCTURE, except that the include structures must be suitable for database tables.


Notes

  • As in the CDS syntax, an ABAP Dictionary structure definition can contain comments after // and between /* ... */.

  • A more detailed description of the syntax is available in the ADT documentation Syntax of ABAP Dictionary Objects.

Example

Defines the database table DEMO_BLOB_TABLE in the Dictionary DDL of the ABAP Development Tools.

@EndUserText.label : 'Table with a BLOB Column'
@AbapCatalog.enhancementCategory : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #LIMITED
define table demo_blob_table {
  key name : abap.sstring(255) not null;
  picture  : abap.rawstring(0); }

Continue

DEFINE TABLE - table_annos

DEFINE TABLE - field