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

user exits

Former Member
0 Likes
812

what is enhancement and user exits?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
750

Hi,

For Standard transaction SAP provided the the enhancements(for ex:for xd01 SAPMF02D). The enhancements having one user exit or more than one user exit (user exit:EXIT_ SAPMF02D_001.).

Userexit is a methodology using which we can add our custom code in the SAP Standard transaction without disturbing the SAP Standard code. SAP will provide enhancement for one transaction. We can have more then one enhancement. Enhancement is a container with a set of userexits. SAP will provide only definition of the exit. Which does not contain any standard code. In the relevant transaction program SAP will call their exit as a standard. The Userexit needs to be implemented inorder to provide a custom logic to serve business requirement.

SMOD: It is used to find the enhancement related to different applications.

CMOD: It is used to implement the userexit.

There are 4 types of exits available:

1) Function-module Exits,

2) Menu exits,

3) Screen exits and

4) Field exits.

1) Functionmodule exits:

These exits are used to provide additional functionality to SAP standard transaction. By default SAP is not provided this functionality.

For Example my requirement is, when user create or change customer and the customer belongs to US Country the Industry sector (brsch) field is not empty.

Step1: Find the enhancement. For that one goes to SMOD.

Click on F4 on Enhancement. We Search for enhancement. In this case we can found the enhancement by giving the Description: mast. We got the enhancement as

SAPMF02D: User exits: Customer master data.

(Or)

We find the enhancement at transaction level,

Go to XD01 transaction click on System/Status/double click on Program name

In this program we search for “CALL customer-function’. We get the all related exits the starts with EXIT name._ enhancementname_Threedigitnumber. Sometimes it Will not an enhancement

Step2: Go to CMOD create the custom project.

Click on Enhancement assignments button

Give the Enhancement name: SAPMF02D

Step 3: Click on Components button. Under that we found the one function module:

EXIT_ SAPMF02D_001. Double Click on that function module. In the Source code tab of this function module SAP provide the one Zinclude. SAP doesn’t know our requirement. In this Zinclude we provide our own custom logic to make of the parameters provided in import, export and tables section.

We write the following code:

IF i_kna1-land1 = 'US' AND

i_kna1-brsch = ' ‘.

MESSAGE e001 (f2) WITH ‘ Industry sector should not be blank for US Customers’.

ENDIF.

Step4: SAVE, CHECH and ACTIVATE the Cutsom project.

Step5: Now go to XD01 Transaction We perform our requirement. After we don’t want that requirement go to CMOD and deactivated the custom project.

If it is helpful rewards points

Regards

Pratap.M

5 REPLIES 5
Read only

Former Member
0 Likes
750

Hi Friend,

User Exits & Customer Exits :

User Exits: These are subroutines used in the SAP namespace 'hard-coded' at various points within SAP Repository objects.

Customer Exits :

1. Menu Exits: Menu exits add items to the pull down menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications. These special entries have function codes that begin with "+" (a plus sign).

2. Screen Exits: Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special sub screen areas on a standard R/3 screen and calling a customer sub screen from the standard screen’s flow logic. It is called by call customer- sub screen

3.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 pulldown 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.

It is called by Call Customer- function

Read only

Former Member
0 Likes
750

Hi,

Welcome To SDN !!

Customizing exits allow 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.

If you want to enhance the functionality of your R/3 System, you should take advantage of the exits available in standard R/3 applications. There are two main reasons why you should use exits rather than modifying SAP software yourself. Add-ons attached to exits have the advantage that:

• They do not affect standard SAP source code

When you add new functionality to your SAP System using SAP’s exits, you do not alter the source code of standard SAP programs in any way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but exist separately from SAP’s standard software package.

• They do not affect software updates

When you add new functionality to your R/3 System using SAP’s exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects’ names ensure that they will not be affected by any changes or new additions to the standard software package.

Customer exits are not available for all programs and screens found in R/3 standard applications. You can only use customer exits if they already exist in the R/3 System. You find find more information about locating applications with pre-defined exits in Locating Applications that have Exits.

As part of the enhancement concept, it is possible for the customer to

add his own elements to application logic, screens and menus.

The current possibilities for enhancement are:

Text enhancements:

Allow the customer to add supplementary documentation for data fields

non-specific to a transaction, and to change key word texts.

Field exits:

Every screen element with data element reference can branch to PBO or

prior to PAI to a function module if desired. The field contents are

available here for doing special checks and making changes (e.g. user-

specific checks, authority checks, writing entered data and producing

statistics...).

Function exits:

From the main program you branch into a software level, in which you you

can store ABAP/4 coding. The applications programmer at SAP determines

where in the main program the function exit is placed, and which data is

imported/exported via the interface. The accompanying documentation

describes the functionality of the function exit.

Menu enhancements:

Pre-conceived menu items can be activated and named. On the function code

set at menu item selection, there can be a reaction in a relevant

function exit.

Screen enhancements:

The customer can determine the layout of areas in screens provided by the

applications developer. Here, additional information can be displayed or

data entered.

Check this SAP hlep on User exits.

http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm

Take a look here

http://www.allsaplinks.com/user_exit.html

www.sap-img.com/abap/what-is-user-exits.htm

Also please check these threads for more details about user exits.

Regards

Kiran Sure

Read only

Former Member
0 Likes
751

Hi,

For Standard transaction SAP provided the the enhancements(for ex:for xd01 SAPMF02D). The enhancements having one user exit or more than one user exit (user exit:EXIT_ SAPMF02D_001.).

Userexit is a methodology using which we can add our custom code in the SAP Standard transaction without disturbing the SAP Standard code. SAP will provide enhancement for one transaction. We can have more then one enhancement. Enhancement is a container with a set of userexits. SAP will provide only definition of the exit. Which does not contain any standard code. In the relevant transaction program SAP will call their exit as a standard. The Userexit needs to be implemented inorder to provide a custom logic to serve business requirement.

SMOD: It is used to find the enhancement related to different applications.

CMOD: It is used to implement the userexit.

There are 4 types of exits available:

1) Function-module Exits,

2) Menu exits,

3) Screen exits and

4) Field exits.

1) Functionmodule exits:

These exits are used to provide additional functionality to SAP standard transaction. By default SAP is not provided this functionality.

For Example my requirement is, when user create or change customer and the customer belongs to US Country the Industry sector (brsch) field is not empty.

Step1: Find the enhancement. For that one goes to SMOD.

Click on F4 on Enhancement. We Search for enhancement. In this case we can found the enhancement by giving the Description: mast. We got the enhancement as

SAPMF02D: User exits: Customer master data.

(Or)

We find the enhancement at transaction level,

Go to XD01 transaction click on System/Status/double click on Program name

In this program we search for “CALL customer-function’. We get the all related exits the starts with EXIT name._ enhancementname_Threedigitnumber. Sometimes it Will not an enhancement

Step2: Go to CMOD create the custom project.

Click on Enhancement assignments button

Give the Enhancement name: SAPMF02D

Step 3: Click on Components button. Under that we found the one function module:

EXIT_ SAPMF02D_001. Double Click on that function module. In the Source code tab of this function module SAP provide the one Zinclude. SAP doesn’t know our requirement. In this Zinclude we provide our own custom logic to make of the parameters provided in import, export and tables section.

We write the following code:

IF i_kna1-land1 = 'US' AND

i_kna1-brsch = ' ‘.

MESSAGE e001 (f2) WITH ‘ Industry sector should not be blank for US Customers’.

ENDIF.

Step4: SAVE, CHECH and ACTIVATE the Cutsom project.

Step5: Now go to XD01 Transaction We perform our requirement. After we don’t want that requirement go to CMOD and deactivated the custom project.

If it is helpful rewards points

Regards

Pratap.M

Read only

Former Member
0 Likes
750

Hi,

Enhancements:

that is, inserting user developments at points predefined by SAP. We have Customer exits, Userexits and BAdi's which are predefined by SAP.

Userexits:

User exits are actually empty subroutines that SAP developers provide for you. You can fill them with your own source code.

The original purpose of user exits was to allow the user to avoid modification adjustment.

Read only

Former Member
0 Likes
750

hi kovile,

Please go through the following link,

it will give you the detailed description about user exits and enhancements.

[http://sap.niraj.tripod.com/id21.html]

please reward if usefull,

Thanks & Regards,

A.kalyan.