[Badi] how to find badi (from Jack Wu) from SAP)

Source: Internet
Author: User

Http://blog.csdn.net/CompassButton/archive/2006/09/16/1231652.aspx

 

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). "-----> month of this month
Loop at it_xlikp into wa_likp.
Check IS_V50AGL-WARENAUSG_STORNO = 'x'. "---> stands for GI cancel
If wa_likp-WADAT_IST + 4 (2) <thismonth.
Wa_log-VBELN = cs_likp-vbeln.
Wa_log-MSGTY = 'E'. "Please keep your breath
Wa_log-MSGID = 'zdn _ error'. "This class needs to be built by yourself
Wa_log-MSGNO = '001 '.
Append wa_log to ct_log. "error log failed
Endif.
Endloop.
Endmethod.

5. supplement several changes to Badi after version 7.00

    • previously cl_exithandler => get_prog_and_dynp_for_subscr was replaced by cl_enh_badi_runtime_functions => handler.
    • the previous put_data_to_screen and get_data_from_screen are not required. You can create your own data transmission function and call it through call Badi.
    • you do not need to call the cl_exithandler => set_instance_for_subscreens and cl_exithandler => callback functions. these methods are now unnecessary as they only place the Badi reference in a temporary storage.
      set_instance_for_subscreens is no longer necessary.
      get_instance_for_subscreens can, if necessary, be replaced by get Badi.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.