Show TOC

User-Defined ABAP TypesLocate this document in the navigation structure

Syntax Form
...
data element | structure | database table | view | table type | class | interface
...
Definition

Components can be typed with any user-defined dictionary type or with classes or interfaces from the class library.

The following categories of user-defined types are provided:

  • Data element
  • Structure
    Note The optional keyword BOXED can be added after the structure name. This component is then defined as a boxed component within the surrounding structure.
  • Database table
  • View
  • Table type
  • ABAP class or interface: can only be used with the leading REFERENCE TO addition.

Example

The following components are typed:

  • employee_id as a data element
  • address as a boxed component with a surronding struct structure
  • accounts as a table type
  • department is referenced to an ABAP class
...
  employee_id : dtel_employee_id;
  address     : struct_address BOXED;
  accounts    : itab_accounts;
  department  : REFERENCE TO cl_department
...