cancel
Showing results for 
Search instead for 
Did you mean: 

What is USER EXIT?

Former Member
0 Kudos

What is user exit?

when is the user exit will be used? eg business process..

thanks

Accepted Solutions (0)

Answers (6)

Answers (6)

former_member227476
Active Contributor
0 Kudos

dear SS

In computer software, a user exit is a place in a software program where a customer can arrange for their own tailor-made program to be called. In the R/3 system from SAP, a user exit is contrasted with a customer exit and allows a customer's developer to access program components and data objects within the R/3 system. In R/3, some user exits use Include statements to include customer program enhancements that are called from the program. Other user exits use tables that are accessed through customization.

User exit is a functionality provided by SAP to add custom validation or enhancements to existing SAP transaction. Every module pool has customer function FORM in PBO and PAI. This form is basically a function that has an INCLUDE object, for e.g. INCLUDE ZXPADU01. User can include enhancements or source code, which will be triggered during execution of this transaction.

For e.g. all HR info type program (module pool) starts with the name MPnnnnnn. So infotype 0001 module pool name will be MP000000. Search for string 'customer_function' and you will find two Forms’ under each module pool. PERFORM customer_function_pbo(sapfp50m) and PERFORM customer_function_pai(sapfp50m). Place your cursor on 'customer_function' and double click. It will take you to 'FORM customer_function_pbo'. In this form you should see a CALL CUSTOMER-FUNCTION '001' function module. Double click on '001' and you can see SAP has provided an INCLUDE object, for e.g. INCLUDE ZXPADU01. You can add your logic in this object ZXPADU01 and at runtime when you enter data in the respective infotype for e.g. 0000, the validation included in the object will be executed.

Execute transaction CMOD to define Project that contains User Exit.

Here is an example of HR Benefit USER EXIT:

Enter Project name, for e.g. ZBEN0003, select option 'Enhancement assignment' and enter for e.g. PBEN0003 (name of SAP enhancement object). Click on 'Components' button and the screen will display 'EXIT_SAPLHRBEN00FEATURE_003'. Double click on this object and it will take you to FUNCTION EXIT_SAPLHRBEN00FEATURE_003. There will be an INCLUDE object starting with name 'Z' in this function module that you can update with your custom logic.

How to find user exits?

Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT

If you know the Exit name, go to transaction CMOD.

Choose menu Utilities->SAP Enhancements. Enter the exit name and press enter.

You will now come to a screen that shows the function module exits for the exit.

What is the use of user-exit and all?

Is it about modifying SAP program?

Suppose that you need some functionality which is not provided in sap what do you do. Sap has provided you with three options.

1) Customizing.

2) Modifications.

3) User Exits.

So what are these three:-

The first case when you take Customization is nothing but you are customizing SAP according to your need and requirement for example you want the Purchase Order Numbers to start with <Co_Name><seq_no>(sequential no) this kind of stuff is done in customization.

Modification is nothing but you are modifying SAP standard code which is written during developing your SAP standard programs or screens.

Thirdly to avoid modifications SAP has provided you with some exit points like for example after the PBO event in module pool programming comes the PAI, so in between these two events you wanted the change something so SAP has provided with an exit point. That exit point is called user exits. For example user exits for me21 PO Create is MM06005 if I am not wrong, they are nothing but simple function module within which you write your code which functions just like normal program and executes between the PAI and PBO events.

for ex:

SDVFX007 User exit: Billing plan during transfer to Accounting

SDVFX008 User exit: Processing of transfer structures SD-FI

SDVFX009 Billing doc. processing KIDONO (payment reference number)

SDVFX010 User exit item table for the customer lines

SDVFX011 Userexit for the komkcv- and kompcv-structures

V05I0001 User exits for billing index

V05N0001 User Exits for Printing Billing Docs. using POR Procedure

V60A0001 Customer functions in the billing document

V60P0001 Data provision for additional fields for display in lists

V61A0001 Customer enhancement: Pricing

use SMOD to find out the detail

rewards if it helps

siva

Message was edited by:

siva narayana

Former Member
0 Kudos

Hi

Refer link below, Hope it helps u

Former Member
0 Kudos

Example of Userexit is as under:

-


Purpose of USEREXIT is to convert any currency into INR for Proforma Invoice.

-


Below code should be written in Program RV60AFZC .this userexit gets triggered during Vf01

The code logic is that it checks for Pro forma invoice and changes SD document currency to INR

IF vbrk-vbtyp = 'U'.

VBRK-WAERK = 'INR'.

ENDIF.

-


Regards,

Rajesh Banka

Reward points if helpful

Former Member
0 Kudos

User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a functionmodule. The code for the function module is writeen by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.

The naming standard of function modules for functionmodule exits is:

EXIT_<program name><3 digit suffix>

The call to a functionmodule exit is implemented as:

CALL CUSTOMER.-FUNCTION ❤️ digit suffix>

Example:

The program for transaction VA01 Create salesorder is SAPMV45A

If you search for CALL CUSTOMER-FUNCTION i program

SAPMV45A you will find ( Among other user exits):

CALL CUSTOMER-FUNCTION '003'

exporting

xvbak = vbak

xvbuk = vbuk

xkomk = tkomk

importing

lvf_subrc = lvf_subrc

tables

xvbfa = xvbfa

xvbap = xvbap

xvbup = xvbup.

The exit calls function module EXIT_SAPMV45A_003

2. How to find user exits?

Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT

If you know the Exit name, go to transaction CMOD.

Choose menu Utillities->SAP Enhancements. Enter the exit name and press enter.

You will now come to a screen that shows the function module exits for the exit.

3. Using Project management of SAP Enhancements, we want to create a project to enahance trasnaction VA01 .

- Go to transaction CMOD

- Create a project called ZVA01

- Choose the Enhancement assign radio button and press the Change button

In the first column enter V45A0002 Predefine sold-to party in sales document.

Note that an enhancement can only be used in 1 project. If the enhancement is already in use, and error message will be displayed

Press Save

Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double click on the exit.

Now the function module is displayed. Double click on include ZXVVAU04 in the function module

Insert the following code into the include: E_KUNNR = '2155'.

Activate the include program. Go back to CMOD and activate the project.

Goto transaction VA01 and craete a salesorder.

Note that Sold-to-party now automatically is "2155"

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

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.

Menu Exits

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.

Screen Exits

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.

Function Module Exits

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.

These calls have the following syntax:

CALL CUSTOMER-FUNCTION ‘001’.

Field Exits

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

Former Member
0 Kudos

Hi,

User Exits are used in SAP where the standard functionality is not enough to fulfil the requirement.Go through the following scenario.

Ex: If you have two Sales Orgs and they both use one billing document type and

Client wants to have different number range for the sales orgs, ie. if we are

doing billing from Sales Org 1 we should have one number range and If we are

going for billing from Sales Org 2 then system need to propose other number

range.

In the above scenario we dont have standard customizing to fulfill the requirement. By using user exit we can achieve the requirement.

Note: Please go through a search in the forum before posting a thread. U will find related information.

Regards

Ali

Former Member
0 Kudos

USEREXIT

Userxits allow us to add our own functionality to SAP standard program

without modifying it . These are implemented in the form of subroutines and hence are also known as FORM EXITs. The userexits are generally collected in includes and attached to the standard program by the SAP.

All Userexits start with the word USEREXIT_...

They can be used in lot of different areas in SAP, some of which are listed below:

USEREXIT_NUMBER_RANGE

USEREXIT_SAVE_DOCUMENT

USEREXIT_SAVE_DOCUMENT_PREPARE

USEREXIT_CHECK_XVBAP_FOR_DELET

USEREXIT_CHECK_VBAK

USEREXIT_FILL_VBAP_FROM_HVBAP

USEREXIT_DELETE_DOCUMENT

USEREXIT_FIELD_MODIFICATION

USEREXIT_MOVE_FIELD_TO_VBAP

USEREXIT_MOVE_FIELD_TO_VBAK

Regards

AK