Review the technical specifications for a custom-developed tool that caters to the requirement to synchronize the organization structure and the budget structure for organizations using SAP Enterprise Compensation Management budgeting for their compensation management. Learn:
How to create the program to address the create, movement, and delimit scenarios
The high-level design as well as pseudo code of the program
The function modules, classes, tables, relationship codes, and messages to be used
Key Concept
A budget structure consists of a budget unit with a budget type, which defines a structure, such as a company or department. Employees are sometimes compensated above their normal remuneration as a reward for achievements or as motivation. This compensation is administered by defining the budget unit. Budgeting provides the control mechanism for compensation administration within SAP Enterprise Compensation Management.
An organization structure is always changing. In the SAP Enterprise Compensation Management (ECM) system, which uses the Manager Self-Service (MSS) interface and allows you to develop and monitor detailed budgets based on organizational hierarchy data, there is an organization structure as well as a budget structure. The budget structure is generated from the organizational structure for a period and carries budget information. Once the budget structure is generated, it cannot be changed. A new budget structure can be generated, but changes are not possible. The budget structure is a mirror of the organizational structure at the time of generation with different budget types and periods and consists of budget units.
There can be disruptions in the environment caused by various factors in any organization that affect the organizational structure, resulting in changes to or creation of new hierarchies: changes in the organizational structure, adding a new department, movement of an employee or manager within the organizational structure, and so on. However, the budget structure is not affected by this change.
In the standard SAP system, there is no way to synchronize the organizational structure and budget structure. Moreover, HR administrators and users have noticed that this affects reporting in areas such as compensation planning, reviews, and manager-employee interaction. I’ll show you how to create an ABAP-based tool that works only with ECM systems and is for the salary review process. It can solve situations such as the following: The salary review process is set up for a year starting from January to December. The budget structure is generated based on the organizational structure in January 2012. The budget is then allocated to each department and the managers. Sometime in 2012, the organizational structure changed – say a new department was created. The budget amount should update accordingly.
In this article, I show you the technical specifications for how to develop your own solution and sync the organizational structure and the budget structure. Developers can benefit most from this article, but functional users can also take away the knowledge and use the same pseudo code for developing the tool. As a prerequisite, SAP ECM must be implemented along with an SAP Note that I’ll explain later.
Objective of the Tool: Concept and Approach
Following are some scenarios that might require you to synchronize the organizational structure and the budget structure for the past date and current date, which is covered as part of the tool I have developed.
- Newly created organization: The tool identifies a newly created organization within the review item (a period- and compensation-specific kind of key) and budget type. It also creates a budget unit and assigns the employee’s salary if the employee exists.
- Organization movement: The synchronization tool identifies organization movement within the budget type and recalculates the budget amount and spent amount according to employee assignment.
- Delimit organization: The tool identifies organizations that might be closed within the review period and any employees that might be moved to a different department, and recalculates the budget amount for the assigned employee.
- Remove inconsistency: The tool addresses and resolves data inconsistencies.
- Recalculate budget: The tool can help you achieve bottom-up budget recalculation.
- Employee movement. This is the same concept as organization movement, but applied to employees.
Table 1 shows the elements of the selection screen;
Figure 1 shows the selection screen of the developed transaction.
Table 1
Selection screen
Figure 1
Selection screen of the tool
Scenario Identification
The flow chart in
Figure 2 explains how you identify which scenario to use out of the options Create, Movement, or Delimit. For the Create and Delimit scenarios, the tool selects organizational units from infotype table HRP1000. For Movement scenario, the tool selects the organization unit from infotype table HRP1001 (
Table 2).
Figure 2
Data flow to identify the correct scenario
Table 2
Used relationship code (reference: database table HRP1001)
Table 3 shows some standard SAP symbols that reflect relationships in this article.
Table 3
Symbols
High-Level Design
Following are the high-level steps of how the program determines the creation process:
- Get all newly created organization units from infotype table HRP1000 for a specified period provided on the selection screen. I’ll use the selection screen parameter later to identify the correct ECM data from infotypes 1500 and 1520.
- Get the parent organization unit of the organization unit from infotype table HRP1001 (O->O relationship code A002).
- Link the budget unit to the parent organization unit (selected in step 2) and organization unit (selected in step 1) from infotype table HRP1001 (O->BU relationship code A300).
- Check the validity from infotype table HRP1500 for the budget unit (selected in step 3) and budget type (from the selection screen). Review the entered parameters and make sure they are correct.
- Get the parent budget unit of the budget unit (selected in step 4) from infotype table HRP1001 (BU->BU relationship code A003).
- If the budget unit of the organization unit is not found, then this organization unit is identified for the creation process.
Here is how the program determines if it needs to change or move an organizational unit:
- Get all changed organization units from infotype table HRP1001 for a specified period provided at the selection screen.
- Retrieve the old parent organization unit and new parent organization unit of the selected organization unit in the above step from infotype table HRP1001.
- Check the validity from infotype table HRP1500. The budget unit should be valid according to the budget type provided at the selection screen.
- If the parent budget unit of the organization’s budget unit and the budget unit of the parent organization unit do not match, then this organization unit is identified for the movement process.
Following is how the program determines if it needs to delimit the organizational unit:
- Get all delimited organization units from infotype table HRP1000 between the specified periods provided at the selection screen.
- If the object’s end date is less than the review period’s end date from infotype table HRP1000, then this object is identified for the delimit process.
All assignments of organization units should be delimited before processing with the tool. The program updates planning and budget data for the delimited organization unit. If the assignment is not delimited, then the program gives you an error.
ALV Report Display
Once all data is retrieved in the above steps, a detailed interactive SAP List Viewer (ALV) report is displayed after execution. The user can synchronize any organization unit by selecting the check box of records and clicking the Synchronize button.
Table 4 shows the elements of the tool, and
Figure 3 shows the output of the report in which the user can perform the action.
Table 4
First ALV report for monitoring and proceeding with the process
Figure 3
First ALV report for monitoring and proceeding with the process in the SAP system
Process Scenarios
After displaying the data in an ALV report, the program automatically processes every record according to the identified scenarios. The following sections explain the processes that the program performs.
Create Scenario
The program should have the following steps for the create scenario:
- Create a budget unit for the newly created organization unit. The program creates or generates the budget unit for the organization unit and updates infotype tables (i.e., HRP1000).
- Establish a relationship between the newly created budget unit and the budget unit of the parent organization unit with relation code B003 (BU->BU), and update the infotype tables (i.e., HRP1001).
- Reinitialize the organization unit and update the infotype tables (i.e., HRP1500, HRP1520)
Movement Scenario
The program should have the following steps for the movement scenario:
- Change the relationship between the budget units of the old parent organization unit with the new budget unit of the new parent. Establish a relationship with the budget unit of the current organization unit and the budget unit of the new parent organization unit using the relation code A003 and update infotype table HRP1001 (BU->BU).
- The program recalculates the budget unit and updates infotype tables HRP1500 and HRP1520.
Delimit Scenario
For the delimit scenario, the program reinitializes the organization unit and updates infotype tables HRP1500 and HRP1520.
Display the Final Result
After processing the above records according to their identified scenarios, the system displays the second hierarchical ALV list for each record with the result message or log. A spool is also generated in the background for the current user. The user can obtain the results via transaction code SP01.
Table 5 shows the output that should save in the spool;
Figure 4 shows it implemented in a system.
Table 5
The report’s second output should save in the spool
Figure 4
Hierarchical ALV for final output after synchronization is complete
Error Handling
Users can check for errors in the application log using transaction code SLG1. Enter ECM as an input parameter for the Object and Subobject. I recommend that you schedule a synchronize program once a day. Monitor the job using transaction code SM37. In it, find the conclusion and the result log of the job. Enter SP01 (to find the second hierarchical ALV output) as the Spool log value and SLG1 (to find the output of the standard method) as the Application Log value.
If you find any inconsistency in the logs, run the synchronize program in the foreground and analyze the report. Check the red entries in the first and second ALV reports.
Supporting Transaction Codes and Program Names
Here are some supporting transaction codes and program names you can use to analyze the budgets:
- Transaction code PECM_PROCESS_SUPPORT updates planning and recalculates the budget.
- Transaction code PECM_DISPLAY_BUDGETS displays the budget structure.
These are prerequisites:
- The system specification is SAP ERP Central Component (ECC) 6.0. You need the SAP ERP HCM component with enhancement package 4.0 and ECM configured.
- Compensation planning should be done and generated successfully.
- SAP Notes 1686385 (Incorrect budget values during budget recalculation) and 1708471 (ECM: No recalculation of budget without staff).
Components of the Program
Now I’ll show you the function modules, classes, tables, relationship codes, and messages to be used in the program. The following five tables are purely technical information for your reference.
The function modules are shown in
Table 6.
Table 6
Functional modules required
Table 7 shows the classes needed to use the functionality.
Table 7
Classes used in the program
Table 8 shows the tables in ECM for related configuration and data.
Table 8
Tables used in the program
Table 9 shows the relationship codes used in your program to get data from DB HRP1001.
Table 9
Relationship codes used in the program to update in HRP1001
Table 10 shows messages used in the program.
Table 10
Messages used in the program. Note that refers to the budget unit number.
Arun Agrawal
Arun Agrawal is an SAP-certified professional working in the SAP Global Delivery IS practice, Arun has 10 years of experience. He has worked in many modules, including SAP IS-OIL, Banking, HCM, ECM, GTS, Retail, AFS, FICO, PP, SD, QM, ESS and MSS, PM, and MM.
You may contact the author at
arun.kumar.agrawal@sap.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the
editor.