Get Example source ABAP code based on a different SAP table
VERSION 5 IN
ABAP_DDIC - Data Types Global data types can be defined as DDIC types > in the ABAP Dictionary. These DDIC types are visible for and can be accessed from all repository objects of the current AS ABAP, as long as the package concept allows it. The following data types are available in the ABAP Dictionary:
Data elements> Elementary data types or reference types with semantic properties, such as documentation or text labels. The type properties of a data element are defined either directly or using a domain. A domain> determines the properties of a data element, such as the actual data type or the value range. A domain can be used by any number of data elements. A data element does not need to use a domain. In other repository objects, especially in ABAP programs, it is not possible to make a direct reference to a domain.
DDIC structures> Complex types whose components are other DDIC data types.
DDIC table types> Complex types that describe internal tables> in ABAP. In ABAP programs, the TYPE> addition of declarative statements can be used to reference the DDIC data types. In these scenarios, data elements work like elementary ABAP types, structures work like structured ABAP types, and table types work like the corresponding ABAP types. The elementary components of each DDIC data type are based on a built-in dictionary type> for which a mapping> to the corresponding built-in ABAP type> is defined. If a DDIC data type is changed, all consumers are modified automatically. The name of a data type must follow the naming rules for DDIC data types>. In addition to its technical properties, a DDIC data type can have semantic information, such as documentation texts, texts for use on UIs, or search helps. Data types without semantic properties can also be declared in type pools>.
Latest notes:
DDIC data types can only be used by AS ABAP. They are not created as types on the database system.
In addition to DDIC data types, CDS entities > also represent data types which can be used as such in ABAP programs.
Namespace prefixes> can be used to prevent namespace conflicts.
Within a program, locally defined types hide identically named global types from the ABAP Dictionary. NON_V5_HINTS
Global type declarations are also possible in classes and interfaces. Data types should always be declared appropriately to meet the context requirements and requirements for encapsulation. See also the associated programming guidelines>.
DDIC data types should always be used in accordance with their semantic properties. Elementary DDIC data types in particular should never be selected solely on the basis of their technical properties. See also the associated programming guidelines>. ABAP_HINT_END
ABAP_EXAMPLE_VX5 A DDIC data type, such as the structure DEMO_CONN>>, can be referenced in the parameter interfaces of global procedures (methods or function modules) and in the ABAP programs that use the procedures. ABEXA 00994 ABAP_EXAMPLE_END
ABAP_EXAMPLE_VX5 The elementary components of the structure SYST>> describe the ABAP system fields >. The semantic properties of these components or the data elements used for them are designed for system fields used internally in programs. It is not recommended that these components or their data elements are used for other purposes, such as dynpro fields or Web Dynpro fields, only because their technical properties are suitable. Their semantic properties, in particular their text descriptions and documentation, are not usually suitable for UIs. If there are no types with suitable semantic properties that can be reused, new data types should be created. ABAP_EXAMPLE_END