Sunteți pe pagina 1din 9

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

(http://w
ww.sap.c
Products
om/) (https://www.sap.com/products.html)

Industries (https://www.sap.com/industries.html)
Support Support (https://www.sap.com/support.html)

Training (https://www.sap.com/training-certi cation.html)

Community (https://www.sap.com/community.html)

Developer Partner
(https://www.sap.com/developer.html) Partner (https://www.sap.com/partner.html)

About (https://www.sap.com/corporate/en.html)

(https://sharedui.services.sap.com/v2/protected.html?ref=https://archive.sap.com/)
Home (https://www.sap.com) / Community (https://www.sap.com/community.html) / Archives (/) / Discussions + Actions
Archive (/discussions) / ABAP Switching, Enhancing, and Adapting Standard Programs
(/discussions/space/abap/switching-enhancing-and-adapting-standard-programs)

Archived discussions are read-only. Learn more about SAP Q&A


(https://go.sap.com/community/about/questions-and-answers.html)

Dierence between an exit


(smod/cmod) and a user exit
This question is answered

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

https://archive.sap.com/discussions/thread/684598 1/9
8/9/2017 Difference between an exit (smod/cmod) and a user exit

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

(https://people.sap.com/aaron.shover2)

Lundi Vox (https://people.sap.com/aaron.shover2)


December 28, 2007 at 04:46 AM
0 Likes

Correct Answer

(https://people.sap.com/mohanvamsi.krishna)

MohanVamsi Krishna (https://people.sap.com/mohanvamsi.krishna) replied December 28, 2007 at 04:40 AM

You question is all about the


https://archive.sap.com/discussions/thread/684598 difference between USER EXIT and CUSTOMER EXIT. 2/9
8/9/2017 Difference between an exit (smod/cmod) and a user exit

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 doesnt 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
View this answer in context (/discussions/message/4644007#4644007)

u were looking for? View more on this topic (https://go.sap.com/community/tag.html?


34339306322581424656448659) or

(https://answers.sap.com/questions/ask.html?primaryTagId=338571334339306322581424656448659)

https://archive.sap.com/discussions/thread/684598 3/9
8/9/2017 Difference between an exit (smod/cmod) and a user exit

6 replies

(https://people.sap.com/srinivas.r2)
Srinivas R (https://people.sap.com/srinivas.r2)replied

December 27, 2007 at 22:50 PM


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

https://archive.sap.com/discussions/thread/684598 4/9
8/9/2017 Difference between an exit (smod/cmod) and a user exit

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
likes
(https://people.sap.com/aaron.shover2)
Lundi Vox (https://people.sap.com/aaron.shover2)replied

December 27, 2007 at 22:58 PM


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
likes
https://archive.sap.com/discussions/thread/684598 5/9
8/9/2017 Difference between an exit (smod/cmod) and a user exit

(https://people.sap.com/srinivas.r2)
Srinivas R (https://people.sap.com/srinivas.r2)replied

December 27, 2007 at 23:43 PM


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
likes
(https://people.sap.com/aaron.shover2)
Lundi Vox (https://people.sap.com/aaron.shover2)replied

December 28, 2007 at 03:00 AM


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.

0
likes
https://archive.sap.com/discussions/thread/684598 6/9
8/9/2017 Difference between an exit (smod/cmod) and a user exit

Correct Answer

(https://people.sap.com/mohanvamsi.krishna)

MohanVamsi Krishna (https://people.sap.com/mohanvamsi.krishna)replied

December 28, 2007 at 04:40 AM


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 doesnt 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.

https://archive.sap.com/discussions/thread/684598 7/9
8/9/2017 Difference between an exit (smod/cmod) and a user exit

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
likes
(https://people.sap.com/aaron.shover2)
Lundi Vox (https://people.sap.com/aaron.shover2)replied

December 28, 2007 at 04:46 AM


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

0
likes
Share & Follow
(https://www.facebook.com/sapcommunity) (https://twitter.com/SAPCommunity)
(https://www.youtube.com/c/SAPCommunities) (https://www.linkedin.com/company/sap)
(https://plus.google.com/+SAPCommunities) (https://instagram.com/sap/) (http://www.slideshare.net/SAP)

Privacy (http://go.sap.com/about/legal/privacy.html) Terms of Use (http://go.sap.com/corporate/en/legal/terms-of-use.html)


Legal Disclosure (http://go.sap.com/about/legal/impressum.html) Copyright (http://go.sap.com/about/legal/copyright.html)
Trademark (http://go.sap.com/about/legal/trademark.html) Sitemap (http://www.sap.com/sitemap/index.html) Newsletter
(https://go.sap.com/registration/newsletter.html)

https://archive.sap.com/discussions/thread/684598 8/9
8/9/2017 Difference between an exit (smod/cmod) and a user exit

https://archive.sap.com/discussions/thread/684598 9/9

S-ar putea să vă placă și