Delegation and Inheritance between Business Objects

Mike Gambier madgambler at hotmail.com
Mon Jan 28 07:58:47 EST 2008


Hi Jake,
 
The short answer to your question, I believe, is 'no'. You can't make a Business Object Superclass inherit the attributes/methods/events of a delegated subclass, or even the subtype of it's subtype. Business Objects don't behave that way, it's pretty much a one-way street down from the Superclass and a simple widening cast back up (so the nature of the subtype is hidden and has not effect on the superclass no matter how many levels you go down).
 
If what you wanted to happen did happen at the moment it would make a mockery of inheritance. After all, what's the point of creating a subtype if anything you change on it also becomes immediately available on the parent thereby changing it too? Also what would happen to the Superclass as soon as you changed the delegation or abandoned the delegation altogether if A Superclass really did car about how subtypes behaved?
 
That's not to say what you want to happen isn't possible at all though. Have you considered writing yourself an Interface Object that can be 'shared' between your two subtypes? I think you could subtype BUS1001 (creating a delegated version) which could then be enhanced with your new interface object and inherit (at least in signature form) all of its attributes/methods/events. You could do the same interface to your ZBUS1001006 object.
 
That way you could implement a 'common' set of code called by both objects if that's what you wanted to do. That's what an interface object is really for.
 
Mike GT> Subject: Delegation and Inheritance between Business Objects> Date: Fri, 25 Jan 2008 16:27:09 -0600> From: jake.schmidt at spiritaero.com> To: sap-wug at mit.edu> > Greetings and here I go...> Currently BUS1001 is the supertype for BUS1001006. BUS1001006 is the> supertype for ZBUS1001006. All of the custom attributes, methods and> events are of course on ZBUS1001006. My problem is that while> BUS1001006 inherits all of the new attribs, methods and events, BUS1001> does not. So instead of a simple supertype subtype relationship. I> want to establish a supertype subtype subtype relation if you will. > I'm under the impression that this is possible. I've verified that> delegation has been setup between the business objects, but still have> no luck. Perhaps you can verify if this is even possible.> > And incase someone out there has a better solution let me explain why I> want BUS1001 to inherit all of ZBUS1001006. If you are familiar with> the "Services for Objects" button found in transactions such as MM03,> CV03N, and CC03 you may notice there is a workflow section. When you> select workflow overview an overview of all workflows associated with> that object are displayed. For my documents(DRAW) and change> masters(ECM) this button works great. I must make sure that the> triggering event for the workflow is the supertype (DRAW or ECM as> opposed to ZDRAW or ZECM). Well I've found that BUS1001006 does not> work like DRAW or ECM. When I tested BUS1001 it worked great and> provided access to the objects history in workflow from using MM03. My> company perfers to do this rather than granting users SWI6.> Any advice would be appreciated!> > Thanks> Jake Schmidt> Spirit Aerosystems> > _______________________________________________> SAP-WUG mailing list> SAP-WUG at mit.edu> http://mailman.mit.edu/mailman/listinfo/sap-wug
_________________________________________________________________
Free games, great prizes - get gaming at Gamesbox. 
http://www.searchgamesbox.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20080128/0a533472/attachment.htm


More information about the SAP-WUG mailing list