ABAP Objects - Super/SubClass Inheritance of Interface Methods

Florin Wach florin.wach at gmx.net
Tue Apr 7 10:14:33 EDT 2009


Hi Mike

that beats the heck out of me, too. I planned a nice solution, which was far later on crossed by the error message "Static methods cannot be redefined". ... So I had to rework all the stuff.  Well, ... there're this other thing going on, that static methods can only be accessed, using the class type name, not the instance, ... which again is something huh unfamliar?

I started to use instance methods as place-holders, that pass the class' name down to a static method, which then can work with this by using CREATE OBJECT is_there_another_solution TYPE you_shouldnt_do_this  ... or more weirder things.

But yes, having Interfaces working with the workflow system could deal with 50% of such cases.

Best wishes,
   Florin

-------- Original-Nachricht --------
> Datum: Tue, 07 Apr 2009 15:00:03 +0100
> Von: Mike Pokraka <wug at workflowconnections.com>
> An: "SAP Workflow Users\' Group" <sap-wug at mit.edu>
> Betreff: RE: ABAP Objects - Super/SubClass Inheritance of Interface Methods

> Yes, the lack of interfaces is a shame. It means you need to do some
> clever
> stuff with the LPOR methods to ensure the correct object type is presented
> in all cases since you cannot redefine static methods in subclasses. 
> 
> 
> On Tue, 7 Apr 2009 09:23:19 +0800, "Dart, Jocelyn" <jocelyn.dart at sap.com>
> wrote:
> > Hi Mike/Florin, 
> >  
> > Please remember that Delegation only refers to BOR objects and only
> permits
> > one subtype to one supertype relationship.
> >  
> > With ABAP Objects with use narrowing/widening cast e.g. by adjusting the
> > options in the bindings (by pressing the arrow head button in the
> binding
> > window).  This allows the use of many subtype/supertype relationships. 
> The
> > only thing we don't use is ABAP Interfaces - you need to do class to
> class
> > bindings. 
> >  
> > Regards,
> > Jocelyn
> > 
> > ________________________________
> > 
> > From: sap-wug-bounces at mit.edu on behalf of Florin Wach
> > Sent: Fri 3/04/2009 1:51 AM
> > To: SAP Workflow Users' Group
> > Subject: Re: ABAP Objects - Super/SubClass Inheritance of Interface
> Methods
> > 
> > 
> > 
> > that's how it workes and why it's designed that way.
> > 
> > To exchange one object for another at runtime you can use the
> "Delegation",
> > which is aliasing a subtype of an object with the supertype. (Which is
> kind
> > non-conform to object oriented approaches, but ...well, we're not
> talking
> > about object orientation with POR's anyhow :-)
> > 
> > Best wishes,
> >    Florin
> > 
> > -------- Original-Nachricht --------
> >> Datum: Thu, 2 Apr 2009 10:09:13 -0400
> >> Von: "Michael McInerney" <michaelm at duke.edu>
> >> An: "SAP Workflow Users\' Group" <sap-wug at mit.edu>
> >> Betreff: ABAP Objects - Super/SubClass Inheritance of Interface Methods
> > 
> >> I have an ABAP object which is workflow enabled.
> >>
> >> All is good.
> >>
> >> I would like to create a few different flavors of this object via
> >> subclasses/inheritance, using the original workflow enabled object as
> the
> >> superclass.
> >>
> >> The key definition will remain the same.
> >>
> >> I'm expecting that my interface methods and their implementation (POR
> >> stuff) will hold up just fine, and can remain at the upper level, but I
> >> wanted
> >> to make sure.
> >>
> >> 
> >>
> >> Thanks.
> >>
> >> 
> >>
> >> .Mike
> >>
> > _______________________________________________
> > SAP-WUG mailing list
> > SAP-WUG at mit.edu
> > http://mailman.mit.edu/mailman/listinfo/sap-wug
> > 
> > 
> > 
> > _______________________________________________
> > SAP-WUG mailing list
> > SAP-WUG at mit.edu
> > http://mailman.mit.edu/mailman/listinfo/sap-wug
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug



More information about the SAP-WUG mailing list