01-25-2019 11:43 AM
Dear friends,
how to declare the below code globally in se24?
class cl_observable definition.
public section.
interfaces: lif_observable.
aliases: register for lif_observable~register,
unregister for lif_observable~unregister.
methods: notifyobservers.
"Mainly this below code
private section.
data: mt_observer type standard table of ref to if_observer.
endclass.
Thanks in advance
Sudarshan David
01-25-2019 11:54 AM
Do it in Eclipse? If you must use SE24, then try button "Source Code-Based".
But it's not at all clear what you're really asking. What do mean "rework"?. What do you mean "globally"? What are you, in fact, trying to achieve?
01-25-2019 11:54 AM
Do it in Eclipse? If you must use SE24, then try button "Source Code-Based".
But it's not at all clear what you're really asking. What do mean "rework"?. What do you mean "globally"? What are you, in fact, trying to achieve?
01-25-2019 12:05 PM
Hi Matthew,
I am using Observer design pattern, where I have to register and unregister the observer.
"mt_observer is the table with reference to interface if_observer(list of observer)" --> this table holds the registered observer to get notify the information.
I don't know how to add below code in SE24(Globally),
"Mainly this below code
privatesection.
data: mt_observer typestandardtableofrefto if_observer.
I will change the subject to understand easily 🙂
Thank you
01-25-2019 4:37 PM
Are you asking how "observable" can be implemented in ABAP Objects? There is the Event concept (METHODS handler FOR EVENT ..., SET HANDLER handler...)