ERPClimb logoERPClimb
SAP enhancementObjectME_PROCESS_PO_CUSTModuleMM_P2P

New to SAP MM / P2P? Start with the module overview

ME_PROCESS_PO_CUST — ME_PROCESS_PO_CUST BAdI for Purchase Order Processing

Quick answer

ME_PROCESS_PO_CUST is a classic high-value BAdI for extending Enjoy purchase order processing. It is commonly used to validate or derive PO header/item data in ME21N/ME22N/ME23N/ME29N and related PO BAPIs. Method choice matters: PROCESS_ITEM is suited to item logic, CHECK to validation, and POST to post-save follow-up logic where appropriate.

SAP consultant reference for ME_PROCESS_PO_CUST: purpose, trigger/context, troubleshooting checks, safe implementation guidance and common production pitfalls.

Reviewed by an ERPClimb SAP consultant on 17 Nov 2026· 576 words

What it extends

ME_PROCESS_PO_CUST is a classic high-value BAdI for extending Enjoy purchase order processing in ME21N/ME22N/ME23N/ME29N and the related PO BAPIs. It exposes the PO header and item interface at several processing points, so a consultant can add validation or derivation logic without modifying the standard transaction.

When it is used

Used to validate or derive PO header/item data where standard configuration does not cover a business-specific rule. Method choice matters: PROCESS_ITEM is suited to item-level logic, CHECK to validation that must block save, and POST to post-save follow-up logic. Because its methods can be invoked repeatedly as the user edits a document, an implementation that does expensive database access or raises a message too early can make a large, multi-item purchase order slow or practically unusable.

How to implement and debug it

Reproduce with a known PO in a permitted test system and set a session breakpoint in the active implementation. Compare header and item state at the processing phase versus the final-check/save phase, since a validation can fail simply because it depends on data that is not yet finalized at the point it runs.

  • Use a filtered ST05 trace if runtime looks excessive — repeated method calls per keystroke are a common cause.
  • Verify create, change, copy, approval and background/API paths separately; they do not always invoke the same methods.
  • Cache lookup data only within the correct transaction scope; never rely on stale global state across document sessions.
  • Avoid COMMIT WORK or direct EKKO/EKPO updates inside the implementation.

Clean core and extensibility position

ME_PROCESS_PO_CUST is a classic BAdI, not a RAP-based extension, so it is not automatically part of in-app key-user extensibility in S/4HANA Cloud. Before building a new implementation, check the Extensibility cockpit for a released purchasing Business Context or Business Event covering the same requirement — that is the clean-core path; a classic implementation built for an on-premise system may need to be re-platformed as a side-by-side extension in a Cloud ABAP Environment.

ECC vs S/4HANA

The BAdI and its method structure are unchanged from ECC — ME21N/ME22N/ME23N still drive the same Enjoy transaction framework in S/4HANA. What differs is the extensibility expectation: a classic implementation that was acceptable in an ECC system should be re-evaluated against the released extension points before being carried into a new S/4HANA Cloud implementation.

Common pitfalls

A custom validation that works correctly when ME21N creates a document but stops the user on every subsequent item change is the classic symptom — it usually means the implementation is running (and failing) on data that is still incomplete during intermediate processing, not only at final save.

  • Raising a hard error message during intermediate item processing instead of only at the check/save phase.
  • Assuming the same method fires identically for create, change, copy and background/API-driven PO creation.
  • Not testing a multi-item PO and a PO with account assignment alongside the simple single-item case.

Whose problem this is

MM/procurement functional team for the validation requirement itself; ABAP/extensibility team for the implementation and for confirming its clean-core status in the target S/4HANA edition.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Lessons and topics

Source: ERPClimb — https://erpclimb.com/sap-enhancements/me-process-po-custERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.