# SAP ECC User Exit Implementation Checklist (CMOD and SMOD)

> Source: https://netray.co/tools/sap-ecc-cmod-user-exit-implementation-checklist
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Find the right exit, decide between customer exit, form user exit, BAdI or BTE, then implement, activate, transport and test a CMOD project in SAP ECC.

## Category

developer

## Erp

SAP ECC 6.0

## Audience

- ABAP developer
- SAP technical lead
- SAP functional consultant

## Tool

**Kind:** checklist

**Groups:**

#### Find

**Items:**

Get the program name of the transaction from System > Status (or SE93)

Find the program's package in TADIR (PGMID R3TR, OBJECT PROG) or in SE80 attributes

Search enhancements for that package in SMOD (F4 on Enhancement, search by package) or SE84 > Enhancements > Customer Exits

Search the program and its includes for CALL CUSTOMER-FUNCTION to see which function exits are actually called

Check for classic BAdIs with a breakpoint in CL_EXITHANDLER=>GET_INSTANCE, and for new (kernel) BAdIs by searching the program for GET BADI; then run the transaction

Check for Business Transaction Events in FIBF if the process is in FI

**Text:** Confirm with a breakpoint that the exit is reached at the moment you need

**Critical:** true

#### Decide

**Items:**

Prefer a BAdI or BTE if one exists at the same point; they allow multiple implementations and are easier to maintain

Customer exit (SMOD/CMOD): no modification key needed, one project per enhancement

Form user exit (for example USEREXIT_ routines in MV45AFZZ): requires an SSCR object key, counts as a modification

Enhancement point or section: use when no exit exists; document it as it will appear in SPAU_ENH

Keep logic in a Z class or function module called from the exit to ease a later S/4HANA move

#### Implement

**Items:**

**Text:** Check the enhancement is not already assigned to another project (CMOD > Utilities or table MODACT)

**Critical:** true

Create a CMOD project in the customer namespace (Z or Y) with a clear short text

Assign the enhancement to the project under Enhancement assignments

Under Components, double-click the function exit and create the include ZX... when prompted

For screen exits, build the subscreen in the customer program; for table enhancements, add fields to the CI_ include

Respect the exit's interface: change only the CHANGING or TABLES parameters it offers

**Text:** No COMMIT WORK, ROLLBACK or dialog popups inside exits, especially those called in update task

**Critical:** true

Guard the code by company code, plant or document type so it runs only where intended

#### Activate and transport

**Items:**

**Text:** Activate the project in CMOD; an inactive project does nothing even if the include is active

**Critical:** true

Activate all components (include, screens, CI_ include)

Record the project, include and screens in one transport request

Check the project status after import in QAS (CMOD shows Active; table MODATTR holds project attributes)

#### Test and document

**Items:**

Debug with a breakpoint in the ZX include and test positive and negative cases

Regression-test the standard transaction without your conditions met

Test in background and batch input if the transaction runs there

Add the exit to the RICEFW or enhancement inventory with owner and purpose

Note the exit in the upgrade checklist so SPAU and test packs include it

**Scoring Note:** Critical items are where most user exit tickets come from: an exit that is never reached, an enhancement already used in another project, an inactive project and commits inside exits.

## Content

**Intro:** This checklist covers finding, choosing and implementing a user exit in SAP ECC 6.0 with SMOD and CMOD, from locating the right exit to activation and transport. It also helps decide when a BAdI, a Business Transaction Event or an enhancement point is the better hook.

**Sections:**

#### How customer exits work in ECC

**Body:** SAP delivers enhancements in SMOD. Each enhancement groups components: function exits (called with CALL CUSTOMER-FUNCTION 'nnn', which resolves to function module EXIT_<program>_nnn), screen exits, menu exits and table enhancements through CI_ includes. You use them by creating a project in CMOD, assigning one or more enhancements and writing code in the ZX includes inside the exit function modules. An enhancement can be assigned to only one project, so two teams cannot each own a separate project for the same exit. SAP stores enhancement components in MODSAP and project assignments in MODACT.

**Bullets:**

- SMOD: SAP enhancement definitions (display only for customers)
- CMOD: customer projects that implement them
- Code goes in ZX includes, so it survives upgrades without SPAU modification adjustment

#### User exit vs BAdI vs BTE

**Body:** Form user exits are FORM routines in SAP includes such as MV45AFZZ in sales orders; changing them is a modification and needs an SSCR object key. Customer exits through CMOD need no key and survive upgrades cleanly, but allow only one project per enhancement. Classic and kernel BAdIs are object-oriented, can have several implementations and filters, and are SAP's preferred approach since the 2000s. Business Transaction Events, maintained in FIBF, are the FI equivalent with process and publish-and-subscribe interfaces. When a BAdI or BTE exists at the same point, use it.

#### Worked example: finding an exit for VA01

**Body:** System > Status in VA01 shows program SAPMV45A, package VA. Searching SMOD by package VA or searching SAPMV45A for CALL CUSTOMER-FUNCTION lists candidate function exits, while the form routines in MV45AFZZ (such as USEREXIT_SAVE_DOCUMENT_PREPARE) are the classic sales order user exits. For a check on save, the form exit is common but needs an SSCR key; a BAdI found with the CL_EXITHANDLER breakpoint may avoid that. Whatever you pick, prove with a breakpoint that the hook is reached with the data you need.

#### Common mistakes

**Body:** Writing code in the include but forgetting to activate the CMOD project. Assigning an enhancement that another project already uses, then wondering why the project will not save. Issuing COMMIT WORK or popups inside an exit called during save, which breaks the logical unit of work. Leaving code unguarded so it runs for every company code. Not transporting the project and the include together.

**Cta:** If you want developers to ask your ECC system which exits and enhancements are active, and where, in plain English on your own servers, we can set that up.

**Faq:**

#### How do I find a user exit in SAP?

**Answer:** Get the program from System > Status, find its package, then search SMOD by package or SE84 under Customer Exits. Search the program for CALL CUSTOMER-FUNCTION to see exits actually called. For BAdIs, set a breakpoint in CL_EXITHANDLER=>GET_INSTANCE. Confirm with a breakpoint that the exit fires when you need it.

#### How do I activate a user exit in SAP?

**Answer:** In CMOD, open your project, check that the enhancement is assigned and the components (ZX include, screens) are active, then press Activate project. The exit runs only when the project is active. Transport the project and include together and check the project status in the target system.

#### What is the difference between a user exit and a BAdI?

**Answer:** A customer exit is a function module hook implemented once per enhancement through a CMOD project. A BAdI is an object-oriented hook that can have several implementations, filters and clean interfaces. Form user exits are routines in SAP includes and count as modifications. Prefer a BAdI or BTE when one exists.

#### Can two CMOD projects use the same enhancement?

**Answer:** No. An SMOD enhancement can be assigned to only one CMOD project at a time. If another project already holds it, add your code to that project's include and coordinate with its owner, or move the logic into a shared Z function or class called from the single include.

## Search terms

how to implement user exit in sap, how to find user exit in sap, how to activate user exit in sap, how to create user exit in sap, user exit vs badi in sap, sap how to find user exits, cmod smod, customer exit sap abap

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
