Ansicht
Dokumentation

ABENDATA_TYPES - DATA TYPES

ABENDATA_TYPES - DATA TYPES

General Material Data   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

Data Types

Data types are a subtree of the ABAP type hierarchy. Data types are type-only descriptions. No memory for storing working data is attached, but they may require space for administrative information. A data type characterizes the technical properties of all data objects that have this type. In ABAP, data types occur as attributes of data objects, but they can also be defined independently.

The definition of standalone data types is based on a set of built-in data types. The definition can be made within a program using the statement TYPES in the global declaration part of a program, in the declaration part of a class or an interface, locally in procedures, or in the ABAP Dictionary. Data types in the ABAP Dictionary are either created directly as repository objects or in a type pool. CDS entities and their components can also be as data types in ABAP programs.

The visibility of data types depends on their definition. Standalone data types that are defined in the ABAP Dictionary, as CDS entities, or in the non-private sections of global classes and interfaces are visible in all ABAP programs. Other standalone data types are visible only inside the context of their definition.

Built-in and self-defined data types can be used to create data objects and for typing. Particularly in the latter case, built-in generic data types are available. A generic data type is a data type that does not determine all attributes of a data object. Generic data types can only be used for typing formal parameters and field symbols.

Data types can be divided into elementary, reference, and complex data types.

  • Elementary types are 'atomic' in the sense that they are not composed of other types. They are further divided into elementary types of fixed and variable length.

Eight numeric types: Integers (b, s, i, int8), decimal floating point numbers (decfloat16, decfloat34), binary floating point numbers (f), and packed numbers (p).
Two character-like types: text fields (c) and numeric text fields (n).
One byte-like type: byte fields (x).
Two character-like date and time types: date fields (d) and time fields (t).
A time stamp type: Time stamp fields (utclong).
The data types c, n, x, and p are generic in terms of their length. p is also generic in terms of the number of decimal places. The numeric data types b and s cannot be specified directly in programs for short integers.

  • Reference types describe data objects that contain references to other objects (data objects and instances of classes), which are known as reference variables. There are no built-in reference types in ABAP. A reference type must either be defined in the ABAP program or in ABAP Dictionary. Reference types form a hierarchy that represents the hierarchy of the objects to which the references can point.
  • Complex data types are composed of other types. They allow the administration and processing of semantically related datasets under one name. A data object of a complex type can be accessed overall or by component. Apart from the structure sy, there are no built-in complex data types in ABAP. A complex type must either be defined in the ABAP program or in ABAP Dictionary. There are two kinds of complex data types:
  • A structured type is a sequence of any elementary, reference, or complex data types. Structures are used to summarize work areas that logically belong together.

  • Table types consist of a sequence of any number of lines of the same data type. Table types are characterized by a line type that can be any elementary type, reference type, or complex data type, by the table category, which defines how tables can be accessed, and by a table key that is used to identify the table lines.






Fill RESBD Structure from EBP Component Structure   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 8641 Date: 20240425 Time: 141601     sap01-206 ( 107 ms )