As the third-generation user exit of SAP, Badi is widely used.ProgramEmployee confusions. Here I will introduce my personal application experience for your reference.
1. Information of Badi objects is stored in four tables: sxs_inter, sxc_exit, sxc_class, and sxc_attr (see the SECE package );
2. the sap program will call cl_exithandler => get_instance to determine whether an object exists and return an instance. In fact, get_instance is used to view the tables and their views (v_ext_imp and v_ext_act) query and search.
3. Based on this mechanism, I checked and used st05 to monitor a tcode for tracking. Then I chose to find the operations on the tables and views above to obtain the relevant Badi.
4. You can use the se18 lookup interface and se19 interface to enhance user experience.
Example: Use le_shp_delivery_proc to control the cross-month cancel
method if_ex_le_shp_delivery_proc ~ Change_delivery_header.
data: thismonth (2) type C.
data: wa_likp type line of shp_likp_t.
data: wa_log type line of shp_badi_error_log_t.
clear ct_log [], thismonth.
thismonth = sy-datum + 4 (2 ). "-----> the month of this month
loop at it_xlikp into wa_likp. & lt; BR & gt; check IS_V50AGL-WARENAUSG_STORNO = 'x '. "---> stands for GI cancel
If wa_likp-WADAT_IST + 4 (2) wa_log-MSGTY = 'E '. "error message
wa_log-MSGID = 'zdn _ error '. "This class should be built by yourself
wa_log-MSGNO = '001 '.
append wa_log to ct_log. "Error Log writing
endif.
endloop.
endmethod.