# SAP ECC BAdI List for MIGO, ME21N, MIRO, Deliveries and PM Orders

> Source: https://netray.co/tools/sap-ecc-classic-badi-definitions-mm-sd-pm-fi-reference
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Reference table of widely used BAdI definitions on SAP ECC 6.0 with interface, key methods, transactions and typical use, plus how to find a BAdI and where error messages are allowed.

## Category

sap

## Erp

SAP ECC 6.0

## Audience

- ABAP developer
- SAP technical lead
- SAP MM consultant

## Tool

**Kind:** worksheet

**Mode:** reference

**Columns:**

#### BAdI definition

**Key:** badi

**Type:** text

#### Type

**Key:** type

**Type:** text

#### Interface

**Key:** intf

**Type:** text

#### Key methods

**Key:** methods

**Type:** text

#### Transactions

**Key:** tcode

**Type:** text

#### Typical use

**Key:** use

**Type:** text

#### Note

**Key:** note

**Type:** text

**Rows:**

**Badi:** ME_PROCESS_PO_CUST

**Type:** Classic (SE18)

**Intf:** IF_EX_ME_PROCESS_PO_CUST

**Methods:** INITIALIZE, OPEN, PROCESS_HEADER, PROCESS_ITEM, PROCESS_SCHEDULE, PROCESS_ACCOUNT, CHECK, POST, CLOSE

**Tcode:** ME21N, ME22N, ME23N

**Use:** Field changes and checks on Enjoy POs through the IF_PURCHASE_ORDER_MM objects

**Note:** Use SET_DATA on the item object, not direct assignment; messages through MMPUR_MESSAGE macros

**Badi:** ME_GUI_PO_CUST

**Type:** Classic (SE18)

**Intf:** IF_EX_ME_GUI_PO_CUST

**Methods:** SUBSCRIBE, MAP_DYNPRO_FIELDS, TRANSPORT_FROM_MODEL, TRANSPORT_TO_DYNP, TRANSPORT_FROM_DYNP, TRANSPORT_TO_MODEL

**Tcode:** ME21N, ME22N, ME23N

**Use:** Custom tab on PO header or item without MM06E005

**Note:** Pair with ME_PROCESS_PO_CUST to validate the fields

**Badi:** ME_PROCESS_REQ_CUST

**Type:** Classic (SE18)

**Intf:** IF_EX_ME_PROCESS_REQ_CUST

**Methods:** INITIALIZE, OPEN, PROCESS_HEADER, PROCESS_ITEM, PROCESS_ACCOUNT, CHECK, POST, CLOSE

**Tcode:** ME51N, ME52N, ME53N

**Use:** Checks and defaults on Enjoy requisitions

**Note:** Same object model as the PO BAdI with IF_PURCHASE_REQUISITION_ITEM

**Badi:** ME_REQ_POSTED

**Type:** Classic (SE18)

**Intf:** IF_EX_ME_REQ_POSTED

**Methods:** POSTED

**Tcode:** ME51N, ME52N

**Use:** Follow-up actions after a requisition is posted

**Note:** Read-only view of the posted data

**Badi:** ME_PURCHDOC_POSTED

**Type:** Classic (SE18)

**Intf:** IF_EX_ME_PURCHDOC_POSTED

**Methods:** POSTED

**Tcode:** ME21N, ME22N

**Use:** Follow-up after a purchasing document is saved, e.g. Z log

**Note:** Not for changing PO data

**Badi:** ME_CHANGE_OUTTAB_CUS

**Type:** Classic (SE18)

**Intf:** IF_EX_ME_CHANGE_OUTTAB_CUS

**Methods:** FILL_OUTTAB

**Tcode:** ME2N, ME2M, ME2L

**Use:** Fill extra columns in purchasing list reports

**Note:** Fields must first be appended to the ALV output structure

**Badi:** ME_DEFINE_CALCTYPE

**Type:** Classic (SE18)

**Intf:** IF_EX_ME_DEFINE_CALCTYPE

**Methods:** DEFINE_CALCTYPE

**Tcode:** ME21N, ME22N

**Use:** Control the pricing type used when PO data changes

**Note:** Affects repricing, test with price changes

**Badi:** MB_MIGO_BADI

**Type:** Classic (SE18)

**Intf:** IF_EX_MB_MIGO_BADI

**Methods:** INIT, PBO_DETAIL, PAI_DETAIL, PBO_HEADER, PAI_HEADER, LINE_MODIFY, CHECK_ITEM, CHECK_HEADER, POST_DOCUMENT, RESET

**Tcode:** MIGO

**Use:** Custom tab in MIGO, item defaults, checks and posting of Z data

**Note:** Errors belong in CHECK_ITEM or CHECK_HEADER via the returned message table

**Badi:** MB_MIGO_ITEM_BADI

**Type:** Classic (SE18)

**Intf:** IF_EX_MB_MIGO_ITEM_BADI

**Methods:** ITEM_MODIFY

**Tcode:** MIGO

**Use:** Default item fields such as storage location or text

**Note:** Only certain fields can be changed

**Badi:** MB_CHECK_LINE_BADI

**Type:** Classic (SE18)

**Intf:** IF_EX_MB_CHECK_LINE_BADI

**Methods:** CHECK_LINE

**Tcode:** MIGO, MB1A, MB1B, MB1C

**Use:** Item-level validation of goods movements with error messages

**Note:** Right place for blocking errors before update

**Badi:** MB_DOCUMENT_BADI

**Type:** Classic (SE18)

**Intf:** IF_EX_MB_DOCUMENT_BADI

**Methods:** MB_DOCUMENT_BEFORE_UPDATE, MB_DOCUMENT_UPDATE

**Tcode:** MIGO and all goods movements

**Use:** Read final MKPF and MSEG data and update Z tables

**Note:** No MESSAGE type E here; MB_DOCUMENT_UPDATE runs in the update task

**Badi:** INVOICE_UPDATE

**Type:** Classic (SE18)

**Intf:** IF_EX_INVOICE_UPDATE

**Methods:** CHANGE_AT_SAVE, CHANGE_BEFORE_UPDATE, CHANGE_IN_UPDATE

**Tcode:** MIRO, MIR7

**Use:** Checks at save and Z updates for logistics invoices

**Note:** Raise errors in CHANGE_AT_SAVE, not in the update methods

**Badi:** MRM_HEADER_DEFAULT

**Type:** Classic (SE18)

**Intf:** IF_EX_MRM_HEADER_DEFAULT

**Methods:** HEADER_DEFAULT_SET

**Tcode:** MIRO

**Use:** Default invoice header fields such as document type

**Note:** Called at start of entry

**Badi:** MRM_PAYMENT_TERMS

**Type:** Classic (SE18)

**Intf:** IF_EX_MRM_PAYMENT_TERMS

**Methods:** PAYMENT_TERMS_SET

**Tcode:** MIRO

**Use:** Set payment terms, baseline date or block in invoice

**Note:** Check against vendor master terms

**Badi:** LE_SHP_DELIVERY_PROC

**Type:** Classic (SE18)

**Intf:** IF_EX_LE_SHP_DELIVERY_PROC

**Methods:** CHANGE_DELIVERY_HEADER, CHANGE_DELIVERY_ITEM, CHECK_ITEM_DELETION, DELIVERY_FINAL_CHECK, SAVE_DOCUMENT_PREPARE, SAVE_AND_PUBLISH_DOCUMENT, FILL_DELIVERY_ITEM

**Tcode:** VL01N, VL02N, VL10 series

**Use:** BAdI replacement for most MV50AFZ1 form exits

**Note:** Errors are returned in the CT_FINCHDEL table in DELIVERY_FINAL_CHECK

**Badi:** LE_SHP_DELIVERY_UPDATE

**Type:** Classic (SE18)

**Intf:** IF_EX_LE_SHP_DELIVERY_UPDATE

**Methods:** UPDATE_HEADER, UPDATE_ITEM

**Tcode:** VL01N, VL02N

**Use:** Update Z tables with delivery data

**Note:** Runs during update, no dialog

**Badi:** LE_SHP_TAB_CUST_HEAD

**Type:** Classic (SE18)

**Intf:** IF_EX_LE_SHP_TAB_CUST_HEAD

**Methods:** ACTIVATE_TAB_PAGE, TRANSFER_DATA_TO_SUBSCREEN, TRANSFER_DATA_FROM_SUBSCREEN, PASS_FCODE_TO_SUBSCREEN

**Tcode:** VL01N, VL02N, VL03N

**Use:** Custom tab on delivery header

**Note:** Item version: LE_SHP_TAB_CUST_ITEM

**Badi:** LE_SHP_TAB_CUST_ITEM

**Type:** Classic (SE18)

**Intf:** IF_EX_LE_SHP_TAB_CUST_ITEM

**Methods:** ACTIVATE_TAB_PAGE, TRANSFER_DATA_TO_SUBSCREEN, TRANSFER_DATA_FROM_SUBSCREEN, PASS_FCODE_TO_SUBSCREEN

**Tcode:** VL01N, VL02N, VL03N

**Use:** Custom tab on delivery item

**Note:** Needs a subscreen in your own program

**Badi:** WORKORDER_UPDATE

**Type:** Classic (SE18)

**Intf:** IF_EX_WORKORDER_UPDATE

**Methods:** INITIALIZE, AT_SAVE, AT_RELEASE, BEFORE_UPDATE, IN_UPDATE

**Tcode:** CO01, CO02, IW31, IW32

**Use:** Checks at save or release of production and maintenance orders

**Note:** Errors in AT_SAVE and AT_RELEASE; BEFORE_UPDATE and IN_UPDATE are too late

**Badi:** WORKORDER_GOODSMVT

**Type:** Classic (SE18)

**Intf:** IF_EX_WORKORDER_GOODSMVT

**Methods:** GOODS_RECEIPT, COMPLETE_GOODSMOVEMENT

**Tcode:** CO11N, CO15, MIGO (order GR)

**Use:** Change goods movements created by order confirmation

**Note:** Check the full method list in SE18 for backflush scenarios

**Badi:** WORKORDER_CONFIRM

**Type:** Classic (SE18)

**Intf:** IF_EX_WORKORDER_CONFIRM

**Methods:** AT_SAVE, AT_CANCEL_CHECK, IN_UPDATE

**Tcode:** CO11N, CO15

**Use:** Validate confirmations or block cancellations

**Note:** Raise errors in AT_SAVE

**Badi:** WORKORDER_INFOSYSTEM

**Type:** Classic (SE18)

**Intf:** IF_EX_WORKORDER_INFOSYSTEM

**Methods:** TABLES_MODIFY_LAY

**Tcode:** COOIS, COOISPI

**Use:** Fill custom columns in the order information system

**Note:** Fields go into the layout structure appends, e.g. IOHEADER

**Badi:** BADI_MATERIAL_CHECK

**Type:** Classic (SE18)

**Intf:** IF_EX_BADI_MATERIAL_CHECK

**Methods:** CHECK_DATA

**Tcode:** MM01, MM02

**Use:** Material master validation at save

**Note:** Alternative to SMOD MGA00001

**Badi:** CUSTOMER_ADD_DATA

**Type:** Classic (SE18)

**Intf:** IF_EX_CUSTOMER_ADD_DATA

**Methods:** CHECK_ALL_DATA, SAVE_DATA, CHECK_ADD_ON_ACTIVE

**Tcode:** XD01, XD02, VD01, FD01

**Use:** Custom fields on customer master with screen group setup

**Note:** Screens via CUSTOMER_ADD_DATA_CS

**Badi:** VENDOR_ADD_DATA

**Type:** Classic (SE18)

**Intf:** IF_EX_VENDOR_ADD_DATA

**Methods:** CHECK_ALL_DATA, SAVE_DATA, CHECK_ADD_ON_ACTIVE

**Tcode:** XK01, XK02, MK01, FK01

**Use:** Custom fields on vendor master

**Note:** Screens via VENDOR_ADD_DATA_CS

**Badi:** AC_DOCUMENT

**Type:** Classic (SE18)

**Intf:** IF_EX_AC_DOCUMENT

**Methods:** CHANGE_INITIAL, CHANGE_AFTER_CHECK

**Tcode:** Postings from MM, SD, CO to FI

**Use:** Change FI document fields from the accounting interface, e.g. item text

**Note:** Only fields SAP allows to change; see the BAdI documentation in SE18

**Badi:** ACC_DOCUMENT

**Type:** Classic (SE18)

**Intf:** IF_EX_ACC_DOCUMENT

**Methods:** CHANGE

**Tcode:** BAPI_ACC_DOCUMENT_POST and related BAPIs

**Use:** Move EXTENSION2 data into the accounting document

**Note:** Filter-dependent by AWTYP; SAP ships example implementations

**Badi:** BADI_FDCB_SUBBAS01

**Type:** Classic (SE18)

**Intf:** IF_EX_BADI_FDCB_SUBBAS01

**Methods:** PUT_DATA_TO_SCREEN_OBJECT, GET_DATA_FROM_SCREEN_OBJECT

**Tcode:** FB60, FB70, MIRO

**Use:** Custom subscreen on the basic data tab of Enjoy FI entry

**Note:** Further variants (BADI_FDCB_SUBBAS02 and higher) exist for other subscreens

**Notes:** All rows are classic BAdIs maintained in SE18 and implemented in SE19 on ECC 6.0; newer kernel BAdIs belong to enhancement spots and are called with GET BADI / CALL BADI. Check multiple-use and filter settings for each definition in SE18 before creating a second implementation.

## Content

**Intro:** A searchable reference of widely used BAdI definitions on SAP ECC 6.0 for purchasing, goods movements, invoice verification, deliveries, production and maintenance orders and FI. Each row gives the interface, the methods you are most likely to implement and where errors can be raised.

**Sections:**

#### How to use it

**Body:** Search by transaction or object. Pick the method that runs at the moment you need: a dialog check needs a method that runs before the update task, such as CHECK_ITEM in MB_MIGO_BADI, CHECK_LINE in MB_CHECK_LINE_BADI or AT_SAVE in WORKORDER_UPDATE. Z table updates belong in update-time methods such as MB_DOCUMENT_UPDATE or LE_SHP_DELIVERY_UPDATE methods. Then open the definition in SE18, read its documentation and the multiple-use flag, and create the implementation in SE19 with a Z class.

#### Finding a BAdI on ECC

**Body:** For classic BAdIs, set a breakpoint in method GET_INSTANCE of class CL_EXITHANDLER in SE24, run the transaction and read the EXIT_NAME parameter at each stop; that lists every classic BAdI the transaction asks for. SE84 > Enhancements > Business Add-ins searches by package. An ST05 SQL trace filtered on views V_EXT_IMP and V_EXT_ACT also shows the classic BAdIs looked up. For kernel BAdIs, search the program for GET BADI and use SE18 with the enhancement spot.

**Bullets:**

- SE24: breakpoint in CL_EXITHANDLER=>GET_INSTANCE
- SE84: repository search for BAdIs by package
- ST05: trace reads on V_EXT_IMP and V_EXT_ACT
- SE19: list implementations and active status

#### Worked example: blocking a MIGO posting

**Body:** A plant wants to block goods issues to cost centers without a reason code. Coding MESSAGE type E in MB_DOCUMENT_BADI MB_DOCUMENT_BEFORE_UPDATE gives a short dump or update termination, because the document is already in the posting phase. Instead implement MB_CHECK_LINE_BADI CHECK_LINE (or MB_MIGO_BADI CHECK_ITEM, which returns a message table to MIGO) and return the error when BWART is 201 and GRUND is initial. The user sees the error in MIGO with the line highlighted and can fix it before posting.

#### Version differences and gotchas

**Body:** ME_PROCESS_PO_CUST changes must go through the object methods (GET_DATA and SET_DATA); assigning to the structure directly is ignored. Some BAdIs are single-use, so a second active implementation is refused; check SE18 before adding one beside a partner implementation. Filter-dependent BAdIs such as ACC_DOCUMENT need the right filter value or the implementation never runs. Enhancement packages added new kernel BAdIs in some areas, so search enhancement spots on your EHP level too.

**Cta:** If you want your developers to ask ECC which BAdI implementations are active and what they change, in plain English on your own servers, we can set that up.

**Faq:**

#### Which BAdI is used for MIGO?

**Answer:** MB_MIGO_BADI is the main MIGO BAdI: it adds a custom tab and has methods such as LINE_MODIFY, CHECK_ITEM and POST_DOCUMENT. MB_MIGO_ITEM_BADI defaults item fields, MB_CHECK_LINE_BADI validates lines, and MB_DOCUMENT_BADI reads the posted material document for follow-up updates.

#### Why can't I raise an error message in MB_DOCUMENT_BADI?

**Answer:** Its methods run while the material document is being posted, and MB_DOCUMENT_UPDATE runs in the update task. A MESSAGE type E there terminates the update instead of returning to the screen. Put blocking checks in MB_CHECK_LINE_BADI or MB_MIGO_BADI CHECK_ITEM, which run before posting.

#### What BAdI is used for ME21N?

**Answer:** ME_PROCESS_PO_CUST handles checks and field changes, with PROCESS_ITEM for item changes and CHECK for document-level validation. ME_GUI_PO_CUST adds custom screens. ME_PURCHDOC_POSTED runs after save. SMOD MM06E005 is the older exit route for custom fields.

#### What is the BAdI for MIRO?

**Answer:** INVOICE_UPDATE with CHANGE_AT_SAVE for checks and CHANGE_BEFORE_UPDATE or CHANGE_IN_UPDATE for follow-up updates. MRM_HEADER_DEFAULT and MRM_PAYMENT_TERMS set defaults, and BADI_FDCB_SUBBAS01 adds a subscreen to the basic data tab.

## Search terms

sap badi for migo, sap badi for me21n, sap badi le_shp_delivery_proc, sap badi workorder_update, sap badi for miro, sap mb_document_badi error message, me_process_po_cust methods, sap ecc badi list

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
