Application Development and Automation 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: 
Read only

SMOD and CMOD

Former Member
0 Likes
1,059

Hi Experts,

In Userexits we can do implementation i.e coding can be done in both smod and cmod or only in cmod?and where to deactivate the project which we declared in cmod?

6 REPLIES 6
Read only

Former Member
0 Likes
934

You do coding in the CMOD and it can be activated using the same transaction.

Regards,

Atish

Read only

Former Member
0 Likes
934

hi,

coding is done only in cmod smod is only used for searching

deactivation icon is present in -


go for cmod transcation -


2 icon is deactivation project

Read only

Former Member
0 Likes
934

Hi

SMOD: we can find the enhancement for a our required transaction.

CMOD:Used for Creted the Custom project and added the our own code in Zinclude provided by SAP.

The detail about userexits is as follows:

Userexit is a methodology using which we can add our custom code in the SAP Standard transaction without disturbing the SAP Standard code. SAP will provide enhancement for one transaction. We can have more then one enhancement. Enhancement is a container with a set of userexits. SAP will provide only definition of the exit. Which does not contain any standard code. In the relevant transaction program SAP will their exit as a standard. The Userexit needs to be implemented inorder to provide a custom logic to serve business requirement.

SMOD: It is used to find the enhancement related to different applications.

CMOD: It is used to implement the userexit.

There are 4 types of exits available:

1) Function-module Exits,

2) Menu exits,

3) Screen exits and

4) Field exits.

1) Functionmodule exits:

These exits are used to provide additional functionality to SAP standard transaction. By default SAP is not provided this functionality.

For Example my requirement is, when user create or change customer and the customer belongs to US Country the Industry sector (brsch) field is not empty.

Step1: Find the enhancement. For that one goes to SMOD.

Click on F4 on Enhancement. We Search for enhancement. In this case we can found the enhancement by giving the Description: mast. We got the enhancement as

SAPMF02D: User exits: Customer master data.

(Or)

We find the enhancement at transaction level,

Go to XD01 transaction click on System/Status/double click on Program name

In this program we search for “CALL customer-function’. We get the all related exits the starts with EXIT_enhancementname_Threedigitnumber. Sometimes it Will not an enhancement name.

Step2: Go to CMOD create the custom project.

Click on Enhancement assignments button

Give the Enhancement name: SAPMF02D

Step 3: Click on Components button. Under that we found the one function module:

EXIT_ SAPMF02D_001. Double Click on that function module. In the Source code tab of this function module SAP provide the one Zinclude. SAP doesn’t know our requirement. In this Zinclude we provide our own custom logic to make of the parameters provided in import, export and tables section.

We write the following code:

IF i_kna1-land1 = 'US' AND

i_kna1-brsch = ' ‘.

MESSAGE e001 (f2) WITH ‘ Industry sector should not be blank for US Customers’.

ENDIF.

Step4: SAVE, CHECH and ACTIVATE the Cutsom project.

Step5: Now go to XD01 Transaction We perform our requirement. After we don’t want that requirement go to CMOD and deactivated the custom project.

If it is helpful rewards points

Regards

Pratap.M

Read only

Former Member
0 Likes
934

Hi

coding can be done inCMOD only.

SMOD is used to fine the user exit.

In cmod there is a icon called DEACTIVATE PROJECT if u write the project name there and click on deactivate ..the project will be deactivated.

Read only

Former Member
0 Likes
934

Hi, this may help you.

To find a Exit.

Goto Transaction -- Find The Package

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

Implementing the Exit-- CMOD Create ProjectsAssgn your Component .

Reward If Helpful.

Regards Madhu.

Read only

Former Member
0 Likes
934

Hi

SAP application programmers create SAP enhancements in transaction SMOD using function module exits, menu exits, and screen exits.

Customers are given a catalog containing an overview of existing SAP enhancements. They can then combine the SAP enhancements they want into an enhancement project using transaction CMOD.

SAP enhancements are made up of component parts. These components include function module exits, menu exits, and screen exits. A specific component may be used only once in a single SAP enhancement (this guarantees the uniqueness of SAP enhancements).

Customer enhancement projects consist of SAP enhancements. Each individual SAP enhancement may be used only once in a single customer enhancement program (this guarantees the uniqueness of a customer project).

SAP application programmers preplan function module exits, menu exits, and screen exits for their applications and combine them to create useful enhancements for the R/3 System.

Customers create their own enhancement projects for their systems using SAP enhancements. You can customize the individual components of an enhancement project by creating your own include programs (for function module exits), texts (for menu exits), and subscreens (for screen exits).