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: 

BADIs Vs Exits

Former Member
0 Kudos

Hi Experts,

Pls. list out the differences between the BADI and an User-Exit?

ThanQ.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

BADis are implemented in an object oriented way, using classes and interfaces, user exits use embedded forms(subroutines) or more commonly function modules. But they are designed to do the same thing, provide the customer a place to implemented custom code

Regards

Rich Heilman

11 REPLIES 11

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

BADis are implemented in an object oriented way, using classes and interfaces, user exits use embedded forms(subroutines) or more commonly function modules. But they are designed to do the same thing, provide the customer a place to implemented custom code

Regards

Rich Heilman

0 Kudos

ThanQ. BADIs r reusable in contrast to Exits. Can U explain me(this advantage of Reusability) by taking one example?

Thanx.

0 Kudos

I would say no, not sure where you got that. The BADIs are implemented at certain points in standard programs(just like regular user exits) the hooks are provided by interfaces and implemented via a class, which is why I said they are implemented in an OO way.

Regards,

RIch Heilman

0 Kudos

Hi

Itz not right to say that Badi's are reusable instead you can say that Badi's can have multiple implementation where user exits/customer exits cannot.

Cheers,

Hakim

0 Kudos

ThanQ Abdul.

Pls. explain me by giving one example.

ThaQ in adv..

Former Member
0 Kudos

Hi Guys,

Still, anybody does hv any more ideas?

Thank you.

ferry_lianto
Active Contributor
0 Kudos

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 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,

Ferry Lianto

0 Kudos

Thanq Ferry.

0 Kudos

Hi Ferry,

I have gone through the PDF document ( i.e. http://www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf), which was u suggested in ur last answer.

In the bottom portion of the page 9, the writer used the PADIV_MODULE as Filetr type and Z123 a value for filetr value.

So, culd u pls. explain me my doubts like,

1- What does contains the PADIV_MODULE, is it contains the ABAP logic?

2-Where it resides?

3-How the writer picked it, I mean on What selection criteria?

4- Coming to Z123, again What does it contains? Where its defined?

5-The Z123, How it works? I mean What it wuld do?

If possible with example.

ThanQ.

ferry_lianto
Active Contributor
0 Kudos

Hi,

1. What does contains the PADIV_MODULE, is it contains the ABAP logic?

Filter type PADIV_MODULE is refer to data element PADIV_MODULE.

2. Where it resides?

You can check data element PADIV_MODULE using SE11 that links to domain PADIV_MODULE. There is value table T511IV_M which stores all values available for indirect evaluation module.

3. How the writer picked it, I mean on What selection criteria?

Refer to value table T511IV_M

4. Coming to Z123, again What does it contains? Where its defined?

Refer to value table T511IV_M.

Also check this blog for more informatino on how to use filter.

/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

Regards,

Ferry Lianto

0 Kudos

ThanQ Ferrry. Let me go thru it.