SAP ECC BAdI List for MIGO, ME21N, MIRO, Deliveries and PM Orders
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.
| BAdI definition | Type | Interface | Key methods | Transactions | Typical use | Note |
|---|---|---|---|---|---|---|
ME_PROCESS_PO_CUST | Classic (SE18) | IF_EX_ME_PROCESS_PO_CUST | INITIALIZE, OPEN, PROCESS_HEADER, PROCESS_ITEM, PROCESS_SCHEDULE, PROCESS_ACCOUNT, CHECK, POST, CLOSE | ME21N, ME22N, ME23N | Field changes and checks on Enjoy POs through the IF_PURCHASE_ORDER_MM objects | Use SET_DATA on the item object, not direct assignment; messages through MMPUR_MESSAGE macros |
ME_GUI_PO_CUST | Classic (SE18) | IF_EX_ME_GUI_PO_CUST | SUBSCRIBE, MAP_DYNPRO_FIELDS, TRANSPORT_FROM_MODEL, TRANSPORT_TO_DYNP, TRANSPORT_FROM_DYNP, TRANSPORT_TO_MODEL | ME21N, ME22N, ME23N | Custom tab on PO header or item without MM06E005 | Pair with ME_PROCESS_PO_CUST to validate the fields |
ME_PROCESS_REQ_CUST | Classic (SE18) | IF_EX_ME_PROCESS_REQ_CUST | INITIALIZE, OPEN, PROCESS_HEADER, PROCESS_ITEM, PROCESS_ACCOUNT, CHECK, POST, CLOSE | ME51N, ME52N, ME53N | Checks and defaults on Enjoy requisitions | Same object model as the PO BAdI with IF_PURCHASE_REQUISITION_ITEM |
ME_REQ_POSTED | Classic (SE18) | IF_EX_ME_REQ_POSTED | POSTED | ME51N, ME52N | Follow-up actions after a requisition is posted | Read-only view of the posted data |
ME_PURCHDOC_POSTED | Classic (SE18) | IF_EX_ME_PURCHDOC_POSTED | POSTED | ME21N, ME22N | Follow-up after a purchasing document is saved, e.g. Z log | Not for changing PO data |
ME_CHANGE_OUTTAB_CUS | Classic (SE18) | IF_EX_ME_CHANGE_OUTTAB_CUS | FILL_OUTTAB | ME2N, ME2M, ME2L | Fill extra columns in purchasing list reports | Fields must first be appended to the ALV output structure |
ME_DEFINE_CALCTYPE | Classic (SE18) | IF_EX_ME_DEFINE_CALCTYPE | DEFINE_CALCTYPE | ME21N, ME22N | Control the pricing type used when PO data changes | Affects repricing, test with price changes |
MB_MIGO_BADI | Classic (SE18) | IF_EX_MB_MIGO_BADI | INIT, PBO_DETAIL, PAI_DETAIL, PBO_HEADER, PAI_HEADER, LINE_MODIFY, CHECK_ITEM, CHECK_HEADER, POST_DOCUMENT, RESET | MIGO | Custom tab in MIGO, item defaults, checks and posting of Z data | Errors belong in CHECK_ITEM or CHECK_HEADER via the returned message table |
MB_MIGO_ITEM_BADI | Classic (SE18) | IF_EX_MB_MIGO_ITEM_BADI | ITEM_MODIFY | MIGO | Default item fields such as storage location or text | Only certain fields can be changed |
MB_CHECK_LINE_BADI | Classic (SE18) | IF_EX_MB_CHECK_LINE_BADI | CHECK_LINE | MIGO, MB1A, MB1B, MB1C | Item-level validation of goods movements with error messages | Right place for blocking errors before update |
MB_DOCUMENT_BADI | Classic (SE18) | IF_EX_MB_DOCUMENT_BADI | MB_DOCUMENT_BEFORE_UPDATE, MB_DOCUMENT_UPDATE | MIGO and all goods movements | Read final MKPF and MSEG data and update Z tables | No MESSAGE type E here; MB_DOCUMENT_UPDATE runs in the update task |
INVOICE_UPDATE | Classic (SE18) | IF_EX_INVOICE_UPDATE | CHANGE_AT_SAVE, CHANGE_BEFORE_UPDATE, CHANGE_IN_UPDATE | MIRO, MIR7 | Checks at save and Z updates for logistics invoices | Raise errors in CHANGE_AT_SAVE, not in the update methods |
MRM_HEADER_DEFAULT | Classic (SE18) | IF_EX_MRM_HEADER_DEFAULT | HEADER_DEFAULT_SET | MIRO | Default invoice header fields such as document type | Called at start of entry |
MRM_PAYMENT_TERMS | Classic (SE18) | IF_EX_MRM_PAYMENT_TERMS | PAYMENT_TERMS_SET | MIRO | Set payment terms, baseline date or block in invoice | Check against vendor master terms |
LE_SHP_DELIVERY_PROC | Classic (SE18) | IF_EX_LE_SHP_DELIVERY_PROC | CHANGE_DELIVERY_HEADER, CHANGE_DELIVERY_ITEM, CHECK_ITEM_DELETION, DELIVERY_FINAL_CHECK, SAVE_DOCUMENT_PREPARE, SAVE_AND_PUBLISH_DOCUMENT, FILL_DELIVERY_ITEM | VL01N, VL02N, VL10 series | BAdI replacement for most MV50AFZ1 form exits | Errors are returned in the CT_FINCHDEL table in DELIVERY_FINAL_CHECK |
LE_SHP_DELIVERY_UPDATE | Classic (SE18) | IF_EX_LE_SHP_DELIVERY_UPDATE | UPDATE_HEADER, UPDATE_ITEM | VL01N, VL02N | Update Z tables with delivery data | Runs during update, no dialog |
LE_SHP_TAB_CUST_HEAD | Classic (SE18) | IF_EX_LE_SHP_TAB_CUST_HEAD | ACTIVATE_TAB_PAGE, TRANSFER_DATA_TO_SUBSCREEN, TRANSFER_DATA_FROM_SUBSCREEN, PASS_FCODE_TO_SUBSCREEN | VL01N, VL02N, VL03N | Custom tab on delivery header | Item version: LE_SHP_TAB_CUST_ITEM |
LE_SHP_TAB_CUST_ITEM | Classic (SE18) | IF_EX_LE_SHP_TAB_CUST_ITEM | ACTIVATE_TAB_PAGE, TRANSFER_DATA_TO_SUBSCREEN, TRANSFER_DATA_FROM_SUBSCREEN, PASS_FCODE_TO_SUBSCREEN | VL01N, VL02N, VL03N | Custom tab on delivery item | Needs a subscreen in your own program |
WORKORDER_UPDATE | Classic (SE18) | IF_EX_WORKORDER_UPDATE | INITIALIZE, AT_SAVE, AT_RELEASE, BEFORE_UPDATE, IN_UPDATE | CO01, CO02, IW31, IW32 | Checks at save or release of production and maintenance orders | Errors in AT_SAVE and AT_RELEASE; BEFORE_UPDATE and IN_UPDATE are too late |
WORKORDER_GOODSMVT | Classic (SE18) | IF_EX_WORKORDER_GOODSMVT | GOODS_RECEIPT, COMPLETE_GOODSMOVEMENT | CO11N, CO15, MIGO (order GR) | Change goods movements created by order confirmation | Check the full method list in SE18 for backflush scenarios |
WORKORDER_CONFIRM | Classic (SE18) | IF_EX_WORKORDER_CONFIRM | AT_SAVE, AT_CANCEL_CHECK, IN_UPDATE | CO11N, CO15 | Validate confirmations or block cancellations | Raise errors in AT_SAVE |
WORKORDER_INFOSYSTEM | Classic (SE18) | IF_EX_WORKORDER_INFOSYSTEM | TABLES_MODIFY_LAY | COOIS, COOISPI | Fill custom columns in the order information system | Fields go into the layout structure appends, e.g. IOHEADER |
BADI_MATERIAL_CHECK | Classic (SE18) | IF_EX_BADI_MATERIAL_CHECK | CHECK_DATA | MM01, MM02 | Material master validation at save | Alternative to SMOD MGA00001 |
CUSTOMER_ADD_DATA | Classic (SE18) | IF_EX_CUSTOMER_ADD_DATA | CHECK_ALL_DATA, SAVE_DATA, CHECK_ADD_ON_ACTIVE | XD01, XD02, VD01, FD01 | Custom fields on customer master with screen group setup | Screens via CUSTOMER_ADD_DATA_CS |
VENDOR_ADD_DATA | Classic (SE18) | IF_EX_VENDOR_ADD_DATA | CHECK_ALL_DATA, SAVE_DATA, CHECK_ADD_ON_ACTIVE | XK01, XK02, MK01, FK01 | Custom fields on vendor master | Screens via VENDOR_ADD_DATA_CS |
AC_DOCUMENT | Classic (SE18) | IF_EX_AC_DOCUMENT | CHANGE_INITIAL, CHANGE_AFTER_CHECK | Postings from MM, SD, CO to FI | Change FI document fields from the accounting interface, e.g. item text | Only fields SAP allows to change; see the BAdI documentation in SE18 |
ACC_DOCUMENT | Classic (SE18) | IF_EX_ACC_DOCUMENT | CHANGE | BAPI_ACC_DOCUMENT_POST and related BAPIs | Move EXTENSION2 data into the accounting document | Filter-dependent by AWTYP; SAP ships example implementations |
BADI_FDCB_SUBBAS01 | Classic (SE18) | IF_EX_BADI_FDCB_SUBBAS01 | PUT_DATA_TO_SCREEN_OBJECT, GET_DATA_FROM_SCREEN_OBJECT | FB60, FB70, MIRO | Custom subscreen on the basic data tab of Enjoy FI entry | Further variants (BADI_FDCB_SUBBAS02 and higher) exist for other subscreens |
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.
Map your active BAdI implementations
Send us an extract of SXC_ATTR and SXC_EXIT and we will return your active implementations by process with notes on update-task risks.
Optional. The tool and every export work without this. No spam.
How to use it
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
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.
- 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
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
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.
Frequently Asked Questions
Which BAdI is used for MIGO?
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?
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?
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?
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.
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.
Related Tools
SAP ECC Enhancement Transactions and Exit Tables Reference (SMOD, CMOD, SE18, MODSAP, SXC_EXIT)
Lookup table of the transactions, tables and classes used to find, implement and audit customer exits, BAdIs and enhancement implementations on SAP ECC 6.0.
SAPSAP ECC Customer Exits (SMOD Enhancements) by Module Reference
Lookup table of widely used SMOD enhancements on SAP ECC 6.0 by module, with transactions, components and typical use, plus how to find the exit for any transaction.
SAPSAP ECC SD User Exit Forms Reference (MV45AFZZ, RV60AFZZ, MV50AFZ1)
Lookup table of the classic SD user exit FORM routines for sales orders, deliveries and billing on SAP ECC 6.0: include, transaction, when it fires, structures available and the usual gotcha.
SAPSAP ECC Movement Type Configuration Tables Reference (T156, T156T, T157D)
Reference of the SAP ECC 6.0 tables, transactions and authorization objects that define movement types, their texts, reason codes and account determination links.
More SAP tools
See all- SAP ECC Private AI Layer Blueprint Generator
- SAP ECC AI Assistant Sizing and Value Calculator
- SAP ECC Background Job Tables Reference (TBTCO, TBTCP, Job Status Codes)
- SAP ECC Output Determination Tables and Codes Reference (NAST, TNAPR, NACE)
- SAP ECC Stock Type and Location Transfer Movement Type Matrix
- SAP ECC Movement Type to OBYC Transaction Key and GBB Account Modifier Reference
- SAP ECC 6.0 Enhancement Packages and Maintenance Dates Reference (EHP1 to EHP8, 2027, 2030, 2033)
- SAP ECC ORDERS05 IDoc Segments and Qualifiers Reference
- SAP ECC MATMAS05 Material Master IDoc Segments Reference
Keep exploring
Free tools
- SAP ECC BAdI Implementation Method Code Generator (ME_PROCESS_PO_CUST, MB_MIGO_BADI, WORKORDER_UPDATE)Pick a plant, the field that must be filled and your message class, and get ready-to-paste method code for three common ECC classic BAdIs, with the SE19 steps.
- SAP PM Database Tables ReferenceA searchable lookup of the core SAP PM tables, their key fields and what each is used for in reports and extracts.
- SAP PM Maintenance Order Types, Tables and Transactions ReferenceSearchable lookup of SAP plant maintenance order types, order transactions, order tables and system statuses.
ERP fixes and how-tos
- SAP MM Errors and Solutions: The Common Ones, by Process StepCommon SAP MM errors by process step, with cause and fix: stock deficit, closed periods, release strategy, blocked invoices and account determination.
- SAP MM Order Creation: ME21N Step by Step and the Procure-to-Pay ProcessStep-by-step ME21N purchase order creation in SAP MM, plus the procure-to-pay flow around it: requisition, goods receipt, invoice verification and payment.
- SAP MM Return to Vendor Process: Return PO, MIGO 161 and Credit MemoReturn goods to a vendor in SAP MM: return PO, MIGO movement 161 or 122, credit memo in MIRO, and how to handle scrap, rework and replacement shipments.
Runs with your ERP
- PROGATE 6.0 Interface with SAP ECC and S/4HANAPROGATE is an SAP-certified web service interface that sends master data and orders from SAP to third-party MES and returns confirmations. Setup and pitfalls.
- OPAL LabelManagement Classic and SAP S/4HANAHow OPAL LabelManagement Classic gives SAP S/4HANA and ECC central label and print control, with design tools like BarTender. Setup, pitfalls, alternatives, AI.
AI on your ERP
- AI for SAP Plant Maintenance: Notifications, Work Orders, and Predictive SignalsAI grounded on SAP PM data that triages notifications, drafts work orders, standardizes failure codes, and flags predictive maintenance signals, on-prem.
- Get AI Value From SAP ECC Now, and Use It to De-Risk the Move to S/4HANASAP ECC 6.0 mainstream maintenance ends in 2027. Add AI value on ECC now, using its existing BAPIs and IDocs, and use it to de-risk the S/4HANA migration.
Integrations
- How to automate email into SAP ECC 6.0Turn inbound emails into SAP ECC 6.0 transactions: customer POs into sales orders, supplier confirmations, RFQs and invoices, with review and BAPI posting.
- How to add Slack to SAP ECC 6.0Build a Slack app for SAP ECC 6.0: slash commands that read stock and orders via BAPIs, interactive approvals, alert channels and Socket Mode for on-prem.