Skip to Content

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:

/wp-content/uploads/2015/08/1_777639.png

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

/wp-content/uploads/2015/08/2_777640.png

First we will create custom program: Transaction Code: SE80:

/wp-content/uploads/2015/08/3_777659.png

/wp-content/uploads/2015/08/4_777660.png

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.

/wp-content/uploads/2015/08/5_777662.png

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.

/wp-content/uploads/2015/08/6_777663.png

After saving system prompt for a workbench request. Provide the details and save the request.

/wp-content/uploads/2015/08/7_777664.png

After saving the request the following screen will be displayed:

/wp-content/uploads/2015/08/8_777668.png

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

/wp-content/uploads/2015/08/9_777669.png

Screen changed from display mode to change mode.

Keep cursor on the Program ( ZPAVAN03) then create PAI Module:

/wp-content/uploads/2015/08/10_777670.png

Specify the name of the PAI Module.

/wp-content/uploads/2015/08/11_777671.png

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.

/wp-content/uploads/2015/08/12_777672.png

/wp-content/uploads/2015/08/13_777673.png

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 for/wp-content/uploads/2015/08/14_777677.pngtab 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:

/wp-content/uploads/2015/08/15_777678.png

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 :

/wp-content/uploads/2015/08/17_777679.png

System will prompt for a screen number:

/wp-content/uploads/2015/08/18_777680.png

Click on continue and provide the screen details.

/wp-content/uploads/2015/08/19_777681.png

Click on Flow logic tab to remove a * before MODULE USER_COMMAND_9010.

/wp-content/uploads/2015/08/20_777682.png

After removing the * before  MODULE USER_COMMAND_9010. It will go to color in blue.

/wp-content/uploads/2015/08/21_777683.png

That means our module is in active


We need to activate the program after saving.


/wp-content/uploads/2015/08/22_777684.png


After activation click on screen then click on layout to design a screen:


/wp-content/uploads/2015/08/23_777685.png


Layout:  While processing the layout we will get following screen the layout will be displayed.

/wp-content/uploads/2015/08/24_777686.png

/wp-content/uploads/2015/08/25_777687.png

/wp-content/uploads/2015/08/26_777688.png

/wp-content/uploads/2015/08/27_777689.png

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.

/wp-content/uploads/2015/08/28_777690.png

/wp-content/uploads/2015/08/29_777691.png

I have given transaction code as ZPAVANCOME and given sort description then save.

/wp-content/uploads/2015/08/31_777692.png

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:

/wp-content/uploads/2015/08/32_777693.png

End Result:

/wp-content/uploads/2015/08/0_777694.png

Module Pool for CO Month End Process is Ready to use…………………Thank you

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply