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.
cancel
Showing results for 
Search instead for 
Did you mean: 

User exit

Former Member
0 Kudos

Hi friends,

I havent worked on user exit ,will u pls tell me abt user exit, procedure to find and implement user exit.

7 REPLIES 7

Former Member
0 Kudos

Hi vidya

Finding User Exits(I had shown 3 ways)

Procdedure 1:

Valid up to at least SAP release 4.0B

One way to find user exits applicable for a given SAP screen. From the SE38 screen, enter the desired screen main program, and click Utilities > Find In Source Code, and "CUSTOMER-FUNCTION" as the text to search for. This will give you a list of the user exits and where they are called from for all screens in the module pool.

Note: format of ABAP statement is CALL CUSTOMER-FUNCTION '009', for example. This is the statement called by a submodule attached to the main program.

Actual related function is EXIT_SAPLCOIH_009, for example. This example refers to customer function 9 in main program SAPLCOIH. Not all user exit functions are names as such, but this is the usual format.

If you are doing data validation and want to set an error message with a field open, you must be sure that the user exit you are using is linked to a calling module in the PAI section of the screen and the field you wish to be open was in the CHAIN statement which caused the PAI module to be invoked.

If you use a customer function which was invoked by a PBO module to validate data, the "MESSAGE" statement will cause the screen to return with the desired message at the bottom, but with all screen fields closed for input.

When you make changes to the include module for a given customer function, you must regenerate the related function group before you will see the changes included in the screen behaviour.

Procdedure 2:

Need to find user exits module-wise? Suppose we want to see the available sales module user exits. Go to transaction SE81. Click on SD, then click "edit" on the menu bar and choose select subtree. Click on "information system," Open Environment node, customer exits, and enhancements. Press F8 to get all the user exits for that module. In brief: SE81->SD->Select subtree->Information System->Envir->Exit Techniques->Customers exits->enhancements->Execute(F8)

Procedure 3:

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.

Find user exits with a TCode

http://www.erpgenie.com/abap/code/abap26.htm

USER EXIT (SAP Enhancement)

http://www.planetsap.com/userexit_det_1.htm

List of all USER EXIT's (4.6c version)

http://www.planetsap.com/Userexit_List.htm

User Exits in FI/CO

http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc

Excellent web-site for user-exits

http://www.abaptalk.com/forum_posts.asp?TID=31&SID=3b18fa1dc8b7b9a1dbdedf36fe3bc2az&PID=56#56

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50...

Enhancements,Creating a project,Assigning SAP enhancements to a project,Editing enhancement components,Activating a project

http://www.planetsap.com/userexit_main_page.htm

SAP User Exits Routine

http://www.sap-basis-abap.com/sapab013.htm

User Exit and Enhancement explained in detail .

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

Excellent web-site for user-exits

http://www.abaptalk.com/forum_posts.asp?TID=31&SID=3b18fa1dc8b7b9a1dbdedf36fe3bc2az&PID=56#56

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50...

http://abap4.tripod.com/Other_Useful_Tips.html

Former Member
0 Kudos

Hi,

Exits are basically the hooks whcih SAP has provided to add your own code. There are two types of Exits:

1. Customer exits: Implemented as Function Modules within z includes. Anybody can change it and no access key is required.

2. User Exit: Implemented as subroutines within includes (any include except y or z includes). You need access for the specific include and then you can any subroutine (user exit) within that Include.

BADIs are the enhanced version of user exits where the same logic is implemented via classes and object (OOP)

Enchancement point is the latest once introduces with ECC6.0 . Not very sure about that but you can change it without any access key.

Please go through the following link which will help you understand the exits in a much better way:

http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec07a25db911d295ae0000e82de14a/content.htm

http://www.sap-img.com/abap/what-is-the-difference-between-smod-and-cmod.htm

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

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

http://www.sap-img.com/ab038.htm

User Exits.

-


http://www.erpgenie.com/sap/abap/code/abap26.htm

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sapgenie.com/abap/code/abap26.htm

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

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

http://www.easymarketplace.de/userexit.php

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sappoint.com/abap/userexit.pdfUser-Exit

customer exits

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662...

Menu Exit.

http://www.sappoint.com/abap/spmp.pdf

http://www.sappoint.com/abap/userexit.pdf

http://www.sapdevelopment.co.uk/enhance/mod_sapmenu.htm

http://www.sapdevelopment.co.uk/enhance/enhancehome.htm

USER EXIT

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sapgenie.com/abap/code/abap26.htm

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

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

http://www.easymarketplace.de/userexit.php

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sappoint.com/abap/userexit.pdfUser-Exit

http://www.sap-img.com/ab038.htm

http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

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

http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html

Field Exit

If you are in 4.7 and up follow this

1. Run report RSMODPRF

2. Run on the selection screen

3. In list Field Exit > Create

4. Give your data element

5.System will generate the FM FIELD_EXIT_XXXXX

6. Activate it.

7. Select your field exit and assign to your program and screen

8. Select again .. Field exit > Activate

If you are in version below 4.7

1. CMOD

2. Go to >Text enhancment > Field exit

then follow the same step from 3 onwards as given above.

Menu Exit

Procedure for Creating MENU Exits.

1) To get into Area Menu Maintenance Screen Type SE43 T.Code in Command

Line.

2) In Area Menu Paramenter type 'S000' (S triple Zero)

3) Then Press Change Icon in Application Tool Bar. Then It may ask for

Access Key [or] it may display "Specify Processing mode" window. If it ask

for the Access Key Check for the availability of OSS Note and apply to open

Standard SAP Menu to include MENU Exits. Otherwise, if it display "Specify

Processing mode" window with Three Push Button. In which select "Change" and

proceed further.

4) Then it will display "Information" window with the following information

"Caution : The Original Language of the structure is German (editing lang. :

English) ". Then press "Enter Key to proceed further.

5) Then you will get into "Edit Area Menu S000".

6) for eg:- Expand Tools Menu.

7) Then Press ABAP Workbench <Icon>.

😎 Then you will get into ABAP Workbench Menu Tree.

9) Then Expand Utilities Menu.

10) In the last line you will find one MENU EXIT Provision to include your

own menu. "Node Text Not Found" This text can be change by double Clicking

that. There you can find the T.Code. Here for Eg:- "+DW4".

11) for eg: - Here change the Text to "Sample Menu Exit" and then note down

the T.Code "+DW4".

12) Then Save with Change Request Number and come out of Transaction SE43.

13) Then Goto Transaction SE93.

14) Then type T.Code "+DW4" and press Create.

15) Then proceed further to create transaction called "+DW4".

I hope this could help you in Creating Menu Exit...

Creating menu exits

http://help.sap.com/saphelp_nw04/helpdata/en/c8/19762743b111d1896f0000e8322d00/content.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/83/7a18cbde6e11d195460000e82de14a/frameset.htm

Regards,

Satish

Former Member
0 Kudos

Hi vidya,

Below u can understand user exit here im gving how to find exit.

take tcode and goto status dclick on pror and goto attributes take package and goto smod and F4 in that give the package name and F8 u will display some exits.

and implementing depends on the requriments .

for finding wch exit is suitable just keep break-point in all the inculdes then run the tcode u will find its triggering thn over write the code u need..

What is the difference between SMOD and CMOD? CMOD is the Project Management of SAP Enhancements (i.e., SMOD Enhancements). SMOD contains the actual enhancements and CMOD is the grouping of those SMOD enhancements.

User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a function module. The code for the function module is written 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 function module exits is:

EXIT_<program name><3 digit suffix>

The call to a functionmodule exit is implemented as:

CALL CUSTOMER.-FUNCTION ❤️ digit suffix>

For Example:

The program for transaction VA01 Create salesorder is SAPMV45A

1. If you search for CALL CUSTOMER-FUNCTION 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.

or use this ABAP program to search for user exits :-

Finding the user-exits of a SAP transaction code

3. Using Project management of SAP Enhancements

You want to create a project to enhance transaction 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 for 1 project. If the enhancement is allready 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 create a salesorder. Note that Sold-to-party now automatically is "2155"

Hi,

SMOD is just to see all the enhancements in the sap system.

CMOD is the customer projects where enhancements are implemented. If you want to implement any enhancements then you will create a project and assign the enhancement and do the coding in exits.

To customize an existing SAP application we have been provided the user exits by SAP. These exits are packaged under enhancements. You choose an enhancement according to your requirements e.g. enhancement MM06E005 is used for adding custom field in me21/me21n. SAP has limited no of enhancements for any transactions, you have to choose only from them to cater your requiement you cant create them.

After selecting your enhancements you have to inherit them in your project in CMOD. Thereafter you do coding and other things like making your subscreens or adding fields to standard tables in respective exits.

To see the effect of your whole project you must activate each componnents of your enhancements

Hi Rajan,

Hope u know tht these are tcodes used for userexits .Generally in Smod it is used for searching the exits and CMOd it is used for implementing the project into the exact exits where we want to implement it..

and check this link for more info...

www.sap-img.com/abap/what-is-the-difference-between-smod-and-cmod.htm

sap.ittoolbox.com/.../sap-log-sd/difference-between-transaction-code-smod-cmod-in-user-exit-625142 - 60k

- 31k

Regrads

santhosh

Edited by: santhosh kumar on Feb 1, 2008 8:28 AM

Former Member
0 Kudos

User exits is used when you want to change some standard SAP functionality or want to add some new functionality to SAP. To incorporate such facility SAP have provided some specitic user exit by using those we can add or alter to the standard functionality. these are just like hooks.

There are two types of user exit :

1. In SD, the exits are difectly attached to the standard code. you need access key to add code there. Ex: SAPMVAFZZ etc. these are used as subroutine.

2. There are customer exit. These are used as function module. they can be developed in T-Code CMOD & SMOD.

3. there are BADI also which used OOPS functionality.

Former Member
0 Kudos

check the foll link,

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

also refer

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

Creating menu exits

http://help.sap.com/saphelp_nw04/helpdata/en/c8/19762743b111d1896f0000e8322d00/content.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/83/7a18cbde6e11d195460000e82de14a/frameset.htm

For screen exits.

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

chech these links for user exists its usefull

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

http://help.sap.com/saphelp_47x200/helpdata/en/dd/561602545a11d1a7020000e829fd11/frameset.htm

http://www.sap-basis-abap.com/sapab013.htm

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

refer

just refer to the link below for step by step procedure with screen shots

http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g

Check this link:

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

http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d40358411d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm

http://fuller.mit.edu/tech/dialog_programming.html

http://sap.mis.cmich.edu/sap-abap/abap09/index.htm

http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm

Also, refer this:

Overview

R/3 provides three "customization spots" that allow you to enhance FI/CO features without modifying the standard code. Although often collectively referred to as "user exits," two of the three have different names. SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. Enhancements were new in release 3.0.

The Open FI Interfaces or Business Transaction Events are also used to expand the standard functionality within SAP. These events are defined in the IMG. Business Transaction Events were new in release 4.0. They are not available for all modules and are not called on all integrated transactions into FI as of release 4.5B. This will change with each release and should be retested.

The older User Exits in FI/CO are "Z" programs that are defined in table T80D for client-dependent user exits, and in table T80I for client-independent user exits. These are also used to expand the standard functionality within the FI/CO modules. These User Exits have been available since the early releases of SAP. All of these FI/CO User Exits are listed in this document in the Configuring User Exits (Older). The list is included because these User Exits are not a part of the Enhancements or Business Transaction Events and do not have an Info System for searching.

Benefits• Standard SAP functionality can be enhanced without modification to the standard code.

• Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.

Configuring SAP Enhancements

Basic Steps in Configuring an Enhancement

• Find the appropriate Enhancement.

• Enter the ABAP code in the "Z" program within the function module.

• Create a project.

• Add the Enhancement to the project.

• Activate the project.

Example Business Scenario for Enhancements

Company A has a requirement to validate all customer master records created with a U.S. address. The U.S. entity reports on the industry field on the customer master. This is only a U.S. requirement and should not be required for the other countries, so the field status would not work. To accomplish this requirement, Company A will need to set up an Enhancement for the customer master transaction. The necessary steps are detailed below with screenprints. This example was configured in a 4.6C system.

Detailed Steps

1. Tools ABAP Workbench Utilities Enhancements Definition Utilities List Enhancements

2. Do not execute this without any parameters! There are too many Enhancements and it will probably time out. You’re searching for a customer master exit. Enter mast in the short text (see Figure 1). You’ll start there. Searching for an exit can be tricky, so make sure you try several things before giving up.

3. Execute the search.

Start Your Search for a Master Exit Here

4. Look through the list until you find the Enhancement for User exits: Customer Master Data.

5. Double-click on the enhancement SAPMF02D. This will take you to the details of the Enhancement and list the function modules included in the Enhancement.

6. To continue, double-click on the function module EXIT_SAPMF02D_001

7. This will take you to the source code for the function module. Click on the Import tab to review the tables/fields that are available for the Enhancement

The Tables That Are Available for the Enhancement

8. To view the tables/fields that can be changed in the function module, click on the Export and Changing tabs. For this function module, these tabs are empty because you can only validate data. You cannot change any fields in this enhancement.

9. Return to the Source Code tab.

10. Scroll down until you see the Include statement in the program. The "Z" program listed after the Include is where your code will be written

Your Program Will Begin After the Include Statement

11. Double-click on the Include. You will be prompted to create the include. Click on Yes to create.

12. At this point you will be prompted to enter a development class and to create a transport request. If you do not know which development class to use, please contact your technical team.

13. Enter the following ABAP code into the program

*

User exit to ensure that all US customers have a group key

entered on the customer master.

*

if i_kna1-land1 = 'US' and

i_kna1-brsch = ' '.

message e001(F2).

endif.

The ABAP Code You Need to Enter

14. Note that the table name matches the table name in the import tab tables.

15. In this example you are using the standard message class F2 with message number 001. Normally, you will create your own message within your own message class. All customer message classes must begin with a "Z" and are created in transaction SE91.

16. Save the program.

17. The next step is to create the project. Go to transaction code CMOD or follow menu path: Tools ABAP Workbench Utilities Enhancements Project Management.

18. Enter the project name; begin the name with a "Z."

19. Click on the Create button.

Click on Create After You Type in the Project Name

20. Enter in a description for the project.

21. Click on the Enhancement Assignments button.

22. You will be prompted to save the enhancement. Click on Yes.

23. At this point you will be asked for a development class and to create a transport for the project. You may use the same one created when adding the ABAP code to the function module.

24. Enter the name of the enhancement SAPMF02D (see Figure 6).

Enter the Name of the Enhancement Here

25. Save the project.

26. Back out of the enhancement assignment.

27. Activate the project by hitting the Activate button.

The SAP Enhancement is ready to be tested! Try creating a customer with U.S. as the country and a blank group key. Be sure to test one with a group key to make sure the message is not displayed in error as well.

Configuring Business Transaction Events

Basic Steps in Configuring an Event

• Make sure the application is active for Business Transaction Events.

• Copy the sample interface function module into a "Z" function module.

• Enter the ABAP code into the source code section of the new "Z" function module. You may choose to create a "Z" program to enter the code into and then insert the "Z" program into your function module source code.

• Activate the function module.

• Assign the function module to the event, country and application.

Example Business Scenario for Business Transaction Events

Company A would like to copy the group key field from the vendor master into the allocation field on all the line items within a vendor invoice and payments, including the vendor lines. This requirement assumes only one vendor is posted to in a document.

To accomplish this requirement, Company A will use the Business Transaction Event 1130, Post Document: SAP Internal Field Substitution.

1. IMG Menu Path: Financial Accounting Financial Accounting Global Settings Use Business Transaction Events Environment Infosystem (Processes).

2. Find the correct Business Event. You are updating a field, so you select the Processes Info System instead of the Publish and Subscribe Info System.

3. Execute the search with the defaults.

4. Find the correct interface for updating a document: Post Document: SAP- Internal Field Substitution

Find the Correct Interface for the Business Event

5. Put your cursor on the event and click on the Sample Function Module button.

6. You are now in transaction SE37 – Function Builder. This is the function module (sample_process_00001130) you will need to copy into a "Z" name function module for your coding

Figure 8. This Is the Function Module You Need to Copy Your "Z" Name Function Module

7. Click on the Copy button.

8. Enter the "Z" function module name in the To Function Module field

9. Enter a Function Group. If you need to create a "Z" function group, go to transaction code SE37 and follow menu path: Go to Function Groups Create Group. A function group is a logical grouping of function modules, and the ABAP code is generated for function groups. You will be prompted for a development class and transport when creating the function group.

Enter Your "Z" Function Module Name Here

10. In Function Builder (transaction SE37), enter the new "Z" function module. Click on the Change button.

11. The system will default into the source code screen where you may enter your ABAP code.

12. Notice the tables available for the code. Additional tables may be declared if necessary.

13. Enter the following source code

tables: lfa1.

data: z_groupkey like lfa1-konzs.

z_groupkey = ' '.

loop at t_bseg.

check for vendor lines. If one is found, read the vendor master and

retrieve the group key field.

if t_bseg-koart eq 'K'.

select single konzs from lfa1 into z_groupkey

where lifnr = t_bseg-lifnr.

endif.

Move the group key field into all line items allocation field.

loop at t_bsegsub.

t_bsegsub-zuonr = z_groupkey.

modify t_bsegsub index sy-tabix.

endloop. "t_bsegsub

endloop. "t_bseg

The Screen Where You Enter Your Source Code

14. Save the function module.

15. Back out to the main Function Builder screen by clicking on the green arrow button.

16. Activate the function module by clicking on the Activate button

. Activate the Function Module from This Screen

17. Assign the function module to the event in the IMG: Financial Accounting Financial Accounting Global Settings Business Transaction Events Settings Process Function Modules of an SAP Appl.

18. Hit enter past the warning messages that this is SAP data.

19. Click on the New Entries button.

20. Enter the process for your interface. In your example it is 00001130.

21. Enter the country the interface is valid for. If it is valid for all countries, leave this field blank.

22. Enter the application the interface should be called for. If it should be called for all applications, leave this field blank. Please note that not all integrated transactions are programmed to go through these interfaces! You will need to test to find out!

23. Enter the new "Z" function module

Enter Your New "Z" Function Module Here

24. Save the settings. At this point you will be prompted for a CTS number for the configuration change.

25. The Business Transaction Event is complete! You are ready for testing.

Configuring User Exits (Older)

Basic Steps in Configuring an User Exit

• Create a "Z" program for the User Exits and enter the necessary ABAP code.

• Enter the new program name into table T80D.

• Configure the application to call the User Exit.

List of User Exits

• Variable Field Movements

• Substitutions in FI, CO, PCA

• Validations in FI, CO, PCA

• Rollups in SPL

• Fixed Field Movements in SPL

• Cost Center Summarization on Detail Screen

• Sets Formula Variables

Example Business Scenario for User Exits

Company A would like to add a "Z" field in the Special Purpose Ledger to capture a Business Unit field for reporting. They have used all the standard SAP fields such as Business Area and Profit Center. The field will only be used for reporting and is only needed in the Special Purpose Ledger. You created a special ledger table (ZZSPL1) with field Z_BUNIT and need to populate this field based on a combination of G/L account, fund and functional area.

To accomplish this requirement, Company A will use the Variable Field Movement User Exit. To make maintenance easier, table ZZBUSUNIT was created with the G/L account, fund and functional area fields as key fields, and the business unit field as a non-key field. You generated the table maintenance so the table could be updated using transaction SM30. SAP users update the business unit determination rules in table ZZBUSUNIT by entering the G/L account, fund and functional area, and then the business unit that combination should be posting to. The User Exit will read table ZZBUSUNIT using the G/L account, fund and functional area from the posting transaction and determine the business unit. The steps for using the user exit are detailed below. This example was created on a 4.6C system.

1. Copy the delivered template User Exit program RGIVU000_TEMPLATE into a "Z" program. Follow menu path Tools ABAP Workbench Development ABAP Editor (transaction code SE38). In early releases, the delivered program was RGIVU000.

2. You will be prompted for a development class and a transport. Please check with the technical team for the correct development class.

3. At the initial ABAP Editor screen, enter your new "Z" program name, select the Source Code button and click on Change

To Enter Your New Code, Select Source Code and Click on the Change Button

4. Enter the following code in the User Exit (Figure 14):

FORM E01_MVC USING FROM_FIELD TO_FIELD.

to_field = 'CORP'. "Set a default business unit.

read table zzbusunit to determine the business unit field.

select single z_bunit from zzbusunit into to_field

where hkont = accit_glx-hkont and

geber = accit_glx-geber and

fkber = accit_glx-fkber.

ENDFORM.

Figure 14. Enter Your New Code at This Screen.

5. Activate the program by clicking on the Activate button.

6. Change the configuration in the User Exit table to point to your new "Z" program.

7. Follow the IMG menu path: Financial Accounting Special Purpose Ledger Basic Settings User Exits Maintain Client Specific User Exits.

8. The entry to maintain is application area GIMV: Variable Field Movement. Enter your "Z" program

Enter Your "Z" Program in the Application Area GIMV: Variable Field Movement

9. Save the changes.

10. The final configuration step is to assign the User Exit in the variable field movement for your special ledger table. In the IMG: Financial Accounting &#61664; Special Purpose Ledger &#61664; Basic Settings &#61664; Master Data &#61664; Maintain Field Movements. Field movements control how the fields in a special ledger table are populated. They can be populated straight from other fields in a posting or through User Exits.

After You Assign the Business Unit Field and the G/L Account, the Exit Field Should Contain U01.

11. Assign the business unit field as a receiver and the G/L account as the sender. The Exit field should contain U01 (see Figure 16).

12. The User Exit number U01 calls User Exit E01_MVC form in the "Z" program.

13. Save the field movement.

14. You are ready to test your User Exit!

Reward points if useful.

Former Member
0 Kudos

Hi vidya more ,

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.

Finding User Exits

Procdedure 1:

Valid up to at least SAP release 4.0B

One way to find user exits applicable for a given SAP screen. From the SE38 screen, enter the desired screen main program, and click Utilities > Find In Source Code, and "CUSTOMER-FUNCTION" as the text to search for. This will give you a list of the user exits and where they are called from for all screens in the module pool.

Note: format of ABAP statement is CALL CUSTOMER-FUNCTION '009', for example. This is the statement called by a submodule attached to the main program.

Actual related function is EXIT_SAPLCOIH_009, for example. This example refers to customer function 9 in main program SAPLCOIH. Not all user exit functions are names as such, but this is the usual format.

If you are doing data validation and want to set an error message with a field open, you must be sure that the user exit you are using is linked to a calling module in the PAI section of the screen and the field you wish to be open was in the CHAIN statement which caused the PAI module to be invoked.

If you use a customer function which was invoked by a PBO module to validate data, the "MESSAGE" statement will cause the screen to return with the desired message at the bottom, but with all screen fields closed for input.

When you make changes to the include module for a given customer function, you must regenerate the related function group before you will see the changes included in the screen behaviour.

Procdedure 2:

Need to find user exits module-wise? Suppose we want to see the available sales module user exits. Go to transaction SE81. Click on SD, then click "edit" on the menu bar and choose select subtree. Click on "information system," Open Environment node, customer exits, and enhancements. Press F8 to get all the user exits for that module. In brief: SE81->SD->Select subtree->Information System->Envir->Exit Techniques->Customers exits->enhancements->Execute(F8)

User Exit and Enhancement explained in detail .

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

Excellent web-site for user-exits

http://www.abaptalk.com/forum_posts.asp?TID=31&SID=3b18fa1dc8b7b9a1dbdedf36fe3bc2az&PID=56#56

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50...

http://abap4.tripod.com/Other_Useful_Tips.html

USER EXIT (SAP Enhancement)

http://www.planetsap.com/userexit_det_1.htm

List of all USER EXIT's (4.6c version)

http://www.planetsap.com/Userexit_List.htm

User Exits in FI/CO

http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc

Excellent web-site for user-exits

http://www.abaptalk.com/forum_posts.asp?TID=31&SID=3b18fa1dc8b7b9a1dbdedf36fe3bc2az&PID=56#56

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50...

Enhancements,Creating a project,Assigning SAP enhancements to a project,Editing enhancement components,Activating a project

http://www.planetsap.com/userexit_main_page.htm

Find user exits with a TCode

http://www.erpgenie.com/abap/code/abap26.htm

SAP User Exits Routine

http://www.sap-basis-abap.com/sapab013.htm

ABAP Enhancement and Modifications(Enhancement Framework , Business Add-Ins ,Business Transaction Events)

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/109f5161-ee76-2910-cb99-db10b... [original link is broken]

What is the difference between SMOD and CMOD?

http://www.sap-img.com/abap/what-is-the-difference-between-smod-and-cmod.htm

A Short Tutorial on User Exits

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

cheers!

gyanaraj

****Pls reward points if u find this helpful

Former Member
0 Kudos

Hi,

First u find it contain userexit or not through the following steps

1. First go to that transaction to which u want to do userexit

2. Go to system>status> and find program name for that trascation

3. Next open that program ...Go to Attributes and find Package name

4. Now Go to Transaction code SMOD

5. click F4 (search) button and give that package name

6. click on Enter...Then we can see all the list of Userexits for that tranaction code

7. Then u select that Userexit which is required for u r requirement

8. Then Select that userexit and click on change

9.Next Click on Componets tab

10. Here we can see function module ..double click on it

11.Here double click on include program and write code.

ok..

Narasimha