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

global abstract objects

Former Member
0 Likes
672

I want to create objects from a abstract class in one Report an store them globally, to have access to this objects from another Report. With shared-objects it is only allowed, to create objects from classes, which are not abstract. Is there any solution, to realize this?

6 REPLIES 6
Read only

Sandra_Rossi
Active Contributor
0 Likes
646

in Object Oriented Programming (whatever the language is), you CANNOT instantiate abstract classes directly. They are kind of models which are used by sub-classes (inheritance).

You must find out which real class is instantiated by copying the logic of other programs which do that.

Read only

0 Likes
646

Hi Sandra,

don't you have to separate between fully abstract classes (class is explicitely defined as abstract) and those which only have some abstract methods (or attributes)? Doesn*t this fact influence the instantiation capability?

Greets

Matthias

Read only

0 Likes
646

are you the same person than the original poster? 😄

If you have an abstract method, it implies that the class is abstract.

Read only

0 Likes
646

Hi Sandra,

no I am not. How do you think I could? But actually I know him...

OK, no question what you state is logical. But according to wikipedia (german version) this actually makes a difference. So I was a little curious and wanted to know if this makes a difference regarding instantiation.

Greets

Matthias

Read only

0 Likes
646

maybe, I don't speak all programming languages

What I say is valid for ABAP 😄

Read only

0 Likes
646

@Dietmar,

you will have to use shared objects if you want to have access from two different ABAP reports.

Maybe you can use a static attribute of a "dedicated" class to carry the instance reference and then use it in both reports. For sure this is kind of dirty.

Greets

Matthias