Skip to Content
0
Jul 30, 2020 at 02:51 PM

Dynamic Instantiation (variable) using the NEW operator

73 Views

Hi Folks, this code works fine but just out of curiosity is there a way to implement this code using the NEW operator?

      DATA lo_obj TYPE REF TO zabstract_class.
      CREATE OBJECT lo_obj TYPE (variable). "variable = 'ZSUB_CLASS'.

      lo_obj->method1( ).
      

Thanks

Regards