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

What is User Exit?

Former Member
0 Likes
701

Hi,

Can anybody tell me what is USER EXIT. If u can give me one FULL CODING EXAMPLE that will be very much easy for me to understand.

Thankyou

Regards

Gagan

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
661

A user exit is an area in standard sap delivered code where the customer can make small modifications. You activate these exists via transaction SMOD and CMOD. Really, they are just function modules with include programs inside. You just create the include program by double clicking it. Then write your code in the include program.

Regards,

Rich Heilman

Hi,

Can anybody tell me what is USER EXIT. If u can give me one FULL CODING EXAMPLE that will be very much easy for me to understand.

Thankyou

Regards

Gagan

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
662

A user exit is an area in standard sap delivered code where the customer can make small modifications. You activate these exists via transaction SMOD and CMOD. Really, they are just function modules with include programs inside. You just create the include program by double clicking it. Then write your code in the include program.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
661

Hi,

SAP allows the users to modify its objects without affecting the source code but still allows us to change the functionality as per the customer needs.

You can use these exits only if they already exist in SAP r/3 system otherwise you have to request SAP to develop an exit.

There are 4 types of exits:

1. Menu Exit - you can add menu items to the standard menu

2. Screen Exit - to add subscreens to a screen

3. Function Module Exit

4. Field Exit

Example:

Go to se38 and prog name: LV69AFZZ

we can modify this include:

*&----


*& Form USEREXIT_FIELD_MODIFICATION

*&----


  • --> p1 text

  • <-- p2 text

*----


FORM userexit_field_modification.

IF sy-uname EQ 'PATELSU'.

IF ( screen-name = 'RV61A-SELKZ'

OR screen-name = 'KOMV-KAWRT'

IF komv-kschl = 'VPRS' OR KOMV-STUNR = '940'.

screen-active = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDFORM. " USEREXIT_FIELD_MODIFICATION

The above modification in user exit, can be used to make the screen active or inactive as per our requirements.

It actually depends on ur requirements, and which user exit to modify.

Regards,

Anjali.

Read only

0 Likes
661

All user exits are under your management so you can do whatever you want, without touching SAP's code. Just play around with it and debug. Tiest.