2009 Jun 16 11:34 AM
Hi ,
why we use cl_Exithandler class to get instance of badi .
why dot we create directly create object and cal the implemented methods of badi .
Regards
kiran.
2009 Jun 22 7:18 PM
Hello Kiran,
class CL_EXITHANDLER=>get_instance method will get adapter class of badi definition.
you cannot instantiate badi difinition directely. because badi difinition only contain interface.
You need to implement interface methods in adapter class. Adaptor class will be creating once you creating implementation of the BADI defition part by inheriting all the methods of interface.
Once you have activated BADI implementaion then you can able to instantiate adaptor class by using CL_EXITHANDLER=>get_instance .
Once you instantiate your adaptor class then only you can able to call active implemented methods by using adaptor class instance.
Hope it will resolve your doubts
Hi ,
why we use cl_Exithandler class to get instance of badi .
why dot we create directly create object and cal the implemented methods of badi .
Regards
kiran.
2009 Jun 16 11:40 AM
Hi,
The class cl_Exithandler determines the current active implementation of the BADI and gives the same.
Regards,
Ankur Parab
2009 Jun 16 11:46 AM
hai kumar,
CL_EXITHANDLER is the class interface , by using the method get_instance we can call the badi definition in the code , it Returns a Reference to a Generated Exit Class
u can create a badi definition and u can assign the badi definition in your own code using the method of cl_exithandler , and then ur badi cna be implemented
m.a
2009 Jun 22 9:00 AM
hi buddy,
the cl_handler class is used when u work with classic badis.
now whenever a badi is being defined a badi class gets created.
now this class implements actually the methods of its interface class.
so now a ref variable of type interface class is being created.
now this ref variable is the used in the cl_handler class to correctly implement only the methods of the interface n not of any other class.
as with new badis. this thing has been removed as now the work is done by the kernel itself ...
hope this will help you!!!
Thanks & Regards,
Punit Raval.
2009 Jun 22 7:18 PM
Hello Kiran,
class CL_EXITHANDLER=>get_instance method will get adapter class of badi definition.
you cannot instantiate badi difinition directely. because badi difinition only contain interface.
You need to implement interface methods in adapter class. Adaptor class will be creating once you creating implementation of the BADI defition part by inheriting all the methods of interface.
Once you have activated BADI implementaion then you can able to instantiate adaptor class by using CL_EXITHANDLER=>get_instance .
Once you instantiate your adaptor class then only you can able to call active implemented methods by using adaptor class instance.
Hope it will resolve your doubts