May 2019
Beginner to intermediate
548 pages
12h 39m
English
We can create a class as an attribute of the class. To create that attribute, we need to add an attribute, which is typed as TYPE REF TO. In our example, we'll create an attribute as a reference to the ZCL_ENGINE class:

In the preceding example, we created an attribute named GR_ENGINE as an attribute of the ZCL_AUTO class. After the instantiation of ZCL_AUTO and the initialization of its GR_ENGINE attribute, a new object of the ZCL_ENGINE class is created inside ZCL_AUTO. Then, the GR_ENGINE reference can be freely used inside the ZCL_AUTO class's methods, and—if the property is defined as public—outside ...
Read now
Unlock full access