User Exits Part 2: User Exits vs Customer Exits vs BAdIs — When to Migrate
Preview · a free account unlocks the full lesson
Compare user exits, customer exits (SMOD/CMOD) and BAdIs by interface, number of implementations, testability and upgrade safety, and decide when existing user-exit logic should stay and when it should move to a BAdI or class-based design.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 1 of this series introduced user exits; before diving into specific includes, it's worth comparing all three enhancement technologies you'll meet — user exits, customer exits, and BAdIs. A user exit is a FORM with full access to global data; a customer exit is a function module with fixed parameters; a BAdI is an interface implemented by classes, with filters and support for multiple implementations.
Customer exits, briefly: SAP's code calls CALL CUSTOMER-FUNCTION '001', which calls a function module such as EXIT_SAPMV45A_001 as an example pattern. SMOD shows the enhancement and its components — function exits, screen exits, menu exits. CMOD holds your own project, and your code goes into the ZX… include inside the exit function module, which you then activate as part of that project; only one project can use a given enhancement at a time.
Comparing the three directly: on data access, a user exit sees all global data, a customer exit only sees its parameters, and a BAdI only sees its parameters or objects.
On implementations, a user exit is a single code block, a customer exit is a single project, and a BAdI can have one or many implementations, with filters to control which one runs. On testability, a user exit is hard to test, a customer exit is medium, and a BAdI is good, because it's built from classes.
On upgrade stability, all three are stable, but BAdIs are the cleanest, while user exits need an access key to touch at all. In S/4HANA, all three technologies still exist on-premise, but released BAdIs are the clean-core option.
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
Interview questions on this topic
Related SAP topics
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.