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

Problem Create object from superclass

adrian_mejido
Contributor
0 Likes
560

Hi,

I have a problem with classes:

I have one abstract superclass which has a method to create objecto for its children class.

CREATE OBJECT R_FLIGHT TYPE (l_class_name)
     EXPORTING
       i_sflight = l_sflight.


  • l_class_name: has the name of my children class


My children class has this properties:


A dump its triggered when I try to create object from the superclass.

Best Regards

1 ACCEPTED SOLUTION
Read only

adrian_mejido
Contributor
0 Likes
516

Hi,

I have already solved my problem. The problem was that I had forgotten to put the superclass in the "Friends" tabscript of children class.

Best Regards

2 REPLIES 2
Read only

adrian_mejido
Contributor
0 Likes
517

Hi,

I have already solved my problem. The problem was that I had forgotten to put the superclass in the "Friends" tabscript of children class.

Best Regards

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
516

Hello,

I think that you defined the instantiation level of the superclass as PROTECTED & from the screenshot i can see that the instantiation level is protected & the class is marked as "Final".

Are you having a factory method which returns the instance of the abstract class & you use it to achieve polymorphism?

May be a little bit insight into your coding can help us

BR,

Suhas