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: 

smod

Former Member
0 Kudos
1,057

could u plz tell me we can create a project in cmod.then what is the function of smod?

7 REPLIES 7

Former Member
0 Kudos
364

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.

Thanks...

Former Member
0 Kudos
364

Hi,

In SMOD you will find all the standard user exit which can be enhanced, and using CMOD you will enhance the standard user exit provided by SAP for a particular TCode.

Thanks,

Sriram Ponna.

Former Member
0 Kudos
364

Hi,

SMOD -> Where you can see the SAP Exits.If you want to change any SAP Exits then you need the access key for that object.

CMOD -> Where you can see or write the Customer Exits.

Check the following links,

http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7ceb940e11d295df0000e82de14a/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/content.htm

Cheers,

Vasanth

Former Member
0 Kudos
364

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
364

Hi,

Hi,

SMOD-SAP Enhancement Management

CMOD-Enhancements

Basically you use this transaction to cary out enhancement for a particular trnsaction if the functionality is not met by SAP.

SAP will give list of user exits where the functionality can be enhanced.

I am enclsoing a code , in which the input parameter is the transaction code , if you enter transcation code then you will get the list of user exits for that transaction which can be enhanced.

If information found useful please reward sutiable points.

Regards,

Irfan Hussain

*****************************

REPORT Z_USEREXIT .

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.

regards,

vasavi.

kindly reward if helpful.

Former Member
0 Kudos
364

Hi,

CMOD -> Name the project ( zprj9303) -> Click on Create -> Enter Short Text (any) -> Save the Project Under a package -> Click on Enhancment Assignments pushbutton from application toolbar -> Name the Enhancements to be customized ( BG000001 ) -> Click on Components From Application toolbar -> Opens the List of Function which are assigned to The user exit -> Double Click on Function Module name -> Opens SE37 editor with Function Module Code , internally Generated with an include file starting with "Z". As Z programs can be customized in by the ABAPer , double click on program name -> opens the Source code of the program , make the changes according the company Requirements -> save -> activate -> come back.

z programs or y progarms in sap are called as "zee" programs in industries.

For the customer defined programs we need to use the name "z" for transportable objects.

"y" for Local objects.

As the program developed in Developement Environment are transported to Production systems using the Request number which are assigned to the objects.

BADI's are advanced concepts of User Exits. user exits are used to Customize the Existing Program with help of Exit names using CMOD.

SE18 AND SE19 ARE the tcodes for BADI creation and Implementations.

regards,

vasavi.

kindly reward if helpful.

Former Member
0 Kudos
364

Hi

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

If you used transaction SMOD to migrate customer exits, the enhancement projects of the customer that belong to the customer exits must be migrated to implementations of business add-ins, in order to preserve the functionality of the enhancement. After the upgrade, start migration in transaction SPAU via a button.