Разница между пользовательским выходом и выходом клиента в SAP
⚡ Умное резюме
User Exits and Customer Exits in SAP ABAP are enhancement hooks that add custom functionality to standard programs without modifying SAP code. This page explains customer exit types, worked examples, the SMOD and CMOD transactions, user exits, and how the two techniques differ.

What is Customer Exits?
Выходы клиентов есть «крючки» предоставляемые SAP во многих стандартных программах, экранах и меню, в которых клиенты могут "вешать" custom functionality to meet business requirements. More on this in a moment…
The key benefit is that the standard SAP object is never modified. The custom code sits in a reserved include or subscreen that SAP calls at the right moment, so the enhancement survives a system upgrade instead of being overwritten. Because of this, exits belong to the family of SAP enhancement techniques together with the newer Business Add-In.
Типы выходов клиентов
Существует три основных типа выхода клиентов:
- Выходы функционального модуля
- Выходы из экрана
- Выход из меню
Функциональный модуль Выход:It allows customer to add code via a function module at a specific location in an SAP прикладная программа
Syntax: CALL CUSTOMER-FUNCTION '004'
Экран Выход: It allows customer to add fields to a screen in an SAP программа через подэкран. Подэкран вызывается в рамках логики потока стандартного экрана.
Format: CALL CUSTOMER-SUBSCREEN CUSTSCR2
Меню Выход: It allows customer to add items to a pulldown menu in a standard SAP программа. Эти элементы можно использовать для вызова дополнительных программ или пользовательских экранов.
Format: +CUS ( additional item in GUI status )
Примеры выходов клиентов
Пример выхода из экрана:
В транзакцию CAT2 – Ввод табеля учета рабочего времени отдел кадров хочет включить интерактивное подтверждение того, что заведомо неверная подача данных является основанием для увольнения.
Пример выхода из меню:
В транзакцию SE38 — Редактор ABAP команда разработчиков хочет включить ссылку меню на транзакцию SE80 — Навигатор объектов для простоты использования.
ДО
ПОСЛЕ
Пример выхода из функционального модуля:
Компания хочет, чтобы банковские реквизиты Продавцов при создании Продавца были обязательным событием. Поэтому должно появиться сообщение об ошибке «Пожалуйста, введите банковские реквизиты».
ДО
ПОСЛЕ
Поиск выходов клиентов
В транзакции СМОД и рассмотреть детали-
Или в транзакции SE81 вы можете использовать соответствующую область применения
Создайте выход для клиентов
Чтобы создать выход клиента, сначала необходимо создать проект в транзакции. CMOD
Later вы назначаете Выход клиента своему проекту.
The full sequence from finding the exit to activating the code is short, and it always follows the same six steps.
- Find the enhancement: Locate the enhancement name in SMOD, for example the component EXIT_SAPMF02K_001 for the vendor master.
- Create the project: In CMOD, enter a project name that begins with Z or Y and choose Create.
- Assign the enhancement: On the Enhancement assignments screen, add the enhancement name that contains the exit.
- Напишите код: Open the function module exit and place the code inside its reserved include, which begins with ZX.
- Handle screen and menu parts: For a screen exit, build the CUSTSCR subscreen, and for a menu exit, fill the +CUS function code in the GUI status.
- Activate the project: Activate the project in CMOD so the exit is called at runtime. Without activation, the code is ignored.
💡 Совет: The include of a function module exit begins with ZX, so it is transported with the project. Never place the custom logic directly in the SAP function module, because that would be a modification, not an enhancement.
What is a User Exit?
Пользовательский выход служит той же цели, что и Клиентский выход, но доступен только для SD модуль. Выход реализован как вызов функционального модуля. Код написан разработчиком.
Хорошо знаю, что выход пользователя в SD МВ45AFZZ
- USEREXIT_FIELD_MODIFICATION – для изменения атрибутов экрана.
- USEREXIT_SAVE_DOCUMENT – для выполнения операций, когда пользователь нажимает «Сохранить».
- USEREXIT_SAVE_DOCUMENT_PREPARE
- USEREXIT_MOVE_FIELD_TO_VBAK – когда изменения заголовка пользователя перемещаются в рабочую область заголовка.
- USEREXIT_MOVE_FIELD_TO_VBAP – когда изменения пользовательского элемента переносятся в SAP рабочая область элемента
A user exit is technically a subroutine (a FORM) inside an SAP include, so it is edited directly and requires an access key. This is the main practical difference from a customer exit, summarised in the next section.
User Exit vs Customer Exit
Both techniques add custom behaviour to standard SAP, but they differ in scope, technology, and how upgrade safe they are. The table below compares them.
| Критерии | Выход пользователя | Выход клиента |
|---|---|---|
| Доступность | только SD-модуль | По всем SAP модули |
| Техника | Subroutine (FORM) in an SAP include such as MV45AFZZ | Function module, screen, or menu exit managed in SMOD and CMOD |
| Доступ к ключевым | Requires a modification access key | No access key needed |
| Upgrade поведение | Must be checked in the upgrade with SPAU | Upgrade safe, called from a reserved include |
| Управляемый | Edited directly in the include | Activated through a CMOD project |
Customer exits are the safer and more general of the two. For enhancements that neither exit can reach, SAP later introduced the Business Add-In.
Customer Exits vs BAdI
A Business Add-In (BAdI) is the object oriented successor to the customer exit. Instead of a reserved include, a BAdI defines an interface, and the custom logic sits in a class that implements it. This brings two advantages that a customer exit does not offer.
- Multiple implementations: A multiple use BAdI allows several independent implementations of the same enhancement, while a customer exit allows only one.
- Object orientation: A BAdI works with methods and classes, so it fits modern ABAP Objects development and is easier to filter by country or business scenario.
The practical rule is simple: use an existing customer exit or user exit when the enhancement point already exists, and use a BAdI when a new, reusable enhancement point is required.








