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 .
Suvana Smith .
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 .
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.