This document is useful to those who are interested to improve their technical skills in addition to the functional skills.
This document is explaining the process of creating a module pool for the SAP CO Month End Process. The objective is to provide a simplified screen to the end user to complete the month end process. Normally this process will be done by an ABPER, but it can be done by a functional consultant with a little bit knowledge on coding which is very simple.
Note: The document is appears to be lengthy because of adding detailed screens for every step.
I have provided the detailed steps to complete the process. Before going into the details, end result of the screen to be developed is as follows:
We will start the process:
ABAP Development Screen:
For developing a module pool Program, PAI Module, Screen is required
We need to create a custom program there by PAI module and a Screen so that we will get the end result as mentioned above. It is possible to give our own Transaction code to get the output.
Transaction : SE80
First we will create custom program: Transaction Code: SE80:
Input the name of the program to be created,as an example I have given ZPAVAN03 as a program name, which is to be created.
Mention the description of the the program to be created in the Title tab and Save.
System prompt for a package...provide the package name later save the program.
After saving system prompt for a workbench request. Provide the details and save the request.
After saving the request the following screen will be displayed:
We have successfully completed the creation of a custom program.
We will look into the 2nd part: Creation of a PAI Module.
We need to add PAI Module for this the screen to be in change mode. We will go to change mode by clicking change button (or) Ctrl + F1
Screen changed from display mode to change mode.
Keep cursor on the Program ( ZPAVAN03) then create PAI Module:
Specify the name of the PAI Module.
The next screen we will be as follows to write a code:
Technical coding part will come into picture now, here we need to add our code.
Insert the code in between Module ‘ZPAVAN03 Input’ and ‘End Module’:
Code is :
CASE SY-UCOMM.
WHEN 'BTN_DC1'. CALL TRANSACTION 'KSV1'.
ENDDCASE. " ZPAVAN02 INPUT.
Explanation: The said code is fortab on the module pool.
BTN represents button.
Call Transaction Represents link to the T code KSV1
Same way we can insert more buttons like:
WHEN 'BTN_DC2'. CALL TRANSACTION 'KSV2'..
WHEN 'BTN_DC3'. CALL TRANSACTION 'KSV3'.
After completing the code we need to mention End case.
I am mentioning the complete code for the module pool in the following screen:
After completing the code click on save button. PAI Modules will be added to your program.
We have successfully completed the 2nd phase.
Now we are into the 3rd Phase, need to design a custom screen :
System will prompt for a screen number:
Click on continue and provide the screen details.
Click on Flow logic tab to remove a * before MODULE USER_COMMAND_9010.
After removing the * before MODULE USER_COMMAND_9010. It will go to color in blue.
That means our module is in active
We need to activate the program after saving.
After activation click on screen then click on layout to design a screen:
Layout: While processing the layout we will get following screen the layout will be displayed.
Click on save then activate. We have created one Tab same process is applicable to add more tabs on our custom screen.
We have successfully completed the 3rd phase.
We are into the final stage:
Creating a custom transaction code for our module pool.
I have given transaction code as ZPAVANCOME and given sort description then save.
We have successfully completed all the process which is required to create a module pool.
We will execute the module pool with our own T code:
End Result:
Module Pool for CO Month End Process is Ready to use.....................Thank you