BOR Methods

Raskin Alon x8008 ARaskin at Citipower.com.au
Mon Dec 11 18:10:24 EST 2000


Hi Mark,
 
Yes, creating a new method m1 would definitely work but its not really
effective if I want to redefine a standard SAP method (such as DISPLAY). In
regards to your second suggestion, this is what I am currently doing
(cutting and pasting code). This is working fine however, if SAP deliver new
code (for example in and upgrade) then my method would not be updated. This
increases the maintenance effort substantially.
 
Regards,
Alon Raskin
 
                -----Original Message-----
                From:   Griffiths, Mark [mailto:mark.griffiths at sap.com]
                Sent:   Monday, 11 December 2000 08:47 PM
                To:     SAP-WUG at MITVMA.MIT.EDU
                Subject:        Re: BOR Methods
 
                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