2008 May 05 11:20 AM
hi
what is cl_exithandler.
where it can be uised
2008 May 05 11:42 AM
Hi,
cl_exithandler is the class which contains the Ext. Services Within Framework of Exit Technique.
This is used in enhancments. U can use this for to find the BADI. This is a class which has a method 'GET_INSTANCE' which is used to trigger BADI's from the Standard Program. This class is used to identify the User Exit suitable for the requirement and that is available in the system.
For example: u can find athe exit in the following way using cl_exithandler
Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for CL_EXITHANDLER=>GET_INSTANCE.
Make sure the radio button In main program is checked. A list of all the programs with call to the BADIs will be listed.
The export parameter EXIT_NAME for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter INSTANCE will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
Reward if helpful.
Regards
ChandraK
2008 May 05 1:26 PM
Hi Chaitu,
First go to any transaction->iN THE menu bar SYSTEM->STATUS->Get the program name ->double click->u will go to the program attached to the tcode. Now search term will be CALL CL_EXITHANDLER. Now u will get list of BADI'S available..
Goto SE24->Give class name as CL_EXITHANDLER->Display->double click on get_instance mathod->Now u will go inside the method->Now put break point on the cl_exithandler. Now go to any transaction code and pass dat..U will see that it will be stopped on the break point which u set on the cl_exithandler...In the exit name u can find list of badi's attached to the tcode..
There are multiple ways of searching for BADI.
Ø Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
Ø Finding BADI Using SQL Trace (TCODE-ST05).
Ø Finding BADI Using Repository Information System (TCODE- SE84).
1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for CL_EXITHANDLER=>GET_INSTANCE.Make sure the radio button In main program is checked. A list of all the programs with call to the BADIs will be listed.The export parameter EXIT_NAME for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter INSTANCE will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
or
1. Go to the TCode SE24 and enter CL_EXITHANDLER as object type.
2. In 'Display' mode, go to 'Methods' tab.
3. Double click the method 'Get Instance' to display it source code.
4. Set a breakpoint on 'CALL METHOD cl_exithandler=>get_class_name_by_interface'.
5. Then run your transaction.
6. The screen will stop at this method.
7. Check the value of parameter 'EXIT_NAME'. It will show you the BADI for that transaction.
now you can know the use of it.
thanks
karthik
2010 Sep 11 3:04 PM
2008 May 05 1:40 PM
Hi
we use cl_exithandler to find the badi name.....
when u r searching for a badi for a particular transaction the we goto the transaction...........in menu bar ...SYSTEM---STATUS...in that double click on the program name .....then using in find..we search for cl_exithandler=>get_instance..then u wil get all the badis used in that transaction.......double click on each one to know which badi is suitable for u r requirement.....when u double click on the badi name it wil take u to source code in that u wil get the instance name....
if u remove the prefix if_ex_ u wil get the badi name..................