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 customer exit & user exit

Former Member
0 Kudos

Hello Geeks!

hope things are moving good on your side. so guyz m having one doubt. normally people often use the terms "Customer Exit" and "User Exit" interchangeably. so what i want to know is are these two things same. what i know is customer exit can be maintained through trnx "SMOD" & "CMOD". if u will look at any program, and search the phrase " call customer function", then u will get the customer exit. but what is the way to find available user exit for any particular application. and most important of all i would like to know difference between "Customer Exit" and "User Exit". any answers or any links for my query will be appreciated.

waiting 4 u replies

manas

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi manas,

1. Good question !

2. Previously there were only user-exits.

3. Then came the concept of customer-exits.

4.

user exits were nothing but

subroutines

FORM/PERFORM

called from standard programs.

5. The FORM defintion was placed inside

an empty include file.

6. So It was called EVERYTIME.

and we need to MODIFY/REPAIR the

standard include .

7. Then it came with concept of customer-exit

8. It consists of calling a FUNCTION MODULE,

which is called only if

the user-exit is ACTIVATED (other wise not called)

In this case, the code in put inside

a pre-defined Z include.

*----


<b>9. Functionality of both is same, howerver

we can note the following important differences

a) Customer exit is called only if activated.

(hence, it does not waste resources)

b) in customer exit, REPAIR does not happen

to the standard include.</b>

regards,

amit m.

3 REPLIES 3

Former Member
0 Kudos

Manas,

There is no difference between Customer and User exit.

Here is a program that I found on the forums that can find you the user exits in a transaction.


*&---------------------------------------------------------------------*

*&  Enter the transaction code that you want to search through in order

*&  to find which Standard SAP User Exits exists.

*&

*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------*

*& Tables

*&---------------------------------------------------------------------*



TABLES : TSTC,     "SAP Transaction Codes

         TADIR,    "Directory of Repository Objects

         MODSAPT,  "SAP Enhancements - Short Texts

         MODACT,   "Modifications

         TRDIR,    "System table TRDIR

         TFDIR,    "Function Module

         ENLFDIR,  "Additional Attributes for Function Modules

         TSTCT.    "Transaction Code Texts



*&---------------------------------------------------------------------*

*& Variables

*&---------------------------------------------------------------------*



DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.

DATA : FIELD1(30).

DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.



*&---------------------------------------------------------------------*

*& Selection Screen Parameters

*&---------------------------------------------------------------------*

SELECTION-SCREEN BEGIN OF BLOCK A01 WITH FRAME TITLE TEXT-001.

SELECTION-SCREEN SKIP.

PARAMETERS : P_TCODE LIKE TSTC-TCODE OBLIGATORY.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN END OF BLOCK A01.



*&---------------------------------------------------------------------*

*& Start of main program

*&---------------------------------------------------------------------*



START-OF-SELECTION.



* Validate Transaction Code

  SELECT SINGLE * FROM TSTC

    WHERE TCODE EQ P_TCODE.



* Find Repository Objects for transaction code

  IF SY-SUBRC EQ 0.

    SELECT SINGLE * FROM TADIR

       WHERE PGMID    = 'R3TR'

         AND OBJECT   = 'PROG'

         AND OBJ_NAME = TSTC-PGMNA.



    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.



    IF SY-SUBRC NE 0.

      SELECT SINGLE * FROM TRDIR

         WHERE NAME = TSTC-PGMNA.



      IF TRDIR-SUBC EQ 'F'.



        SELECT SINGLE * FROM TFDIR

          WHERE PNAME = TSTC-PGMNA.



        SELECT SINGLE * FROM ENLFDIR

          WHERE FUNCNAME = TFDIR-FUNCNAME.



        SELECT SINGLE * FROM TADIR

          WHERE PGMID    = 'R3TR'

            AND OBJECT   = 'FUGR'

            AND OBJ_NAME = ENLFDIR-AREA.



        MOVE : TADIR-DEVCLASS TO V_DEVCLASS.

      ENDIF.

    ENDIF.



* Find SAP Modifactions

    SELECT * FROM TADIR

      INTO TABLE JTAB

      WHERE PGMID    = 'R3TR'

        AND OBJECT   = 'SMOD'

        AND DEVCLASS = V_DEVCLASS.



    SELECT SINGLE * FROM TSTCT

      WHERE SPRSL EQ SY-LANGU

        AND TCODE EQ P_TCODE.



    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.

    WRITE:/(19) 'Transaction Code - ',

    20(20) P_TCODE,

    45(50) TSTCT-TTEXT.

    SKIP.

    IF NOT JTAB[] IS INITIAL.

      WRITE:/(95) SY-ULINE.

      FORMAT COLOR COL_HEADING INTENSIFIED ON.

      WRITE:/1 SY-VLINE,

      2 'Exit Name',

      21 SY-VLINE ,

      22 'Description',

      95 SY-VLINE.

      WRITE:/(95) SY-ULINE.



      LOOP AT JTAB.

        SELECT SINGLE * FROM MODSAPT

        WHERE SPRSL = SY-LANGU AND

        NAME = JTAB-OBJ_NAME.

        FORMAT COLOR COL_NORMAL INTENSIFIED OFF.

        WRITE:/1 SY-VLINE,

        2 JTAB-OBJ_NAME HOTSPOT ON,

        21 SY-VLINE ,

        22 MODSAPT-MODTEXT,

        95 SY-VLINE.

      ENDLOOP.



      WRITE:/(95) SY-ULINE.

      DESCRIBE TABLE JTAB.

      SKIP.

      FORMAT COLOR COL_TOTAL INTENSIFIED ON.

      WRITE:/ 'No of Exits:' , SY-TFILL.

    ELSE.

      FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.

      WRITE:/(95) 'No User Exit exists'.

    ENDIF.

  ELSE.

    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.

    WRITE:/(95) 'Transaction Code Does Not Exist'.

  ENDIF.



* Take the user to SMOD for the Exit that was selected.

AT LINE-SELECTION.

  GET CURSOR FIELD FIELD1.

  CHECK FIELD1(4) EQ 'JTAB'.

  SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).

  CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

regards,

Ravi

Note : Please mark the helpful answers

Former Member
0 Kudos

Hi manas,

1. Good question !

2. Previously there were only user-exits.

3. Then came the concept of customer-exits.

4.

user exits were nothing but

subroutines

FORM/PERFORM

called from standard programs.

5. The FORM defintion was placed inside

an empty include file.

6. So It was called EVERYTIME.

and we need to MODIFY/REPAIR the

standard include .

7. Then it came with concept of customer-exit

8. It consists of calling a FUNCTION MODULE,

which is called only if

the user-exit is ACTIVATED (other wise not called)

In this case, the code in put inside

a pre-defined Z include.

*----


<b>9. Functionality of both is same, howerver

we can note the following important differences

a) Customer exit is called only if activated.

(hence, it does not waste resources)

b) in customer exit, REPAIR does not happen

to the standard include.</b>

regards,

amit m.

0 Kudos

"The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks."

Customer exits are implemented in Z-includes and are ENHANCEMENTS to the system.

User-exits were firstly intended to be developed for the SD module. You make your coding in includes in SAP namespace (e.g MV*). That's why, user exits are MODIFICATIONS to the system. In includes for user exits there are empty subroutines ( generally with the name convention "userexit_...") and you code using global variables of the main program.

But, generally developers use these terms without this distinction. So, someone may mean a "customer exit" when (s)he says "user exit" or vice-versa.