‎2012 Jun 04 1:36 PM
Hello,
I have created a custom BADI definition of multiple use type and one implementation for it n it is working fine but now i want to create multiple implementations for it.
But when im trying to use method of second implementation in my program its raising an error that this method is not defined.
Hope u understand my query.Plz explain me with an example that how to implement multiple use BADI's.
Thanx n Regards
Mouneesh
‎2012 Jun 04 1:39 PM
Hi,
Initially u have to deactivate ur first implementation in CMOD transaction and then go on to activate new method in implementation as only one implementation remains active at a time in BADIs.
Regards..
Surya
‎2012 Jun 04 2:50 PM
Hi, Take the example of the badi definition 'ACC_DOCUMENT' which has the option 'Multiple Use' ticked in the propertied tab. This badi has interface 'IF_EX_ACC_DOCUMENT' which has two methods 'CHANGE' and 'FILL_ACCIT'.
Let us assume that we are creating a implementation ZIMPL1 for this badi using the tcode SE19. While creating the implementation, SAP proposes a ZCL1 class which can be used to implement the interface methods 'CHANGE' and 'FILL_ACCIT'.
You can also create another implementaiton ZIMPL2 which will have class ZCL2 to implement the interface methods.
Like above, you can create multiple implementations for the badi if the option 'Multiple Use' is ticket.
Hope this information helps.
‎2012 Jun 04 9:04 PM
Hi Mouneesh,
Mouneesh Raj wrote:
I have created a custom BADI definition of multiple use type and one implementation for it
Are you sure you want to create a BAdI definition? This is usually reserved to SAP or for advanced programmers who develop applications that other could enhance.
But when im trying to use method of second implementation in my program its raising an error that this method is not defined.
When you have a BAdI definition with multiple implementations allowed, the calling program must call the method once, and SAP will call automatically all the implementations.
Could you give us more details about what you want to do, what is the context and what is your code?
Regards
Sandra