Application Development and Automation 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: 
Read only

Reflection in ABAP OO

shreevathsa_s
Product and Topic Expert
Product and Topic Expert
0 Likes
1,087

Is there something similar to reflection what we have in Java. Can we create an object of a class given class name only.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
948

Hello Shreevathsa

You can create object instances dynamically using:

CREATE OBJECT <reference variable>  TYPE (<class name>).

Regards

Uwe

Is there something similar to reflection what we have in Java. Can we create an object of a class given class name only.

3 REPLIES 3
Read only

shreevathsa_s
Product and Topic Expert
Product and Topic Expert
0 Likes
948

The class name is read from a customizing table.

Read only

uwe_schieferstein
Active Contributor
0 Likes
949

Hello Shreevathsa

You can create object instances dynamically using:

CREATE OBJECT <reference variable>  TYPE (<class name>).

Regards

Uwe

Read only

0 Likes
948

Hello Uwe,

Thanks for your help.

Regards,

Shreevathsa