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

Former Member
0 Kudos

Dear All ,

I am working on BAdI Implementation . I know that in order to know the exit names and the BAdI names we use the class CL_EXITHANDLER and put a breakpoint in GET_INSTANCE method . This way we can get the BAdi name and the screen no. For any Standard T.Code .

For Example in case of T.code VL02 I got the BAdI Name BADI_LAYER on screen 101 .  And I have Implemented that BAdI in SE19 . Now my question is how will i know that what is the use of this BAdI . Not only for this BAdI , But for any BAdI how can we check what is the use of the BAdI or where exactly the BAdI is called in the standard report ?

I have worked on different BAdis like CUSTOMER_ADD_DATA for Customer Master , BADI_SD_CUST_HEAD for Billing invoices . But the way we work on these BAdIs is totally different from each other however the purpose of both the BAdIs is Same ----> to add additional screen .

Is there any standard way .

I hope I am clear with my question .

Thanks ,

Suvana Smith .


2 REPLIES 2

ramesh_mahankali
Active Participant
0 Kudos

Hi,

One way is to check the documentation available BAdI definition.Some BAdI will aslo have example implementations. You can see that example code and comments in the code will help you to find what the BAdI does.

Hope this helps.

Thanks,

Ramesh

Former Member
0 Kudos

How to know Purpose of a give BAdI ?

1. Check the SAP Standard Documentation of the BAdI which  SAP has provided for all most all customer BAdI's

2. By checking various methods provided in the BAdI which indetail gives you an idea about the importing data and exporting data, to know what can be used and what can be changed.

Where is the BAdI called from ?

1. Classic BAdIs are defined in SAP using OOABAP concept, so the class CL_EXITHANDLER only creates an instance for this BAdI and If there is an active implemenation then it is called.

2.  If you have placed a debugging point in the class CL_EXITHANDLER and method GET_INSTANCE then debug it till the end and come out of the method. you will be actually be taken to the main program where the instance is created. Hence that is the main program where the actual implementation will be called.

3. The other way is to do a where used list for BAdI defintion from SE18 , you can find the programs where the declarations are done and used.

I hope this helps .

Kernel BAdI.

1. If is different from the way the Classic BAdI's are Defined. It uses enhancement framework( preciously enhancement spot ) which holds the BAdI defintions.

2. If also defers the way SAP calls it, It does not uses Class CL_EXITHANDLER to create its instances rather the call is encapsulated in ABAP Statement defined in ABAP kernel.

e.g Get BAdI & Call BAdI.

Hence it is much faster then classic SAP BAdI's.