Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Instantiation (variable) using the NEW operator

Rodrigo-Giner
Active Contributor
0 Kudos

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

1 REPLY 1

Sandra_Rossi
Active Contributor
0 Kudos

No, you can't.