cancel
Showing results for 
Search instead for 
Did you mean: 

USER-EXITS

Former Member
0 Kudos

hi experts,

m very much new to user-exits..plz tell how one can find user exits..what is cmod and smod...with some examples

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

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"

Regards,

Renjith Michael.

Former Member
0 Kudos

Hi,

Just execute the following program and enter ur module name then execute u will get all related user exit names.

reward me a points if it is use full ansewer

&----


*& Report ZFIND_USER_EXIT *

*& *

&----


*& *

*& *

&----


Report ZTEST_UEXIT.

  • Enter the transaction code in which you are looking for the user-exit

  • and it will list you the list of user-exits in the transaction code.

  • Also a drill down is possible which will help you to branch to SMOD.

*

TABLES : TSTC, TADIR, MODSAPT, MODACT, TRDIR, TFDIR, ENLFDIR.

TABLES : TSTCT.

DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.

DATA : FIELD1(30).

DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.

PARAMETERS : P_TCODE LIKE TSTC-TCODE OBLIGATORY.

SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.

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 EQ ENLFDIR-AREA.

MOVE : TADIR-DEVCLASS TO V_DEVCLASS.

ENDIF.

ENDIF.

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.

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.

*---End of Program

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,

check the foll link,

http://abapcode.blogspot.com/search/label/User%20Exit

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

Reward points if useful

Regards.

Former Member
0 Kudos