Discover how to enhance the standard report Wage Type Reporter (transaction code PC00_M99_CWTR) using implicit enhancement options. Learn how to add custom selection screen objects on the standard selection screen. Get experience adding your own custom program lines in standard code of Generate Subroutine Pool for calling your custom SAP List Viewer (ALV). Learn how to handle a dynamic internal table. See how to add a custom field in a standard report without making any modification or copying the standard report.
Key Concept
Enhancement options allow you to add your own functionality to SAP standard programs without modifying the original code. They resemble plug-ins that you can add or remove any time as per your requirement and your functionality remains the same even after an upgrade from SAP.
The standard output of the Wage Type Reporter transaction code PC00_M99_CWTR displays the wage type vertically. If you select 10 wage types, the system displays 10 lines for each employee. Other information of the employee such as employee number or employee name repeats 10 times with each wage type as shown in Figure 1. Sometimes getting the required result from this output is difficult. For example, you might want to get the sum of three wage types (/101, /110, and /560) for all employees. In this case you may have to run this report three times, or you have to transfer to Excel for calculations. If you have thousands of employees, scrolling through them is hard.

Figure 1
Vertical display of Wage Type Reporter before enhancement
In this article I will explain the way to change the display of this report from vertical to horizontal. In the output you see only one row for one employee, and the wage type is shown as a column. Therefore, if you select three wage types, the system adds three columns. I will also show you how to add required custom columns without modifying or copying a standard report.
You need to follow five simple steps:
- Step 1. Add a check box and labels on the standard selection screen
- Step 2. Create a program for the arrangement of data and to show the custom SAP List Viewer (ALV)
- Step 3. Insert the code of the ALV program in the standard code and generate a subroutine pool
- Step 4. Call a custom ALV instead of the standard one
- Step 5. Add a custom field to ALV
The standard selection screen for transaction code PC00_M99_CWTR is shown in Figure 2. Let’s start by adding a check box and labels on this screen.

Figure 2
The standard selection screen of Wage Type Reporter
Step 1. Add Check Box and Labels on Standard Selection Screen
This step involves two substeps:
- Add a check box on the standard selection screen
- Add labels for the check box
Add a Check Box on the Standard Selection Screen
Open include H99CWTR0_SCR_DEF in transaction code SE38 or SE80. Click the enhance icon or press Shift-F4 (Figure 3). From the pop-up menu, double-click H99CWTR0 (Figure 4).

Figure 3
Click the enhance icon for include H99CWTR0_SCR_DEF

Figure 4
Select H99CWTR0
Now you can see the include in enhancement mode as the left side of code turns to white (Figure 5).

Figure 5
The include in enhancement mode
Follow menu path Edit > Enhancement Operations > Show Implicit Enhancement Options.
At the end of the include, you see the implicit enhancement point (Figure 6).

Figure 6
The implicit enhancement point at the end of the include
Right-click the enhancement point line and select Enhancement Operations > Create Implementation from the context menu. Enter the Enhancement Implementation name and Short Text (Figure 7). Click the enter icon to add this object to the transport request.

Figure 7
Enter Enhancement Implementation name and Short Text
Add the code in Figure 8 inside the enhancement and activate it (Figure 9).

Figure 8
Code for enhancement Z_PC00_M99_CWTR_01

Figure 9
Add code inside the enhancement and activate
Add Labels for Check Box
Repeat the prior steps for showing implicit enhancement options, but this time do it for include H99CWTR0_FORMS. In this include find the form initialise and you can see the enhancement point at the end of this form (Figure 10).

Figure 10
Enhancement point in the initialise form
Create the implementation of this enhancement point as previously described and click the Code button in the pop-up box (Figure 11). In the next screen, click the new icon (Figure 12).

Figure 11
Select Code button

Figure 12
Click the new icon
Enter the Enhancement Implementation name and Short Text as shown in Figure 13. Click the enter icon to add this object to the transport request.

Figure 13
Enter Enhancement Implementation name and Short Text
Select the newly created Z_PC00_M99_CWTR_02 enhancement implementation and click the enter icon (Figure 14).

Figure 14
Select Z_PC00_M99_CWTR_02
Add the code in Figure 15 in the enhancement and activate the enhancement (Figure 16).

Figure 15
Code to add to the enhancement

Figure 16
Add code inside enhancement and activate
After you run transaction code PC00_M99_CWTR again, you can see a new check box added on the standard selection screen (Figure 17).

Figure 17
A new check box added on the standard selection screen
Step 2. Create a Program for the Arrangement of Data and Showing Custom ALV
Create a program ZFSL_Z_PC00_M99_CWTR_03 using transaction code SE38 or SE80. Copy and paste the code shown in Figure 18 and activate the program (Figure 19). In the ABAP editor the line of code INCLUDE h99cwtr0_alv_template should be at line 10. Do not move any line up or down.

Figure 18
Code for program ZFSL_Z_PC00_M99_CWTR_03

Figure 19
The ABAP Editor for program ZFSL_Z_PC00_M99_CWTR_03
Step 3. Insert the Code of the ALV Program in the Standard Code and Generate a Subroutine Pool
Repeat the steps to show implicit enhancement options in include H99CWTR0_FORMS. In this include, find form build_driver. You see the enhancement point at the start of this form (Figure 20).

Figure 20
The enhancement point at the start of form build_driver
Create another implementation at an enhancement point as described earlier and enter the Enhancement Implementation name and Short Text (Figure 21). Add this object to the transport request.

Figure 21
Enter the Enhancement Implementation name and Short Text
Select the newly created Z_PC00_M99_CWTR_03 enhancement implementation and click the enter icon (Figure 22).

Figure 22
Select Z_PC00_M99_CWTR_03
Add the code shown in Figure 23 in the enhancement (Figure 24) and activate it.

Figure 23
Code for enhancement Z_PC00_M99_CWTR_03

Figure 24
Code in enhancement Z_PC00_M99_CWTR_03
Call a Custom ALV Instead of a Standard One
This step involves two substeps:
- Create the SET/GET Parameter ID
- Call the custom ALV
Create SET/GET Parameter ID
In transaction code SE80, right-click your package name (e.g., ZFSL) and select the SET/GET Parameter ID (i.e., an object to save a value in SAP memory) from the context menu by following Create > Other (1) > SET/GET Parameter ID.
Enter the Parameter ID and Short Description as shown in Figure 25. Click the Save button to add this object to the same transport request.

Figure 25
Enter the Parameter ID and Short Description
Step 4. Call a Custom ALV Instead of the Standard One
Repeat the steps for showing implicit enhancement options in Include H99CWTR0_FORMS. In this include find the form end_of_selection. You see the enhancement point at the start of this form (Figure 26).

Figure 26
The enhancement point at the start of form end_of_selection
Repeat the steps for creating an implementation at an enhancement point and enter the Enhancement Implementation name and Short Text (Figure 27). Add this object to the transport request.

Figure 27
Enhancement point at start of form end_of_selection
Select the newly created Z_PC00_M99_CWTR_04 enhancement implementation and click the enter icon (Figure 28).

Figure 28
Select Z_PC00_M99_CWTR_04
Add the code shown in Figure 29 in the enhancement (Figure 30) and activate it.

Figure 29
Code for enhancement Z_PC00_M99_CWTR_04

Figure 30
Code inside enhancement Z_PC00_M99_CWTR_04
Now you are ready to test in the report. Run transaction code PC00_M99_CWTR and don’t forget to check the newly added check box (Column Wise Wage Types) on the standard screen as shown in Figure 17. This time you can see the output in which all the wage types are in columns and you have one entry for one employee (Figure 31).

Figure 31
Output of the report after the implementation of enhancements
Step 5. Add a Custom Field to ALV
Insert the code at specified places as shown from Figures 32 to 34 in the code of the program ZFSL_Z_PC00_M99_CWTR_03 in Figure 18. After activating the program, you are ready to test. You can see the custom field has been added in Figure 35.

Figure 32
Code for declaration

Figure 33
Code to add the field catalog for creating a dynamic internal table

Figure 34
Get the value for the custom field from the database

Figure 35
Output after adding the custom field to ALV
Faisal Altaf
Faisal Altaf is a certified development consultant. He has more than seven years of experience and currently is working with Al Yamamah Steel Industries Co., Saudi Arabia, as the SAP technical division head. He completed his MS in software engineering and intends to complete his Ph.D. in the field of SAP.
You may contact the author at faisalatsap@gmail.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.