SAP enhancement method to find articles Method1 BADI enhancement


BADI lookup method:
(1) by SE, the input CL_EXITHANDLER, and set a breakpoint in the process GET_INSTANCE then run exit_name transaction code determination value, the
operation is as follows:
input by SE, then enter cl_exithandler

 

 

 

Find GET_INSTANCE method, double-click get_instance set breakpoints view exit_name value of:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example: We are looking PO saving enhancements, which can be used BADI?
Foreground input ME21N, enter the breakpoint, EXIT_NAME = ME_GUI_PO_CUST

 

 

F8 , EXIT_NAME = GOS_SRV_SELECT

 

 

 F8 , EXIT_NAME = BADI_LAYER

 

 

 

 F8 Next, EXIT_NAME = ME_TAX_FROM_ADDRESS, did not go down BADI has a corresponding step 

Or directly test to save time, fill out the data, click Save;

 

 

 

 Did not stop in the class CL_EXITHANDLER breakpoint, the reason is: I have to finish, save time to look directly EXIT_NAME, the breakpoint is deleted;

OK to try again, this time to remember step before saving, and then set a breakpoint:
enter the break; the EXIT_NAME = ME_INFOREC_SEND

 

 

 I then clicked three times F8, get the expected result: EXIT_NAME =   ME_PURCHDOC_POSTED  

Before so I did not how to take decent with BADI, seniors are looking for advice or look online, it seems, there is a lot of knowledge of

 

 

 The next step is the

Then run to completion:

 

 

 

 

 Then the way

 (2) 通过st05跟踪 找BADI

badi对应的数据表为 SXS_INTER, SXC_EXIT, SXC_CLASS 和 SXC_ATTR,

而这些表都是通过视图 V_EXT_IMP 和  V_EXT_ACT 来查询的。


     1、打开运行事务码: ST05 选择“table buffer trace”而不是常用的"SQL trace"

     2、activate trace(开始跟踪)

     3、运行事务码:me21n

     4、创建一个采购订单,保存

     5、deactivate trace(结束跟踪)

     6、点击display trace,在出来的选择条件中: objects中输入:V_EXT_IMP和V_EXT_ACT;在 operations中输入“OPEN”

 

 

 

 

 7、查询

通过查询的结果可以看出,视图V_EXT_IMP的BADI的接口类名字都是以IF_EX_开头的,其中IF_EX_之后的就是对应BADI接口的定义。

 

 

 

 

 

 PO经常用到的BADI: ME_PROCESS_PO_CUST  ; ME_PURCHDOC_POSTED 

      

因为 ME_PROCESS_PO 仅能在 SAP 内部实施,如果要使用,要做相应的隐式增强(这个有机会可以研究

 

 

 还遇到这个例子,也是仅能内部实施,而且没有 _CUST

 

 

 这个BADI 勾上仅可SAP内部使用了,我想用这个  有办法吗 

这种BADI 直接使用不了,要去查看他有没有实施类,在实施类里做隐式增强

注意:sap的实现类你是不能跳过的,你要看下sap的实施类有没有被调用。然后在增强

 

Guess you like

Origin www.cnblogs.com/rainysblog/p/11974065.html