ERPClimb logoERPClimb
Enhancements
ABAP Developmentbeginner 8 min read

Enhancements Part 1: SAP Enhancement Techniques Overview

Free sample lesson · open to everyone

Key takeaway

Understand how SAP standard behaviour is extended without modifying it: user exits, customer exits (SMOD/CMOD), Business Transaction Events, classic and new BAdIs, enhancement points — and why modifications are the last resort.

In this lessonShow sections

Visual overview

Enhancements Part 1: SAP Enhancement Techniques Overview — learning sheetFlow: In SMOD, display enhancement V45A0002 (SD default values) and its components → In SE38, open include MV45AFZZ and look at the USEREXIT_ FORMs → In SE18, display a BAdI (e.g. BADI_SD_SALES) and its methods. Key ideas: WHY ENHANCE; THE TECHNIQUES; MODIFICATION; HOW TO CHOOSE. Watch out: Choose the technique SAP offers for the process — don't jump to implicit enhancements or modifications first.ERPClimb.com / ABAP / LESSON 1/10 / LEARNING SHEETEnhancements Part 1: SAP Enhancement Techniques Overview1 · HOW IT FLOWS1In SMOD, displayenhancement V45A0002 (SDdefault values) and its…2In SE38, open includeMV45AFZZ and look at theUSEREXIT_ FORMs3In SE18, display a BAdI(e.g. BADI_SD_SALES) andits methods2 · KEY IDEAS EXPLAINEDWhy EnhanceEvery company has rules SAP does not ship: anextra validation on sales orders, a custom fieldon a document, a default value, a different…The TechniquesUser exits — empty FORM routines in SAP includes(MV45AFZZ, MV50AFZ1, RV60AFZZ in SD). Technicallymodifications, but SAP-reserved for customers…Customer exits — SAP calls CALL CUSTOMER-FUNCTION'001', which executes function moduleEXIT_<program>_001. You write code in its Z…ModificationChanging SAP code directly (with an access keyfrom SAP). Every upgrade/support package requiresSPAU adjustment. Use only when no enhancement…How To Choose1. Is there configuration (customizing) for it?Use it.3 · REMEMBER · WATCH OUTRememberAn enhancement adds custom logic at a place SAP prepared (or allows);a modification changes SAP code itself.Techniques by age: user exits (FORMs in SAP includes) → customer exits(SMOD/CMOD function exits) → BTEs → classic BAdIs → Enhancement…Enhancements survive upgrades with little effort; modifications mustbe adjusted (SPAU) at every upgrade.!Watch outChoose the technique SAP offers forthe process — don't jump to implicitenhancements or modifications first.4 · IN A REAL PROJECTA company required a customer PO number for one sales order type. A developer first planned an implicitenhancement at the start of the save routine. A review showed that MV45AFZZ's USEREXIT_SAVE_DOCUMENT_PREPAREis the SAP-intended place, already used by the project for other checks. The check was added there in a small…Original ERPClimb learning sheet • Verify against your SAP release and edition

Expert visual walkthrough

ABAP DEVELOPMENT ACADEMY · Component relationshipsERPClimb.com

SAP Enhancement Techniques Overview

Enhancements · Chapter-specific technical teaching map

Component relationships

1Central concept

BAdI

2Connected capability

Explicit enhancement

3Connected capability

Implicit enhancement

4Connected capability

Customer exit

Tutor's chapter takeaway

Understand how SAP standard behaviour is extended without modifying it: user exits, customer exits (SMOD/CMOD), Business Transaction Events, classic and new BAdIs, enhancement points — and why modifications are the last resort.

In a real project

A company required a customer PO number for one sales order type. A developer first planned an implicit enhancement at the start of the save routine. A review showed that MV45AFZZ's USEREXIT_SAVE_DOCUMENT_PREPARE is the…

Watch out for

• Modifying SAP code when an exit or BAdI exists. • Using implicit enhancements as the first choice. • Not checking customizing before coding. • Forgetting to activate the CMOD project after coding a customer exit. •…

Conceptual study map, not an SAP configuration screenshot or a guaranteed runtime sequence. Consult the lesson for implementation prerequisites and exceptions.

The situation: a real project scenario

A company required a customer PO number for one sales order type. A developer first planned an implicit enhancement at the start of the save routine. A review showed that MV45AFZZ's USEREXIT_SAVE_DOCUMENT_PREPARE is the SAP-intended place, already used by the project for other checks.
The check was added there in a small FORM calling a validation class. At the next support package, no adjustment was needed, while two old modifications in the same system required SPAU work.

Explanation

Enhancements and modifications are the two ways to change SAP's behavior, and the distinction matters: an enhancement adds custom logic at a place SAP prepared or allows, while a modification changes SAP's own code directly.

The available techniques have evolved over SAP's history, roughly in this order: user exits (FORM routines sitting in SAP includes), customer exits (SMOD/CMOD function exits), Business Transaction Events, classic BAdIs, and finally the Enhancement Framework with its new BAdIs and enhancement points.

Enhancements survive upgrades with little effort, whereas modifications must be reapplied and adjusted through SPAU at every upgrade, so the technique SAP offers for a given process should always be tried before reaching for implicit enhancements or outright modifications.

This lesson is part of a ten-part series: Part 1 gives this overview of enhancement techniques; Part 2 covers the Enhancement Framework overview; Part 3 compares implicit and explicit enhancement points; Part 4 shows how to find enhancements through debugging; Part 5 covers explicit enhancement points and sections; Part 6 covers enhancement spots and implementations; Part 7 looks at implicit enhancements and their power and risk; Part 8 covers switch-controlled enhancements; Part 9 covers performance and safety; and Part 10 covers enhancements in S/4HANA and clean core. BAdIs and SD user exits each have their own separate series.

Why enhance at all? Every company has rules that SAP does not ship out of the box — an extra validation on sales orders, a custom field on a document, a default value, or a different output — and you need a way to add these without breaking standard code.

The techniques themselves break down as follows. User exits are empty FORM routines sitting in SAP includes such as MV45AFZZ, MV50AFZ1, and RV60AFZZ in SD; they are technically modifications, but SAP has reserved them for customer use, and you need an access key once to use them.

Customer exits work through SAP calling CALL CUSTOMER-FUNCTION '001', which executes a function module named EXIT_<program>_001; you write your code in that function module's Z include (named ZX…), and it's activated through a CMOD project, with the enhancements themselves defined in SMOD (for example, V45A0002); customer exits also include menu exits and screen exits.

Business Transaction Events, used in FI/CO under "open FI" (transaction FIBF), come in two flavors — publish-and-subscribe (P&S) or process interfaces — and you assign your own function module to an event. Classic BAdIs are created and managed in SE18/SE19 and called via CL_EXITHANDLER.

The Enhancement Framework, introduced with NetWeaver 7.0, brought new BAdIs (accessed with GET BADI / CALL BADI), explicit enhancement points and sections, and implicit enhancement points, all of which are grouped together under enhancement spots.

Modification means changing SAP's own code directly, which requires an access key from SAP, and every upgrade or support package then requires an SPAU adjustment to reapply the change; it should be used only when no enhancement option exists, and the change should always be documented.

When deciding how to extend a process, work through this order: first check whether configuration (customizing) covers it, and use that if so; then check for a BAdI or BTE for the process; then look for a customer exit or user exit, which are common in SD and MM; then check for an explicit enhancement point; only after that consider an implicit enhancement, and carefully, as covered in Part 7; and treat modification as the last resort.

To practice this, display enhancement V45A0002 (SD default values) and its components in SMOD, open include MV45AFZZ in SE38 and look at its USEREXIT_ FORMs, and display a BAdI such as BADI_SD_SALES and its methods in SE18. By the end of this lesson you should be able to name the enhancement techniques and choose the least invasive one for a given situation.

Code example

ABAP Code
* ===== 1. User exit: FORM in SAP include MV45AFZZ (sales order) =====FORM userexit_save_document_prepare.* Runs before a sales order is saved; VBAK/XVBAP are available here  IF vbak-auart = 'ZOR' AND vbak-bstnk IS INITIAL.    MESSAGE e001(zsd).        " 'Customer PO number is required for ZOR orders'  ENDIF.ENDFORM. * ===== 2. Customer exit: SAP program calls =====*   CALL CUSTOMER-FUNCTION '001'*     EXPORTING ...*     IMPORTING ...* which runs function module EXIT_<program>_001.* You write code in its customer include ZX........ and activate the CMOD project.** Example: include ZXVVAU04 ... (depends on the enhancement found in SMOD)*   IF i_something = ...*     e_result = ...*   ENDIF. * ===== 3. Classic BAdI call inside SAP code =====*   CALL METHOD cl_exithandler=>get_instance*     CHANGING instance = l_badi.             " SAP resolves to the active implementation at runtime*   CALL METHOD l_badi->method_name ... * ===== 4. New BAdI call inside SAP code (Enhancement Framework) =====*   GET BADI lo_badi.                          " supports multiple active implementations and filters*   CALL BADI lo_badi->method_name EXPORTING ... * ===== 5. Explicit enhancement point in SAP code =====*   ENHANCEMENT-POINT ep_name SPOTS es_spot_name.   " a named slot SAP deliberately left open for ENHANCEMENT ... ENDENHANCEMENT * ===== Which technique does SAP offer here? Check in this order =====*   Customizing -> BAdI/BTE -> customer/user exit -> explicit point -> implicit -> modification*   (earlier in the list = safer across upgrades, since SAP maintains the hook explicitly)

Watch out

Common mistakes

  • Modifying SAP code when an exit or BAdI exists.
  • Using implicit enhancements as the first choice.
  • Not checking customizing before coding.
  • Forgetting to activate the CMOD project after coding a customer exit.
  • Scattering one business rule across several exits.

Do this

Best practices

  • Prefer customizing, then BAdIs/BTEs, then exits.
  • Document which enhancement contains which rule.
  • Keep exit code thin — call a class or FM.
  • Check existing implementations before adding new ones.
  • Treat modifications as last resort with approval.

In the interview

Interview angle

Questions: "What enhancement techniques do you know?", "User exit vs customer exit?", "Enhancement vs modification?"
Strong answer: user exits are FORMs in SAP includes (MV45AFZZ); customer exits are function exits called via CALL CUSTOMER-FUNCTION, found in SMOD, implemented in ZX includes, activated in CMOD; BTEs for FI; classic and new BAdIs; enhancement points (explicit/implicit); modifications change SAP code and need SPAU adjustment — last resort.

Practice this lesson

Quick check

0 of 3 questions attempted

Question 1 of 3

A PO number must be mandatory for sales order type ZOR. What should you check FIRST?

Practise this in an interview

Answer in your own words and get instant feedback, the way an interviewer would judge it.

1What are field exits, and why should they generally be treated as legacy knowledge rather than a preferred enhancement technique?

2Differentiate a user exit from a customer exit. How would you choose the correct enhancement for a sales-order save requirement?

Try a related Code Lab

This published exercise covers the same SAP topic. Apply the ideas in a hands-on scenario, then return to review your answers.

Open: Add a delivery block via BAdI instead of modification →

See it in code

Each example starts from a requirement, shows the design, then the code step by step with a plain-language explanation of every part.

Was this lesson helpful?

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.