11-03-2009 3:33 AM
Hello GUrus
i have an existing BADI implementation, in that there is only one method for that implementation, but i want to create another method for that implementation, can i do that in the same implementation or do i need to create another implementation, if is so ( creating a new implementation ) , how do i create a new method in that implementation, do we need to declare all the signature ( importing, exporting, changing paramaters ) for that method or will the system will give it automatically
Thanks in Advance
11-03-2009 3:56 AM
Hello
If the BAdI is not defined for "Multiple Use" then you can have only a single active implementation.
You may change the existing implementation of the single method yet it if you define additional methods they will not be called by the SAP standard (except you are calling them within the implemented interface method).
Implementing a BAdI simply means to create a new class containing the BAdI interface. Thus, all methods and signatures are "copied" into your new class. The only thing that is missing is the ABAP coding within the interface methods.
Regards
Uwe
11-03-2009 4:08 AM
Hi Uwe
My BADI is of single use only and there will be only one active implementation, the point i want to know is :
i have the BADI -- SPC_POSTING_CONTROL and in that there is only one method CALC_ITEM_POST_CHECK in that interface, now i wnat to add another method to that interface, then how do i do that ?
Can i directly add another method to that interface ?
11-03-2009 4:31 AM
Hello
You cannot add any additional method to the BAdI interface but - of course - you can add them to your BAdI implementing class.
Regards
Uwe
11-03-2009 5:00 AM
so when i create an implementation to that interface still i have one method in that implementation class, so can i add another method to that implementation class ?
Edited by: ABAPER1234 on Nov 3, 2009 10:34 AM
11-03-2009 5:11 AM
you should not add any new methods. If you add any new method that method will not be called from the standarad program. In the SAP provided methods if you can write the code using the interface. You can not export the values back from your method to standarad program until and unless it is an exporting or changing parameter of the Method interface.
11-03-2009 5:20 AM
Hi,
As part of standard SAP delivery you cannot add another method to the BADI. If it is a customer BADI (or Z...BADI) you can add an additional method in the Interface of the BADI definition, and adjust the implementation of the BADI. Where as to the standard interface you cannot add another method and create multiple implementation (considering the BADI is not Multiple use).
One more thing, in order to implement the new method, which you are having in your mind, you need to modify the standard functionality that is provided by SAP and call the method to some how fit into existing functionality !!
Regards,
George