JavaScript Disabled

Types and Objects

ABAP distinguishes between types and objects. Types are descriptions that do not occupy memory. Objects are instances of types, and do occupy their own memory space. A type describes the technical attributes of all of the objects with that type.

ABAP types form a hierarchy. Objects in ABAP reflect the same hierarchy.




ABAP has both data types and object types.

Data types describe data objects. They can be further subdivided into elementary, reference, and complex types. There are predefined data types, but you can also declare your own, either locally in a program, or globally in the R/3 Repository.
Object types describe objects in ABAP Objects. They can be divided into classes and interfaces. Object types contain not only the data types specified above, but functions as well. There are no predefined object types. Instead, you must declare them in a program or in the R/3 Repository. A class is a full description of an object. It defines the data types and functions that an object contains. Interfaces describe an aspect of an object. The data types and functions of an interface can be implemented by several classes. Objects (instances) can only be created from classes. Object references, on the other hand, can be created with reference to either classes or interfaces.
There are two types of objects that you can create from ABAP types - data objects, and objects.

Data objects are fields. They contain the data with which programs work at runtime.
Objects are real software objects in ABAP Objects. They contain methods and events as well as data, and support object-oriented programming.


Sumber : SAP LIBRARY - BC - ABAP PROGRAMMING

0 Whisper

Post a Comment

Please, your comment must related with current posting otherwise your comment will mark as Spam.