[ZT]How to search for BADIs,如何查找BADI
2007-11-13 16:56
609 查看
如何查找BAdi https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3480 1、打开运行事务码: ST05 选择“table buffer trace”而不是常用的"SQL trace" 2、activate trace 3、运行事务码:BP 4、创建一个BP,保存 5、deactivate trace 6、点击display trace,在出来的选择条件中: objects中输入:V_EXT_IMP和V_EXT_ACT;在operations中输入“OPEN” 7、查询 IntroductionThere are multiple ways of searching for BAdIs. My favorite one is using the Performance Trace (formerly known as SQL trace) transaction code ST05.This analyzing technique is based on the fact that all BAdIs are registrated in SAP database tables. So for each BAdI call these database tables will be accessed. The BAdI database tables are SXS_INTER, SXC_EXIT, SXC_CLASS and SXC_ATTR. These tables are always accessed by the views V_EXT_IMP and V_EXT_ACT. So these two ABAP views (T: SE11) will be the basis for the trace. This blog will not describe how to implement BAdIs. See http://help.sap.com/ for more information on implementing a BAdI. The procedure to discover BAdIs by a Performance Trace will be explained by using the example used below. Example caseI want to know which BAdIs are called in the transaction "Maintain Business Partners" transaction code BP.Pre checksCheck if no other users (T:SM04) or batch jobs (T: SM50) are using the same user as you do.Trace ActionsStart the Performance traceStart transaction ST05 (Performance Analysis)Set flag field "Buffer trace" Remark: We need to trace also the buffer calls, because BAdI database tables are buffered. (especially view V_EXT_IMP and V_EXT_ACT) Push button "Activate Trace" Execute the Business transactionStart transaction BP in a new GUI sessionPush button "Organization" Fill in your test data
Performance traceGo back to the Performance trace sessionPush button "Deactivate Trace" Analyzing the Trace ListShowing the Trace ListPush button "Display Trace"The popup screen "Set Restrictions for Displaying Trace" appears Now we are going to filter the trace on Objects: V_EXT_IMP and V_EXT_ACT. Push button "Multiple selections" button behind field Objects Fill: V_EXT_IMP and V_EXT_ACT Push button "Copy (F8)" Fill Operations: OPEN Push button Enter See the result: Interpreting the Trace listAll the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BAdI class interfaces. The BAdI name is after the IF_EX_.So the BAdI name of IF_EX_ADDR_LANGU_TO_VERS is ADDR_LANGU_TO_VERS. In transaction SE18 you can see the BAdI definition. (If you can’t find the BAdI definition name, search in table SXS_INTER.) Exporting the Trace listIf you’d like to keep your analysis, you can export it to Excel file format.Actually the file will be saved in tab separated file format, but giving the file the extension .xls it will automatically be opened by Excel. Start menu: List > Save > Local File Select Spreadsheet Push Enter Fill your preferred file location and file name Push button "Generate" Open the file (in Excel) Delete the columns and rows you don’t need and the result looks like: View V_EXT_IMP and V_EXT_ACTThe reason for filtering the result not only on the view V_EXT_IMP but also on V_EXT_ACT is necessary, because not all BAdIs are implemented in the same way.For example: V_EXT_IMP catches BAdI BPTIME_BP001. V_EXT_ACT catches BAdI ADDRESS_SEARCH TipsMake a full test entry in the Business transaction before starting the Performance analysis.So during the Performance trace you won’t make mistakes. Making mistakes during the recording will cause extra trace lines in your trace list. Try to start with an empty Business transaction screen. This tip is best explained by an example. When I restart transaction BP after I have created, displayed or changed a business partner, the last opened business partner will be displayed automatically. This means also I will get extra trace lines in my trace list. To start again with an empty business partner screen you have to close all GUI sessions and login again. In the Business transaction you need to fill all required fields so all BAdIs will be called. Appendix BP analysis
|
相关文章推荐
- How to search for BAdIs
- How to change the language to English for Oracle SQL Developer(如何将SQL developer改成英文界面)
- 如何给上传控件上色【HOW TO SET CSS FOR THE CONTROL OF FILEUPLOAD】
- How to reuse old PCs for Solr Search Platform?
- How to write a good design document for peer engineers (如何写一份给工程师看的技术文档)
- How to search for STUFF at google
- How to search for a taglib's code (from wiki)
- How to change the language to English for Oracle SQL Developer(如何将SQL developer改成英文界面)
- [ZT]如何修复linux硬盘坏块(bad block howto)
- Android 如何在自定义界面上启用输入法 (How to enable inputmethod for the custom UI)
- How to write a good design document for peer engineers (如何写一份给工程师看的技术文档)
- 如何在QT for S60 中使用pthread库(Carbide.c++) (How to use pthread in QT4.6 for S60)
- Android 如何在自定义界面上启用输入法 (How to enable inputmethod for the custom UI)
- How to search for COM and DCOM Knowledge Base articles
- How To Gather Information for Effective Troubleshooting of Performance Issues [ZT-from MS]
- How to write a good design document for peer engineers (如何写一份给工程师看的技术文档)
- SAP Skill - How to search a field for which table it belongs
- 如何在Android设备中用NDK编译SQLite并且对SQLite进行操作(增删)-How to Compile SQLite for Android using NDK
- Android 如何在自定义界面上启用输入法 (How to enable inputmethod for the custom UI)
- How to write a good design document for peer engineers (如何写一份给工程师看的技术文档)