Create Calculated Fields in SAP Query for HR and Payroll Data
- by Danielle Larocca, Senior Vice President, Human Capital Management, EPI-USE Labs
- October 15, 2003
When you want to perform calculations on your data, you may be accustomed to downloading an R/3 report into Microsoft Excel and performing calculations there. However, you can save yourself some work by creating the calculated fields in SAP Query itself. Using an example query, the author shows you how.
At some point, you will want to perform calculations on your data. You may think you have to resort to downloading an R/3 report into Microsoft Excel and performing calculations there. However, did you know you can save yourself some work by creating the calculated fields in SAP Query itself?
In SAP Query, you can multiply an annual salary by 4 percent to determine potential increases or inflation for salary projections and budgeting. Or you can take an employee’s hire date and subtract it from the current date or a future date to determine or project their length of service. I find calculated fields most helpful when I want to compare the differences between two columns in a report, such as an employee’s cost center stored on infotype 0001 and the cost center that came through with their time sheet on infotype 315.
In addition, you can use calculated fields to:
- Perform “if-then” statements. If an employee’s termination reason code is A1 (death) or B1 (better opportunity), you can output a column that defines the termination as unavoidable.
- Output symbols and pictures if certain conditions are met. If an employee has been terminated but the benefits are still active, you can include a red flag next to the line on the report output for that person.
- Calculate wage types. If an employee is paid bi-weekly and you want to calculate his annual salary, you can create a calculated field that says if the wage type record equals 1023, then multiply the wage type amount by 26.
Would you like to see this full item?