Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

user exits

Former Member
0 Kudos

cam any one help me out in ,,,,

what r user exits, and do we have types in them and what r the advantages of using them,,,

and where v can find those...

thank you



Former Member

Former Member
0 Kudos


This transaction consists of various components (including function exits, menu options and subscreens). For example, an SAP enhancement may comprise a subscreen and the function exits for data transfer. Customers simply select the components they wish to edit, combine them together in enhancement projects, edit the components and activate the projects.

Creating a project

First, you must give the project a name. In order to be able to locate projects easily, you are recommended to choose names which contain the name of the transaction or module pool. When you press the function key Create, you go to an attributes screen where you can enter a short description of the project. If you choose a project name that already exists, you get an error message. If you enter * as the project name, you get a list of all projects created so far. When you save with F11, you have to enter a correction number (see Corrections/Transport).

Assigning SAP enhancements to a project

On the initial screen, select SAP enhancements and then Change (or Goto -> Components on the attributes screen). On the next screen, you can specify SAP enhancements by name. By selecting SAP enhancements -> Find enhancements (and, if required, after restricting selection in the next dialog box, or with components), you can display a list of existing SAP enhancements you want to include in the project. When you choose enhancements from this list to assign to a project, they cannot be used by other projects.

Editing enhancement components

To edit SAP enhancement components, select Enhancement components and then Change. If you place the cursor on a function exit, you go into the ABAP/4 Editor where you can enter the appropriate code. If the cursor is on a menu enhancement, you can change the menu text. If it is on a screen enhancement and you press the Edit component key, you can create and design the screen (subscreen) you want to include. To find out what you can do with each component, refer to the SAP documentation.

When editing function exits and screen enhancements, you should be aware of the following:

Although you can create screens, text elements and such like for the main program SAPLXyyy, you cannot change the program itself, since it is created by SAP. The program contains the includes LXyyyTOP, LXyyyUXX, LXyyyUnn and LXyyyXXX, which also cannot be modified, as well as the include ZXyyyZZZ, which is created and edited by the customer. The includes LXyyyTOP and LXyyyUnn contain the includes ZXyyyTOP and ZXyyyUnn; these are also created and edited by the customer and do not exist for SAP. Since you have to define the message ID in the FUNCTION-POOL statement in the include LXyyyTOP, you must specify it when outputting a message:


The include LXyyyUnn contains the function exit source code, which you can only display. It also contains the include ZXyyyUnn. If you double-click on the include name, you can display the source code of ZXyyyUnn and then use a pushbutton to switch to change mode and enter code. Of course, you can edit these includes "directly" using Transaction SE38. Since they appear within a function modules, they cannot contain events (subroutines, modules...).

If you want to define global data, the include LXyyyTOP contains the include ZXyyyTOP, which you can use to make data declarations. When you create global data while navigating through the transaction, it is automatically defined in the include ZXyyyTOP. You may require global data when editing the screen areas: if the function exit interfaces for data transfer are not global, then the fields required must firstly be copied to global fields, in order to make them known to the complete function group.

When creating your own includes, ensure that you observe the naming convention properly (the first 5 characters are ZXyyy) and that you store them in the include ZXyyyXXX, not in the main program SAPLXyyy. This is automatic if you are navigating through the transaction.

Sometimes example code from SAP is included with function modules. If desired, this can be incorporated into the include ZXyyyUnn belonging to the function module using CMOD (Change enhancement components --> move cursor to function module --> function ???). If this file already contains customer code, the SAP code is added at the end of the file. The function group can also contain subroutines written by SAP, which can be called if required. The customer cannot make changes to these subroutines. Refer to the SAP documentation for information on whether example code or subroutines exist, and how they may be used.

In the case of screen areas, note that when the relevant screen is created the screen type "subscreen" is selected in the screen attributes.

Since a project is generally inactive during editing, the SAP transactions affected are not changed.

Activating a project

When you activate a project, all its components are activated and the project status is set to "active". At the same time, all the programs, screens and menu interfaces associated with the project are regenerated (in the case of programs, only when they are started). When you start the enhanced transactions, you see the enhancements. If you use the Deactivate function to reverse activation of a project, the status is reset to "inactive". If the (de)activation process terminates, the project status does not change but may contain both active and inactive components. To restore the project to a consistent state, restart the (de)activation process.


When you create/change a project, you must create a correction. This correction contains only the attributes and the SAP enhancements associated with a project, as well as a program that is automatically started with the transport and activates the project in the target system. Corrections for individual components are created only when you edit the relevant component. This allows several users to edit different components from the same project at the same time without the use of a network. Since activating a project affects all components, you should transport all components associated with a project at the same time, in other words with the same transport request. To ensure that the project is activated automatically in the target system, the correction that contains the program concerned must also be in the same transport request. If this is not the case, or the project has not been activated in the target system for other reaons, you can also activate it by manually starting the program (RSMODACT).

Check out these links

Please refer the links,

Reward Points if it is helpful



Former Member
0 Kudos

<b>What is User Exits and Customer Exits?</b>

Difference between user exits & customer exits:

User exit - A user exit is a three character code that instructs the system to access a program during system processing.

SXX: S is for standard exits that are delivered by SAP. XX represents the 2-digit exit number.

UXX: U is for user exits that are defined by the user. XX represents the 2-digit exit number

Customer exit - The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks. *-- Mani

<b>The following document is about exits in SAP :-</b>

The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications.

SAP creates user exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.

<b>Types of Exits </b>

There are several different types of user exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.

<b>Menu Exits</b>

Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.

SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.

<b>Screen Exits</b>

Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.

<b>Function Module Exits </b>

Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits.

When you add a new menu item to a standard pull down menu, you use a function module exit to define the actions that should take place once your menu is activated.

Function module exits also control the data flow between standard programs and screen exit fields. SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs.

<b>These calls have the following syntax: </b>


<b>Field Exits</b>

Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or business-related processing for any screen field. Example: The data element BBBNR identifies a company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100.

The field exit concept lets you create a special function module that contains this logic.

You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number.

In 4.6c, you can use "RSMODPRF" program to create field exits.

An example of a user exits :-

MODULE user_exit_0001 INPUT  
    CASE okcode. 
        WHEN 'BACK OR EXIT'. 
            CASE sy-dynnr. 
                    WHEN '100'. 
                         SET SCREEN 0. 
                         LEAVE SCREEN. 
                    WHEN '200'. 
**** Note that you can write any code that satisfy youer needs   **** 
**** But in this case, this was wrote as a sample code for ref.     **** 
**** And you can test                                                              **** 
                         SET SCREEN 100. 
                         LEAVE SCREEN. 

Reward points if useful else getbk,


Former Member
0 Kudos

Hi Praveen,


FUNCTION field_exit_bstnr.*"----



  • create field symbol FIELD-SYMBOLS: <status>.* Assign value of variable from calling prog to field symbol ASSIGN ('(SAPMM06E)RM06E-BSART') TO <status>.* Display value retrieved in message* Note: Messages of type i and w are not allowed IF sy-subrc = 0. MESSAGE e003(zr) WITH <status> 'kkk'. ENDIF.ENDFUNCTION.

Adding fields to standard Infotype

SAP allows you to add additional fields to any standard Infotype. Step 1Using transaction PM01 chose the 'Enhance Infotype tab' and press the create 'All' button. Step 2The following screen will appear allowing you to enter the new fields you wish to add to the Infotype. i.e. ZZSPINST and ZZBACS Step 3Once saved and activated the new fields will appear in the Infotype screen and database table (See below)Infotype screen(PA20) Infotype database table
Modifying Standard SAP ‘System’ and ‘help’ Menu options · Use Menu Painter (Transaction SE41), enter program MENUSYST, status MEN and click change. · Modify SAP Standard by adding function codes: · For each of the function codes click on Extras and choose ‘Active functions in multiple statuses’.

Implementing Business Add-Ins (BADI)

The use of object orientated code within SAP has lead to new method of enhancing standard SAP code called Business Add-Ins or BADI's for short. Although the implementation concept is based on classes, methods and inheritance you do not really have to understand this fully to implement a BADI. Simply think of methods as a function module with the same import and export parameters and follow the simple instructions below.
Steps:1. Execute Business Add-In(BADI) transaction SE182. Enter BADI name i.e. HRPBSGB_HESA_NISR and press the display button 3. Select menu option Implementation->Create4. Give implementation a name such as Z_HRPBSGB_HESA_NISR5. You can now make any changes you require to the BADI within this implementation, for example choose the Interface tab6. Double click on the method you want to change, you can now enter any code you require.7. Please note to find out what import and export parameters a method has got return the original BADI definition (i.e. HRPBSGB_HESA_NISR) and double click on the method name for example within HRPBSGB_HESA_NISR contract is a method8. When changes have been made activate the implementation

Reward pts if found usefull:)



Former Member