Reporting past and current employee data on a single line

March 02, 2018
Written by Danielle Larocca

Senior Vice-President of HCM Solutions Danielle Larocca has worked in the SAP HCM space for over 20 years. An SAP Mentor and featured speaker at numerous conferences, Danielle has authored four best-selling books on SAP, is the Technical Editor for the SAP Professional Journal, and often the Voice of the Expert on SAPInsider’s Ask the Expert series for HR.

Reporting in SAP Human Capital management (HCM) is often referred to as the largest challenge for customers.  Limited data is available (i.e. master data or table values) while other data is quite limited to find (payroll results or time data).

SAP’s approximately 14,000 licensed customers rely on outdated solutions like the Ad Hoc Query or the SAP Query to attempt to retrieve at least some of the data without relying on an ABAP programmer to collect the data for them, as detailed here.  

Because of SAP’s effective date driven RDBMS style, many Infotypes have a Start Date and an End Date at the top of each Infotype, as shown below.

Reporting past and current employee data on a single line

A frequent challenge for customers is the ability to output data from different time-dependent records for any employee on a single line. This includes showing someone’s current position title and their previous position title.
The standard SAP Selection Screen includes a period section at the top for users to designate the time period they wish to retrieve (see below).

A frequent challenge for customers

The most popular option used is the Today option, which brings you every valid record as of today. As many common Infotype records only permit one Infotype to be valid at a time, the report output will only give you the most current data on a single row (see sample below).

Period Selection = Today

Start Date End Date Name Position Title Cost Center
1/1/1998 12/31/1999 Walter White Adm.Staf -US 4235

Customers wishing to evaluate someone’s position title as of today, and their previous position title(s) as well, would need to change the Period selection accordingly - which will result in multiple rows being retrieved (see sample below).

Period Selection = Up to Today

Start Date End Date Name Position Title
Cost Center
1/1/1992 7/4/1995 Walter White Mailroom Clerk 1054
7/5/1995 6/28/1996 Walter White Front Desk Attendant 5248
6/29/1996 12/31/1997 Walter White Front Desk Attendant 5248
1/1/1998 12/31/1999 Walter White  Adm.Staf -US 4235

The user would then have the challenge of manually identifying which is the previous record, to manually identify the row with the previous position title, and try to record it appropriately. In the example above, it is easy to see that the previous position title was as a Front Desk Attendant.  However, the resolution of getting that previous position title on the same as the original would be a manual effort. A manual update to every employee in a report is not a reasonable exercise.

To further complicate matters, the change in position may not always be on the immediately previous record, so you cannot even use an Excel macro to automate the process.  

This is simply another shortcoming of using a tool like the Ad Hoc or SAP Query for HCM reporting. Other examples can be seen here and here. Unless you are one of the many thousands of customers leveraging a third party solution for your reporting, like Query Manager™, you would have to resort to more complicated methods.  

To get single line reporting that includes information from both current and previous Infotype records you will need to use a custom ABAP report, leveraging the skills of an ABAP programmer who can modify the InfoSet that you use for Query reporting.

See below for a sample of ABAP code that was added to an SAP Query InfoSet, allowing two fields to be added to the SAP Query for the former position title and previous salary for salaried employees. This sample ABAP code is included here for reference and is based on configuration of a sample system which includes references to values for Action Codes (i.e. 01) and Employees Sub Group types (i.e. S1, S2, S3 and S4) which would need to be replaced by your organizations codes. The code is not all-inclusive, but it should you give you an idea of how that data is retrieved for previous and current data for both the position title and the annual salary, such that you can leverage it back at your organization, resulting in a report that looks like this sample below.

Period Selection = Today

Start Date End Date Name Position Title Previous Position Title
1/1/1998 12/31/9999 Walter White Adm.Staf -US Front Desk Attendant

Sample ABAP code added to an SAP Query InfoSet

You can continue to struggle with the on-premise SAP HCM reporting solutions, or you can solve the greatest challenge for SAP HCM customers and investigate the EPI-USE Labs Query Manager solution.

Query Manager: Taking your Reporting to the next level



Explore Popular Tags

Query Manager SAP SuccessFactors HCM Reporting SAP HCM reporting SAP HCM SAP Reporting HCM reporting EPI-USE Labs Payroll Document Builder SAP Analytics Cloud SAP Query SAP SuccessFactors Employee Central Payroll SAP Payroll SAP SuccessFactors People Analytics SAP HCM Data SAP SuccessFactors Reporting Human Capital Management (HCM) Microsoft PowerBI Payroll Data Query Manager Analytics Connector Variance Monitor people analytics sap query hr Data Sync Manager Payroll reporting SAP SAP Payroll data Tableau COVID-19 Employee Central Payroll HCM Productivity Suite HR Journey to SAP SuccessFactors SAP HCM journey reporting solution successfactors ABAP Cloud-based SAP HCM solutions GeoClock HXM Move PRISM Pay Recon Query Manager with Document Builder SAP SuccessFactors HCM Journey data validation payroll control center DSM for HCM Data Sync Manager for HCM Employee data Let's Talk HCM OData SAP ERP HCM SAP HCM Analysis SAP HCM On-Premise Solutions SAP HCM On-premise SAP HR Reporting SAP HXM 2021 SAP On-Premise customers SAP S/4HANA Private Cloud Edition (S/4 PCE) SAP SuccessFactors Roadmaps SAP and SuccessFactors HXM Reporting SAP customers Success Factors SuccessConnect 2019 Successconnect Tax Reporting Transformation without re-implementation certification custom infotype data source DSM Object Sync for SuccessFactors Hybrid Employee Central Employee Central Payroll Reporting Employee Letters Employee payroll Free HCM Assessment GDPR HCM, HR HR Journey HR Service Delivery Human Resources Human Resources data Hybrid Reporting SAP and SuccessFactors Hybrid reporting Hybrid reporting solution Intelligent HR and Payroll Microsoft Excel OData integration OM Object Sync On-Premise Payroll On-Premise Payroll S/HANA Sidecar On-premise reporting PA People Analytics Workforce Planning Personalized documents Robotic Process Automation framework SAP Data Security SAP Data Warehouse Cloud SAP HCM Payroll SAP HCM/HXM SAP HR SAP Mentors SAP Payroll to the Cloud SAP S/4HANA SAP SuccessFactors Hybrid SAP SuccessFactors Time Management SAP SuccessFactors Time Tracking SAP certified solution SAP data privacy and compliance SAP migration SAPPHIRE 2018 SuccessFactors' Employee Central Payroll The Report Center The Road to People Analytics Time management Workforce Planning ad hoc easy reporter ebook high-speed, low-risk on-premise SAP HCM on-premise SAP data partner roadmap s/4HANA single reporting solution sq01 technology third party ALE STP report ASUG Accessing COVID-19 data Ad Hoc Query American Payroll Association (APA) Analytics Connector Analytics solution Analytics solutions At-risk employees Australian Payroll Australian Tax Office (ATO) Automated analysis and pay run reconciliations Automated reports Automation Best practice in BI Bots Business Analytics Business Intelligence COVID-19 statistics COVID-19 vaccinations Certified solutions Check for data replication errors Client Sync Cloud hosting SAP PCE Cloud migrations Company Branding Compare legacy HR and Payroll data Comparing data Configuration Center Copy and mask test data Coronavirus Created timestamp Customer-specific infotypes DSAG Data Privacy Data Replication Data Sources Data Sync Manager (DSM) Data Types Data analysis Data production support issue solution Description Diversity & Inclusion reporting DocuSign Document Building Dynamic data ECC EPI-USE Labs’ solutions ERP Education sector Electronic Signatures Embedded Analytics Edition Employee Central time Employee Central timesheets Employee NICs Employee communication Employee payment summaries Employer NICs Encrypt data FAQ Index Font Guidelines Gender Pay Gap General Data Protection Regulation Government forms Grid control Grid layout HANA HCM Client Sync™ HCM/HXM/HR Blogs HIPPA HMRC HR Innovations 2019 HR and Payroll Integration HR and Payroll data HR conference HR documents HR employee reports Historical payroll results Hourly time tracking Human Capital Management Human Resources reports HumanRevolution Hybrid SAP SuccessFactors environment Hybrid SAP and SuccessFactors IRS Tax Withholding Estimator Infotype Instance Refresh Instance Sync Instance Syncing Integrated reporting SuccessFactors SAP Intelligent Enterprise Intelligent slicing of payroll data JHUCSSE Knowledge Base (KB) Articles Kronos LabsScript Learning and growth Leave Liability Reporting Legislative compliance Leveraging Fiori Technology Location Managed Payroll Merging and splitting of cells Modified timestamp Move to SuccessFactors Employee Central New York Times News OCHA Organization of the data Owner PRISM for HCM (Private Cloud Edition) Pandemic Parent template Password protection Pay As You Go (PAYG) Pay reconciliation Payroll data in a dashboard Payroll support and reconciliation
+ See More

Get Instant Updates

Leave a Comment: