04-12-2017 8:20 AM
Hi All,
I am stuck in this issue. I have two classes -
class 1 - which is an abstract class
class 2 - my class where i want to call a method ( "setup ") of class 1.
I cannot make class 1 as the super class of class 2, as I have already another super class.
I have done this till now -
1. Created an object of class 1 in class 2.
mr_set type ref to "class 1".
mr_set->setup( ). or
CALL METHOD mr_set->setup.
this gives me an error - Method "SETUP" is unknown or PROTECTED or PRIVATE.
2. Then i tried to declare class 2 in the "friend" list of class 1.
this does not give me any error. But in debug mode, it raises some kind of exception.
Can anyone please help me with it.
Thanks
Meenakshi
04-12-2017 8:49 AM
"I have done this till now -
1. Created an object of class 1 in class 2. "
How that? You cannot create objects of abstract classes.
"this gives me an error - Method "SETUP" is unknown or PROTECTED or PRIVATE."
How and where is setup declared?
"Can anyone please help me with it."
No, ABAP has no means to overcome these limitations.
04-12-2017 8:49 AM
"I have done this till now -
1. Created an object of class 1 in class 2. "
How that? You cannot create objects of abstract classes.
"this gives me an error - Method "SETUP" is unknown or PROTECTED or PRIVATE."
How and where is setup declared?
"Can anyone please help me with it."
No, ABAP has no means to overcome these limitations.
04-12-2017 9:17 AM
Hi Horst,
Please find these details -
1. In class2, in attributes section I have done this declaration -
protected section.
data MR_SET type ref to class1 .
2. Set up is declared in my class 1 .
protected section.
methods SETUP .
Do you need any more details ?
Thanks and Regards
Meenakshi
04-12-2017 9:24 AM
Still confusing. Is class1 the same as /SIE/KFP_CLASS_DIALOG?
It seems that you try to do things that are simply not allowed.
04-12-2017 9:45 AM
okay. then it seems that i will have to find another way to do my code, as I cannot access the method of this class.
Thanks Horst. 🙂