How to develop BADI (abap)
A. BAdI Definition
1. SE18
2. Enter the name for the BAdI to be created in customer namespace and press "Create".
3. Enter a definition for your BAdI and on the interface tab enter a name for the BAdI interface. SAP proposes a name and it is pretty good. Meanwhile a BAdI class is also created which is not in our concern.
e.g for "ZTEST", SAP proposes "ZIF_EX_TEST" for the interface and "ZCL_EX_TEST" for the class.
4. Save your BAdI.
5. Double-click on the interface name. It will pass to a Class Builder session to make you implement your interface. If you are not familiar to the Class Builder; it's a bit like Function Builder and it will be easy to discover its procedure.
6. Save and activate your interface.
B. Calling your BAdI from an application program
1. Declare a reference variable with reference to the Business Add-In interface.
e.g. DATA exit_ref TYPE REF TO zif_ex_test.
2. Call the static method GET_INSTANCE of the service class CL_EXITHANDLER. This returns an instance of the required object.
e.g.
CALL METHOD CL_EXITHANDLER=>GET_INSTANCE
CHANGING instance = exit_ref .
3. After those two steps, you can now call all of the methods of the BAdI where it is required in your program. Make sure you specify the method interfaces correctly.
C. BAdI Implementations
1. SE19
2. Enter the name for the BAdI implementation to be created in customer namespace and press "Create".
3. It will request the BAdI definition name to which this implementation will be tied.
4. Enter a definition for your implementation and on the interface tab enter a name for the implementing class. Again SAP proposes a name and it is pretty good.
e.g for "ZIMPTEST", SAP proposes "ZCL_IM_IMPTEST".
5. Save your implementation.
6. To implement a method, just double-click on the method name and you will be taken to the Class Builder to write the code for it. Here you redefine the BAdI interface methods.
7. You must activate your implementation to make it executable. You can only activate or deactivate an implementation in its original system without modification. The activation or deactivation must be transported into subsequent systems
That's all. For further details, i.e. filter-dependence, multi-usage, menu nehancements etc... you can have a look at course materials of BC425 "Enhancements and Modifications".
轉:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29829936/viewspace-1598625/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- How to develop locally a Laravel app using LaragondevLaravelAPPGo
- How develop BigData Project in Visual StudiodevProject
- How to update BOL entity property value via ABAP code
- 根據ABAP BAdI definition名稱找到SPRO裡配置路徑的辦法
- Developdev
- BAdI簡介
- BAdI: Web ItemWeb
- BAdI: InfoSpoke with TransformationORM
- BADI的實現
- 出口和BADI查詢
- Eclipse develop JavabeansEclipsedevJavaBean
- BADI的實現步驟
- [轉帖]SAP BADI應用
- Image Noise Reduction Develop Proceduredev
- Oracle vs PostgreSQL Develop(18) - BooleanOracleSQLdevBoolean
- Oracle vs PostgreSQL Develop(15) - DISTINCT ONOracleSQLdev
- Oracle vs PostgreSQL Develop(17) - ARRAYOracleSQLdev
- User Exits,Customer Exits,BAdI and BTE
- BAdI: Customer-defined Functions in Formula BuilderFunctionORMUI
- 根據TCode查詢User Exit and BADI
- Oracle vs PostgreSQL Develop(26) - ASCII 0OracleSQLdevASCII
- Would you like to develop a story for your character?dev
- Oracle vs PostgreSQL Develop(20) - Materialized ViewOracleSQLdevZedView
- Oracle vs PostgreSQL Develop(19) - PIPE ROWOracleSQLdev
- Oracle vs PostgreSQL Develop(16) - Prepared StatementOracleSQLdev
- PostgreSQL DBA(169) - Develop(Distinct vs Group by)SQLdev
- Oracle vs PostgreSQL Develop(28) - function overloadOracleSQLdevFunction
- PostgreSQL DBA(136) - Develop(Common Mistakes)SQLdev
- PostgreSQL DBA(99) - Develop(generate random string)SQLdevrandom
- PostgreSQL DBA(122) - Develop(EDB package)SQLdevPackage
- Oracle vs PostgreSQL Develop(31) - Index Only ScanOracleSQLdevIndex
- Oracle vs PostgreSQL Develop(29) - COMMIT in PLSQLOracleSQLdevMIT
- docker(一):Develop faster. Run anywhere.DockerdevAST
- PostgreSQL DBA(155) - Develop(“大表”連線)SQLdev
- Oracle vs PostgreSQL Develop(24) - subquery with agg functionOracleSQLdevFunction
- Oracle vs PostgreSQL Develop(30) - Index&Case whenOracleSQLdevIndex
- Develop:以女性為主角的遊戲銷量更高dev遊戲
- How to Find Out How Much Space an Index is UsingIndex