How to Find User Exits & BADIs in SAP – Complete Guide

Step-by-step tutorial to find User-Exit and BADIs in SAP

Let’s Connect with our Senior SAP Expert for Free Consultation

How to Find User Exits and BADIs in SAP

Introduction

If you’re working with SAP ABAP development, you’ve likely come across the need to customize standard SAP functionality. In such cases, User Exits and BADIs (Business Add-Ins) offer the best way to enhance standard processes without modifying the core SAP code.

This guide will help you learn how to find User Exits and BADIs in SAP using various methods. Whether you’re a beginner or an experienced developer, these steps will help you identify the right enhancement techniques for any SAP transaction code.

What Are User Exits and BADIs in SAP?

SAP User Exits

User Exits are predefined enhancement points provided by SAP. They are included in standard programs through includes, allowing developers to add custom code.

SAP BADIs (Business Add-Ins)

BADIs are object-oriented enhancement options introduced by SAP to extend applications without changing the original source code.

Why Use User Exits or BADIs?

  • Add custom logic without modifying SAP standard code.
  • Preserve upgrade compatibility across SAP versions.
  • Meet specific business needs like auto-filling fields, validations, and dynamic data handling.
  • Make enhancements cleanly using CMOD, SMOD, SE18, SE37, and SE93.

💡 Using enhancement techniques like User Exits and BADIs is the best practice in SAP ABAP development.

How to Find User Exits or BADIs in SAP

Let’s explore three reliable methods, explained with examples. These are practical, real-time scenarios based on SAP ECC 6.0.

Method 1: Finding User Exits via SPRO Documentation

Use Case:
In Plant 101, store users performing a 311 movement type (material transfer from store to production) want to automatically populate Plant and Material Number in the text field.

Steps:

  1. Go to Transaction Code SPRO
    • Open the SAP GUI and run transaction SPRO.
    • Click on SAP Reference IMG to open the configuration structure.
  2. Navigate to the Relevant Configuration Node
    • Locate the module or process you’re customizing (e.g., Inventory Management).
    • This path depends on the business process (e.g., movement types, goods issue, etc.).
  3. Click on the Documentation Button
    • Most configuration nodes have a “Documentation” button on the top bar.
    • Click it to open a new window containing related user exits for the selected process.
  4. Review the List of Available User Exits
    • SAP provides a detailed list of User Exits tied to the selected process.
    • Read through the exit names and short descriptions to identify the most relevant one.
  5. Use SMOD for Technical Details
    • Once you find the name of the enhancement, go to transaction SMOD and enter the exit name.
    • Press Display to see the exact include where you can write custom ABAP code.
User Exits and BADIs in SAP
User Exits and BADIs in SAP

Method 2: Finding Function Module Exits Using SE93 and SE37

Use Case:
Before creating a vendor in SAP using Transaction Code XK01, you want to verify if there’s any user exit where validation logic can be added.

Steps:

  • 1. Open SE93 to Identify Program Behind T-Code

    • Enter transaction code SE93 in SAP GUI.
    • Type XK01 and click Display.
    • The screen will show the Program Name linked to XK01. Copy this name (e.g., SAPMF02K).
User Exits and BADIs in SAP
  • 2. Navigate to SE37 to Search for Function Module Exits
    • Open transaction SE37.
    • In the Function Module field, type:
    • Replace <ProgramName> with the one copied from SE93 (e.g., SAPMF02K becomes EXIT_SAPMF02K_*).
Copy to Clipboard
User Exits and BADIs in SAP

 

  • 3. Use F4 Help to View All Function Module Exits
    • Press F4 to open the list of available function modules.
    • These are potential exits embedded in the program that you can implement using enhancement projects.
  • 4. Check Each Exit in Detail

    • For each result, double-click to open it.
    • Review its Import/Export parameters and documentation to understand its purpose.
User Exits and BADIs in SAP
  • 5. Implement Exit via CMOD
    • Use CMOD to create a project and assign the enhancement to activate and write custom logic.

Method 3: Finding BADIs Using Debugging Technique (SE37 + MIRO)

Use Case:
You want to prevent users from saving an incoming invoice with zero value in Transaction Code MIRO. To do this, you must identify which BADI is triggered during the save action.

Overview of Debugging Keys:

Key Description Action
F5 Single step Execute one line at a time, even if it is nested
F6 Execute Execute one line at a time, only if it is not nested.
F7 Return Return to next higher level..
F8 Continue Keep running till finish or next breakpoint….whichever is comes earlier.

Step 1. Open SE37 and Access Debug-Helper Function Module

BADIs Using Debugging Technique
  • Enter transaction SE37 and input function module:
Copy to Clipboard
  • Click Display to view the source code.

2. Set a Breakpoint at the First Line

  • Select the first executable line of code.
  • Click the stop icon (breakpoint) in the toolbar to activate debugging.
BADIs Using Debugging Technique

3. Execute T-code MIRO in a New Session

  • In a separate session, run MIRO.
  • Enter the relevant invoice details as required.
BADIs Using Debugging Technique

4. Press SAVE to Trigger the debugger.

  • When you hit the SAVE button, the system will pause at the breakpoint you set earlier.
  • Now you’re inside the debugger mode.
BADIs Using Debugging Technique

5. Find Active BADI Names in the Debugger

  • Look for the variable NAME.
  • Double-click on it to inspect its contents.
  • Press F8 to loop through and view all BADIs that are triggered during the SAVE process.
BADIs Using Debugging Technique

6. Example Output

  • You might discover BADIs like MRM_TRANSACT_DEFAULT or INVOICE_UPDATE.
  • Use transaction SE18 to check the BADI’s definition, methods, and available enhancement spots.

7. Implement BADI Logic

  • Go to SE19 to implement the BADI and add your validation logic to stop users from saving invoices with zero value.