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: 

Difference between an exit (smod/cmod) and a user exit

Former Member
0 Kudos
1,025

What is the difference between an exit and a user exit? When I run the program that is floating around (The one that displays all <b>exits</b> for a tcode) I see many exits but not the <b>user exits</b> that we use. This tells me that there is a difference between the exits in smod and the user exits. For instance, if I run the program for VF01 I get the following:

Exit Name Description

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

SDVFX001 User exit header line in delivery to accounting

SDVFX002 User exit for A/R line (transfer to accounting)

SDVFX003 User exit: Cash clearing (transfer to accounting)

SDVFX004 User exit: G/L line (transfer to accounting)

SDVFX005 User exit: Reserves (transfer to accounting)

SDVFX006 User exit: Tax line (transfer to accounting)

However we are not using any of those. What I want to know is when do I use one of those verses using the user exits in the include RV60AFZC. We are currently using USEREXIT_FILL_VBRK_VBRP.

Davis

1 ACCEPTED SOLUTION

Former Member
0 Kudos
201

You question is all about the difference between USER EXIT and CUSTOMER EXIT.

User-exits(modifications)

USER EXITS are FORMS and are called by SAP standard programs using PERFORM.

Inside the form (user exit) you can read and change almost any global data from host program.

User exits are more flexible because you have more information to use in your code but on the other hand , it is very easy to manipulate erroneously global data and lead the standard program to a dump or even to make database inconsistent.

User-exit doesn’t have any classification.

Basically designed For SD module.

User-exits can be written only using access-key.

With user-exits the code , the developer has written will not be there for next version unless modification assistance tool is used.

Customer-exits(enhancements)

CUSTOMER EXITS are FUNCTIONS so they are called using CALL FUNCTION (or more exactly CALL CUSTOMER FUNCTION).

Inside a function (customer exit) you can only acces your import/export/changing/tables parameters.

Customer exits are more restrictive but you are sure any change you can make to any parameters will never lead to inconsistency

In customer-exit we have function-module exit , screen exit , menu exit.

Are available for MM,SD,FI,HR…..Basically designed for all modules.

No need of access key.

Customer-exits are not wiped during upgradation.

As I can't put it in the form of table. Just map the same point in both exits.

All the very best to you.

- Mohan

6 REPLIES 6

Former Member
0 Kudos
201

CMOD transaction is used to create the project, where in you can link the user exit to the project and you can activate and deactive the project whenever you need. If you deactive the project, it won't call that particular exit attached to that project even if the code is given in that exit.

SMOD Transaction is used to search for the available user exits.

SD User exits are different than other modules.

for example for Sales Order - SAPMV45A, in that many includes will be there and in each include you can find the subroutines these will be called in different scenarios.

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 functionmodule exits is:

EXIT_<program name><3 digit suffix>

The call to a functionmodule exit is implemented as:

CALL CUSTOMER.-FUNCTION ❤️ digit suffix>

To find a Exit.

Goto Transaction -- Find The Package

SMOD >f4>Use the Package here to Find the Exits In the Package.

Else if you Want to search by Application Area wise ,

There is one more tab to find the Exits in the Respective Application Area.

Implementing the Exit-- CMOD Create ProjectsAssgn your Component .

Now Run ur Transaction to Check if it Triggers.

Thats it..

Suppose you need to find out all the user exits related to a tcode.

1. Execute the Tcode.

2. Open the SAP program.

3. Get the Development Class.

4. Execute Tcode SE84.

5. Open the Node 'Envir. -> Exit Techniques -> 'Customer Exits -> Enhancements'

6. Enter the Development class and execute.

Hope it helps.

Thanks,

Srinivas

0 Kudos
201

Srinivas, thanks for that information. Is there a time where one will want to use an exit (found in smod) over a user exit, found in the includes listed in the main program? What prompted this was I needed to find a user exit so I could change values in the header and line item of a billing document. I found an exit, in smod, that will give me access to the header than another that will give me access to the line items. Then I found an include (user exit) that is called only when a billing document is created and it gives me access to both the header and line items in one exit. My question is, when does one know to use an include (user exit) over a FM exit (smod). Is there a trick to finding the userexits (includes) besides viewing the code for the main program (go to se93 input the tcode and view that program)?

Regards,

Davis

0 Kudos
201

Hi Davis,

Basically we need to check with the description given in the function exit or Subroutine in the includes (incase of SD user exits (Sales Order, Delivery or Billing) and then have to put the break point and can find out the suitable one for our scenario.

The below are the include for the billing document user exits apart from the available function module exits.

include rv60afzz.

include rv60afza.

include rv60afzb.

include rv60afzc.

include rv60afzd.

Thanks,

Srinivas

0 Kudos
201

So only SD documents have the UserExits as includes? If that is the case then that answers my question perfectly. In that case I suppose you just have to look at all types of enhancements and decide which one will work the best.

Thanks,

Davis.

Former Member
0 Kudos
202

You question is all about the difference between USER EXIT and CUSTOMER EXIT.

User-exits(modifications)

USER EXITS are FORMS and are called by SAP standard programs using PERFORM.

Inside the form (user exit) you can read and change almost any global data from host program.

User exits are more flexible because you have more information to use in your code but on the other hand , it is very easy to manipulate erroneously global data and lead the standard program to a dump or even to make database inconsistent.

User-exit doesn’t have any classification.

Basically designed For SD module.

User-exits can be written only using access-key.

With user-exits the code , the developer has written will not be there for next version unless modification assistance tool is used.

Customer-exits(enhancements)

CUSTOMER EXITS are FUNCTIONS so they are called using CALL FUNCTION (or more exactly CALL CUSTOMER FUNCTION).

Inside a function (customer exit) you can only acces your import/export/changing/tables parameters.

Customer exits are more restrictive but you are sure any change you can make to any parameters will never lead to inconsistency

In customer-exit we have function-module exit , screen exit , menu exit.

Are available for MM,SD,FI,HR…..Basically designed for all modules.

No need of access key.

Customer-exits are not wiped during upgradation.

As I can't put it in the form of table. Just map the same point in both exits.

All the very best to you.

- Mohan

0 Kudos
201

MohanVamsi, I love the way you put that; thanks! That explains from a different angle and it drives the concept home. I was just surprised to realize that there was a difference. I am 100% self-taught so subtle concepts like this aren't automatically known. Unfortunately I'm self-taught and I am the only person that knows ABAP in this fortune 500 company.

Davis