Hi Mike,
This is a little bit old thread, but the question is interesting and also I am facing a similar problem.
I am using a static attribute (class-data) named THIS_CLASS_NAME to hold the name of the current class/subclass. This static attribute is updated in the CLASS_CONSTRUCTOR of each subclass, like this:
CLASS ZCL_SUB ...
METHOD class_constructor.
TYPES dummy TYPE REF TO ZCL_SUB.
this_class_name = 'ZCL_SUB'.
ENDMETHOD.
As the class name assigned to the this_class_name attribute is a hardcoded text, if the subclass is renamed this text won't match the real subclass name. To reduce that chance, the TYPES clause will throw a syntax error when the subclass is renamed. Unluckily, it doesn't save us if the subclass is rename to ZCL_OTHER while there is now other class named ZCL_SUB.
Now I can have generic constructors in the super class using the this_class_name attribute when required, as in:
CLASS-METHODS build_this_way ...
...
CREATE OBJECT result TYPE (this_class_name).
...
or use it as argument invoking methods in specialized factory classes.
Best regards,
OdL