BOR Methods

Griffiths, Mark mark.griffiths at sap.com
Mon Dec 11 05:46:48 EST 2000


You are correct that this will cause an endless loop, as when you activate
delegation the super type method is replaced by the subtype redefined
method. In effect you will be calling the same piece of code over and over.
 
 
Rather than redefining the method, why not create a new method 'zm1' and
call the original method from that. Alternatively you could just cut and
paste the standard code into your own method before your enhancements.
 
Hope this helps,
 
Mark
 
Mark Griffiths
SAP UK
 
-----Original Message-----
From: Raskin Alon x8008 [mailto:ARaskin at Citipower.com.au]
Sent: 07 December 2000 23:07
To: SAP-WUG at MITVMA.MIT.EDU
Subject: BOR Methods
 
 
                Hi Guys,
 
                Has anyone tried calling a super method from a sub-type
business object? Let's say that :
 
*       Object B is a subtype of Object A.
*       Object B redefines a method called m1 (originally defined in Object
A). The purpose of the redefined method is to extend the functionality
defined in "Object A method 1."
*       Object A is delegated down to Object B
 
                The first step in "Object B method 1" is to call "Object A
method1" and then after "Object A method1" is completed then execute some
further code to implement the extended functionality. I noticed that there
is an instance defined in include <cntn01> called 'super' which I assumed
was a reference to the super-type (in our case Object A) however It has not
worked.
 
                It seems that due to the delegation, an endless loop occurs.
 
                e.g.
                A program calls "Object A method1" which is the delegated
down to "Object B method1". The first step of "Object B method1" is to call
the super-type functionality (Object A method1) which (due to the
delegation) calls "Object B method1"!!! And so on.
 
                Help!
 
                Alon Raskin
                +61 3 411 691 396
 
 
 
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
 
This email message has been swept for the presence of computer viruses.
 
CitiPower Pty ACN 064 651 056
**********************************************************************
 


More information about the SAP-WUG mailing list