Classic BAdi and New BAdi
2条回复
-
Former Member2007年04月27日 04:521
hi,
Classic and new BAdIs differ in a number of features that are important for migration:
1. BAdI object
a. With classic BAdIs, a BAdI object is created by calling a factory method, and referenced via a reference variable of the type of the BAdI interface.
b. With new BAdIs, a BAdI object is created via the ABAP statement GET BADIas a handle for the calls of BAdI methods, and referenced via a reference variable of the type of the BAdI. A BAdI object is an instance of an internal BAdI class, which otherwise is invisible to the outside.
2. Passing comparison values for the filter
a. With the classical BAdIs, the filter values are stored in a structure and passed with the call of the BAdI methods.
b. With the new BAdIs, the comparison values for the filters used to search for implementations are passed when the BAdI object is created with the GET BADIstatement.
There is no way of migrating the call of the factory method one-to-one into the ABAP statement, because GET BADI can also return an existing BAdI object, which is not possible with the factory method.
3. Calling BAdI methods
Passing comparison values for the filter
a. A classic BAdI can be called only once and the call positions are registered centrally.
b. With new BAdIs, multiple calls are possible and the call positions are not registered centrally.
For the above reasons, an automatic call migration is not possible.
Have a look at below link.
http://help.sap.com/saphelp_nw2004s/helpdata/en/ee/6f3b42ea85b26be10000000a155106/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/4d3e42fc94aa04e10000000a1550b0/content.htm
I hope it helps.
Best Regards,
Reshma
-
Former Member2007年10月12日 02:570
Hi Dhanushka ,
I have the same issue like yours. But I still don't understand how your issue is solved by the answers given above. Can you please give more specific answer?
where to write the GET BADI and CALL BADI commands if there are no Enhancement Spot ? Is it correct to do it in implicit enhancement ?