Ansicht
Dokumentation

ABENTYPES_INCLUDE - TYPES INCLUDE

ABENTYPES_INCLUDE - TYPES INCLUDE

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

ABAP Types and Objects

In ABAP we have to distinguish between types and objects. While types are simple descriptions that do not use storage, objects are instances of types using storage. A type specifies the technical properties of all objects of that type.

The ABAP types make up the ABAP type hierarchy:

Hierarchy of ABAP Types


Types ---- Data types  ---- Elementary ---- Fixed length--- C
       |                |               |               |-- N
       |                |               |               |-- D
       |                |               |               |-- T
       |                |               |               |
       |                |               |               |-- X
       |                |               |               |
       |                |               |               |-- P
       |                |               |               |-- I
       |                |               |               |-- F
       |                |               |
       |                |               |-- Var. length--- STRING
       |                |                               |-- XSTRING
       |                |-- Reference types
       |                |
       |                |-- Complex    ---- Structured
       |                                |-- Table type
       |
       |-- Object types --- Classes
                        |-- Interfaces

We basically distinguish between data types and object types.

  • Data types describe data objects. They are further subdivided into elementary, reference, and complex types. There are built-in (predefined) data types, and they can be defined locally in the program or system-wide in the R/3 Repository.
  • Object types describe objects in ABAP Objects. They are further subdivided into classes and interfaces. Object types contain the above data types on the one hand, but also functions on the other hand. Object types are not built-in, but must be defined in the program or in the R/3 Repository. Classes describe an object completely. They define which data types and which functions an object contains. Interfaces describe a partial aspect of an object. The data types and functions of an interface can be implemented by several classes.

The hierarchy of the ABAP objects reflects the ABAP type hierarchy:

Hierarchy of ABAP objects


Instances ---- Data objects ---- Elementary ---- Static     ---- C
           |                 |               |               |-- N
           |                 |               |               |-- D
           |                 |               |               |-- T
           |                 |               |               |
           |                 |               |               |-- X
           |                 |               |               |
           |                 |               |               |-- P
           |                 |               |               |-- I
           |                 |               |               |-- F
           |                 |               |
           |                 |               |-- Dynamic    ---- STRING
           |                 |                               |-- XSTRING
           |                 |-- Reference variables
           |                 |
           |                 |-- Complex    ---- Structures
           |                                 |-- Internal tables
           |
           |-- Objects

Objects as instances of ABAP types are divided into the following two categories:

  • Data objects are fields in the proper sense of the word. They contain the data local in the program used by the program at runtime.
  • Objects are genuine software objects in ABAP Objects and support object-oriented programming because they contain not only data but also methods and events.





SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   General Material Data  
This documentation is copyright by SAP AG.

Length: 11919 Date: 20240424 Time: 122431     sap01-206 ( 48 ms )