06-26-2008 10:49 AM
Hi xperts,
Is it possible to create our own custom badi (not implementation of custom one) and attached to the user exit of the standard code.
If so please let me know the steps and reference.
Thanks.
06-26-2008 10:54 AM
06-26-2008 10:57 AM
hi,
check this link to create custom badi.
http://www.saptechnical.com/Tutorials/ExitsBADIs/DefineBADI/page1.htm
06-26-2008 11:10 AM
Hi
Yes u can, I don't know if it makes sense but u can.
U can create a your own BADI defination by trx SE18, after creating it the system automatically creates the interface, so u need to implement it.
In the interface u need to defines all elements (methods, attributes,...) of the BADI.
Now u can implement the code to call the BADI in the user-exit, something like this:
* Define the object for the BADI:
DATA: MY_BADI TYPE REF TO Z_IF_EX_ <---- Interface of BADI
* Create the instance for the BADI object:
CALL METHOD cl_exithandler=>get_instance
CHANGING instance = MY_BADI.
* Call the method of BADI u need
IF NOT MY_BADI IS INITIAL.
CALL METHOD MY_BADI->MY_METHOD.
ENDIF.
Max
Edited by: max bianchi on Jun 26, 2008 12:12 PM