cancel
Showing results for 
Search instead for 
Did you mean: 

Define superclass problem with SE80

thomasalexander_ritter
Active Contributor
0 Kudos

Hi,

my current goal is to make my model class observable. Therefore I want to implement the observer pattern. Of course, I want to have an observable class which I can reuse. An observer interface is already available. So I need to realize the following inheritance tree:

cl_bsp_model <- zzcl_mod_observable <- myModelClass.

Unfortunately I can't get the inheritance tree working. When I define the super class for zzcl_mod_observable the SE80 doesn't show any methods which cl_bsp_model has overwritten from the if_bsp_model interface. The only methods my observable class inherits are the static methods: create and create_standalone_model.

When I am doing this inheritance:

cl_bsp_model <- myModelClass

Everything works fine and all the overwritten methods are available in myModelClass. I have absolutely no clue what I am doing wrong here. Btw I haven't set the "modeled only" or "final" flag.

Thomas

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member181879
Active Contributor
0 Kudos

Maybe it is just a workbench setting, whereby it is filtering inherited methods. Look at menu entry Seetings, and see tab Class Builder. There are many checkboxes to filter things like inherited methods, and also scope settings. Might make the difference in what you see!

thomasalexander_ritter
Active Contributor
0 Kudos

Hi,

@Peter

I am using an interface which the SAP has already created for one of their gui components if_cm_observer. When you search for observer you will find a lot more So when you want to use the observer pattern you only have to create a typical observable class which allows you to attach/dettach/notify the observer.

@Brain

The settings were all right because I got compile errors like "method not found..."

Today, I created another class and tried it again and it works, now. From my experience there must be a bug in the SE80. Unfortunately I am not able to recreate it, yet.

regards

Thomas

peter_norris
Explorer
0 Kudos

Hi

I tried doing something similar in 6.2 and had no problems inheriting the interface methods from CL_BSP_MODEL in a "grandchild" class, though admittedly it was with a custom interface.

Is the observer interface available in 6.2?

I take it the BSP model interfaces are not listed in the interfaces section of your "myModelClass" class.