Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BADI Implementation Question

Former Member
0 Kudos

As I understand it, BADIs can and do have multiple implementations. Take for example BADI_SD_SALES. It has 20 implementation which I understand to mean 20 possible sets of ABAP code for the BADI methods.

What determines which implementation is executed when the BADI is called?

For example what determines if implementation ISM_SD_SALES is used as opposed to any other?

6 REPLIES 6

Former Member
0 Kudos

Wardell,

It is the filters which define which implementation to use.

Thanks,

Naren

0 Kudos

Narun,

Looking again at BADI_SD_SALES, it has 20 implementations and no filters. Since it has no filters are you saying that when this BADI is called, all 20 implementations are executed?

0 Kudos

Hi,

Yes, All the 20 implementation will be executed but in random order. One cannot define the sequence of execution of these implementations.

Check the F1 help on 'multiple use' check box iin se18 transactionfor more info.

Regards,

Shrinivas

0 Kudos

Shrinivas,

OK, I am wondering then what value there is in multiple implementations of a non-filtered BADI. Why would you just have one implementation with all of the code within one method.

As for a filtered BADI, again... what's the benefit? Why couldn't you just have one group of code with a CASE statement instead? (Other than the code being easier to read if it was in multiple places).

Former Member
0 Kudos

Hi,

The advantage of having multiple implementation is that the implementation can be made inactive if the functionality is not required..

meaning..if you have multiple implemetations..if you don't want one of the implemetation you can easily make the implementation inactive...and still continue to use the other implementations.

hope I am clear..

Thanks

Naren

0 Kudos

Thanks everyone. I see the purpose now. Having multiple implementations is just another way to manage code. I can see how turning off/one section of code is better than commenting/uncommenting ABAP code.

Points awarded.