BADI的查找和使用
一、BADI简介
BADI是SAP主要的增强的方式之一,目前BADI有两种:CLassic BADI 和 New BADI。两种BADI的基本原理差不多,但是具体的实现方式不同,具体的不同主要表现在以下三个方面。
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 position
SAPBADI详解:查找、使用与实施

文章介绍了SAP中的BADI(BusinessAdd-In)作为主要增强手段的两种类型——ClassicBADI和NewBADI,详细对比了它们的区别,包括创建方式、过滤值传递和调用方法。通过MB31收货举例展示了如何查找BADI,并提供了一个小程序用于快速定位。此外,文章还提到了使用SE18查看BADI接口和SE19进行BADI的实现过程。
最低0.47元/天 解锁文章
1144

被折叠的 条评论
为什么被折叠?



