SAP ABAP - Implementing Or Activate Customer Exits / Function Module Exits.


CMOD & SMOD are two transactions in SAP to manage exits.


SMOD simply displays the enhancements present in the SAP System. This transaction is used to see the list of objects in an enhancement. It is a container which holds many related objects within it.


CMOD is the project management of SAP enhancements (i.e. SMOD Enhancements). SMOD contains the actual enhancements while CMOD actually is the grouping of the SMOD enhancements.


Transactions CMOD n SMOD are 2 parts of the enhancement. Using SMOD you can search for enhancement and their respective component.


An enhancement includes one or more components (function exits, menu enhancements and screen enhancements).


CMOD transaction code is used to create a project. Project is also a container, which holds several Enhancements. In case we know the user exit, and we have done the necessary changes as per the requirement then it won’t work unless and until a project is assigned to the exit. Hence it’s important to assign the enhancement to a project via CMOD to make the user exit start working. In Short a user exit with changes is unless, until it is assigned to a project.


Say in case I have a function module exit name with me and I need to find the enhancement name, I can use the program Z_WHERE_USED_EXIT_SMOD_CMOD to find the name of the enhancement.


For example,



On executing the program,

OUTPUT:



This program will be useful in the case as discussed below:


1) Say there is some requirement while creating/changing a PO via ME21N, ME22N. On Debugging you found out that if you make changes to function module exit ‘EXIT_SAPMM06E_009’, the issue can be resolved.


2)When you double click on the zinclude in that particular function module exit, you get a warning message as shown




3) This message means that this function module exit has not been implemented yet. Hence you need to first implement it so that you can make the necessary changes in the zinclude of the function module exit.


4) So first check if a project already exists for the function module exit. If No, then create a new project via “CMOD” transaction. If yes, then check the components in that particular project in CMOD. If it’s implemented, then you can directly access the z include. But if the exit is not implemented, then you will have to create it. As shown below.

In this case, ZTEST project is already created which has this enhancement. It can be clearly seen the function module exit has not been implemented. It has been assigned but not implemented.



5) To implement the exit, follow the following steps: Go to SE37. Enter the function module exit name 'EXIT_SAPMM06E_009' and press display. Double Click On the z include. You will be shown a warning message. Now press enter you will get a pop up window asking to create a object as shown



6) Click on Yes, enter the package details and proceed. Make your changes and activate the z include.



7) Now go back again to CMOD and check the components of the project. Now you can see the function module exit has been implemented.




8) The green light indicates that the components are in active state. If it ‘Red Light’, it means it’s in inactive state.

You can add multiple Enhancements in one project. But you can't add one enhancement in multiple projects.



Note: Two important tables for finding the link between Project, Enhancements and Function Module Exits are MODSAP, MODACT.



TO ACCESS THE PROGRAM OR DOWNLOAD THE PROGRAM: 

Click Here (z_test_where_used_exit_smod_cmod).



RELATED POSTS:


- USER EXITS - Introduction, Importance & How To Find Them.

- Difference Between BADI & ENHANCEMENTS?

- Customer Exits - Introduction, Importance & It's Types.

- Difference between User Exits & Customer Exits?

- Function Module Exits (Customer Exits) - Introduction & How To Find Them.


- Finding Customer Exits - CALL CUSTOMER-FUNCTION Keyword.

- Finding Customer Exits Via SMOD Transaction.

- Finding Customer Exits Via SE81 SAP Transaction.

- Difference Between CMOD & SMOD SAP Transaction Codes?

- Implementing Customer Exits / Function Module Exits - With Example.


- Finding Project Name & Enhancement Name Of Function Module Exit & Vice-Versa - Sample Porgram With Example.

- Sample Program On Implementing Customer Exit - Step-By-Step.



Your suggestions and comments are welcome in this section.

Please mail all your contributions to administrator@abapmadeeasy.com We request you to mention your Name, Designation, Experience & Organization you are working for. Your posts will be verified and posted in this site with your name.

No comments:

Post a Comment