SMOD and CMODs:
As you know either in ECC or BW systems there are SMOD and CMODs separately.
In the beginning of the code implementation we go to SMOD and search for the required enhancements like as shown below of which we have to which Enhancement matches our requirement. And our requirement might be to enhance a “datasource” (in BW side or in ECC side) or usual “BEx Variable” or special “Virtual characteristics & Keyfigures”, these are only the popular ones that we generally used (which are also highlighted in bold color)
RFBVX001 Enhancement for bank directory transfer (Austria)
RFFOX001 Frame for user exit RFFOX001 (in program RFFOD__L)
RFFOX002 Frame for user exit RFFOX002 (in program RFFOD__U)
RHALE001 HR-CA: Enhancement for ALE functionality in HR
RHGB0001 Function Group RHGB Customer-specific field (list)
RHGP0001 FuGr RHGP Customer-Specific Field (List)
RHIV0001 OrgManagement: Customer-specific number assignment
RMCSTEXT LIS: Determine Characteristic Texts in Standard Analyse
RSAP0001 Customer function calls in the service API
RSR00001 BI: Enhancements for Global Variables in Reporting
RSR00002 BI: Virtual Characteristics and Key Figures in Reportin
RSR00003 BW: Moving characteristic values
RTR00010 Exit in report tree (display transactions)
RTR00020 Exit in node in report tree (change mode)
In the below discussion we will be discussing on one of the popular enhancements i.e., RSAP0001 which is a std enhancement used for enhancing DATASOURCES (either in ECC or BW). Firstly we go T code SMOD and select our Enhancement i.e., RSAP0001
Below are the attributes of the enhancement RSAP0001
In the above screen when we double click on the Function module “EXIT_SAPLRSAP_001” (which is a Function module for enhancing Transaction datasources) the system will take you to the below screenAfter reaching the source code tab of the Transaction Data function module, we have to double click on the INCLUDE “ZXRSAU01” to write our ABAP logic. As we are writing the logic for the first time we will get the below shown error message (when we double click on the include ZXRSAU01)After getting the above information it is evident that we are writing the ABAP code for the first time, so in order to write our ABAP logic we have to create (its kind of activating the include) this include eventhough its available in SMOD. In order to create the object we have just press the “ENTER” key in the source tab of the function module, then a pop up appears which is as shown below, where we select ‘YES’After clicking the ‘YES’ button, the system will take us into the area where enhancement are to be written. After that we write our ABAP code, save, check and activate the include (ZXRSAU01), activate our Function module ‘EXIT_SAPLRSAP_001’. After activating Function module, our necessity with respect to SMOD is complete.
Now we go to T code CMOD (in the same system), where in which we create a PROJECT, say ZTEST (as shown below)Save the project after giving the description as shown below.After saving the project and before assigning the enhancement (RSAP0001) to project (ZTEST) when we click on the components buttons the status will be as shown below
Below is the screen shot of the error message which appears when we click on the components button of the project in CMOD before assigning any enhancementNow when we click on the enhancement button as shown in the screen shot above the system will take us to the below screen which is as shown in the below screen shotAfter entering our enhancement in the required row we have to save the assignment. And back to the initial CMOD screen (just by typing the T code)After assigning the Enhancement (here RSAP001) to the project (here ZTEST), when we click on the ‘COMPONENTS’ button then we can see our function module, EXIT_SAPLRSAP_001 for T D along with our FM we can see other FMs as well because those are also the part of the enhancement but the thing is the include in those another 3 FMs is not active we have to just go into those FMs individually and activate the respective includes (FYI – every we activate the project ZTEST whenever there is a change)
FYI – CMOD is the way given by SAP to write our ABAP logic in the system, in other words, we are actually writing the code in SMOD but SAP has provided a way to execute the ABAP logic written by customer thru CMOD by creating a project and this project is linked to SMOD after activation
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++As discussed above (in the beginning) there are different enhancements for different purposes and below is the enhancement for BEx Variables.