‎2007 Jul 16 6:31 AM
Dear Experts,
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 in advance.
‎2007 Jul 16 6:40 AM
Hi,
You can implement several BADIs based on the same definition if FILTER option or MULTIPLE USE option are active.
In this way you can have (implement) the same method does different actions according to the BADI where it's defined.
So you can use the FILTER to decide which method (BADI) has to work.
If the FILTER isn't active a definition of a BADI can use once, so it can implement only ones.
But if the flag MULTIPLY USE is active it can use the same BADI for several implematations.
In this case every BADIs'll works because there isn't a filter.
So you can implement several actions.
See this Weblogs,
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
See here:
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/cs/user/view/cs_msg/9494
http://www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
Regards,
Padmam.
‎2007 Jul 16 6:40 AM
Hi,
You can implement several BADIs based on the same definition if FILTER option or MULTIPLE USE option are active.
In this way you can have (implement) the same method does different actions according to the BADI where it's defined.
So you can use the FILTER to decide which method (BADI) has to work.
If the FILTER isn't active a definition of a BADI can use once, so it can implement only ones.
But if the flag MULTIPLY USE is active it can use the same BADI for several implematations.
In this case every BADIs'll works because there isn't a filter.
So you can implement several actions.
See this Weblogs,
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
See here:
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/cs/user/view/cs_msg/9494
http://www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
Regards,
Padmam.
‎2007 Jul 16 7:13 AM
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.
Pls do reward points if useful.
Regards,
Ameet
‎2007 Jul 16 7:15 AM
Hi,
check this sap Help..
Multiple Usability for BADI Definitions
Multiple use for BADI definitions means that there can be several active BADI implementations. When there is a call, they are all called up - however, in an unpredictable sequence.
If you have multiple-use BADI definitions, the sequence must not play any role therefore. A typical example is the execution of checks before a save
Each developer can deal with his / her own implementation without having to deal with other's logic.
Take a look at this series of this weblog ...
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
<b>Reward points</b>
Regards