SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

A Short Tutorial on User Exits



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Enhancement and Modification | Расширения и модификация
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Tue Sep 11, 2007 3:43 pm    Post subject: A Short Tutorial on User Exits Reply with quote

Content Author: Abhishek

1. Introduction:

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 <3 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"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Enhancement and Modification | Расширения и модификация All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.