SAP CLASS COMPONENT SELECTOR
Get Example source ABAP code based on a different SAP table
ARTICLE
• => ABAP_SELECTOR
Class Component Selector
A
In this case, no instance of the class needs to be created. The characters
The class component selector can also be used to access the data types and constants of an interface.
The name
Note
It is also possible to access the static components of a class using the object component selector if an instance of the class was created.
Example
Declares a class
PUBLIC SECTION.
CLASS-DATA oref TYPE REF TO factory.
CLASS-METHODS class_constructor.
METHODS do_something.
ENDCLASS.
...
factory=>oref->do_something( ).
...
CLASS factory IMPLEMENTATION.
METHOD class_constructor.
CREATE OBJECT oref.
ENDMETHOD.
METHOD do_something.
...
ENDMETHOD.
ENDCLASS.