ERPClimb logoERPClimb
BAdI
ABAP Developmentintermediate 7 min read

BAdI Part 5: Single-Use vs Multiple-Use BAdIs

Preview · a free account unlocks the full lesson

Key takeaway

Understand how the "multiple use" setting changes BAdI behaviour: several implementations running in sequence, no guaranteed order, CHANGING parameters in multiple-use BAdIs, single-use BAdIs that return values, conflicts between implementations and how to manage several teams in one BAdI.

In this lessonShow sections

Visual overview

BAdI Part 5: Single-Use vs Multiple-Use BAdIs — learning sheetFlow: SE18: check the "Multiple use" flag of ME_PROCESS_PO_CUST and BADI_MATERIAL_CHECK → SE19: list existing implementations of a multiple-use BAdI in your system → Design a dispatcher implementation as in the code example. Key ideas: MULTIPLE USE; SINGLE USE; CONFLICTS IN MULTIPLE-USE BADIS; GOVERNANCE. Watch out: The execution order of multiple implementations is not guaranteed (unless sorting is configured) — never depend on it.ERPClimb.com / ABAP / LESSON 5/10 / LEARNING SHEETBAdI Part 5: Single-Use vs Multiple-Use BAdIs1 · HOW IT FLOWS1SE18check the "Multiple use"flag of ME_PROCESS_PO_CUST and…2SE19list existing implementations of amultiple-use BAdI in your system3Design a dispatcherimplementation as in thecode example2 · KEY IDEAS EXPLAINEDMultiple UseSetting in the BAdI definition (SE18:"Multiple Use").Example: ME_PROCESS_PO_CUST — purchasing, financeand a logistics project can each have animplementation.Single UseOnly one active implementation per filtercombination allowed; activating a second one givesan error.Methods may return values (EXPORTING/RETURNING) —no conflict about "whose result wins".Conflicts In Multiple-Use BAdIsTwo implementations change the same field → thelast one wins, order undefined.One implementation relies on data set by another →breaks when order changes.GovernanceBefore creating a new implementation, listexisting ones (SE19 → where-used / SE18"Implementations").Define an owner per BAdI and per implementation.3 · REMEMBER · WATCH OUTRememberMultiple-use BAdI: all active (filter-matching) implementations run,one after another.Single-use BAdI: exactly one implementation (or the fallback) runs —typical when the method returns a value.Multiple-use BAdIs cannot have EXPORTING/RETURNING parameters; theyuse CHANGING, so each implementation sees previous changes.!Watch outThe execution order of multipleimplementations is not guaranteed(unless sorting is configured) —never depend on it.4 · IN A REAL PROJECTTwo projects implemented a multiple-use sales BAdI: one set a default shipping condition, the other changed itfor export customers. After a transport in a different sequence, the default implementation ran second andoverwrote the export value. The architects merged both into one implementation per sales area with a…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Part 4 of this series compared the BAdI generations; this lesson looks at what happens when more than one team implements the same BAdI. A multiple-use BAdI runs every active implementation whose filter matches, one after another; a single-use BAdI runs exactly one implementation, or its fallback, and this is typical when the method actually returns a value.

Multiple use is a setting in the BAdI definition itself, marked in SE18 as "Multiple Use" — ME_PROCESS_PO_CUST is a good example, where a purchasing team, a finance team, and a logistics project could each have their own implementation.

All of them run, and each can set CH_FAILED or change CHANGING data; the order between them isn't defined by default, though new BAdIs allow a sort sequence to be configured in some releases through the implementation's layer/sort settings (BADI_SORTER) — don't rely on that ordering unless it's actually documented.

Because of this, multiple-use BAdIs cannot have EXPORTING or RETURNING parameters at all; they rely on CHANGING instead, so that each implementation sees whatever changes the previous ones already made.

Single use allows only one active implementation per filter combination — trying to activate a second one produces an error. Because there's never more than one implementation running, its methods can safely return values through EXPORTING or RETURNING, with no conflict over whose result should win; a fallback class supplies the default behavior when nobody has implemented the BAdI at all.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Code example
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Referenced SAP objects

Reviewed reference pages for the objects this page mentions.

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.