Embedded (Real Time) Planning in S/4 HANA
Embedded (Real Time) Planning in S/4 HANA
The objective of this document to provide an overview on the Real Time Planning in S/4 HANA – Embedded Analytics using CDS Views.
Perform HR Annual Salary planning for each employee using automatic & manual planning options. The below activities need to perform by the user.
- Actual Data copy to selected Plan Year.
- Manual planning of annual salary for individual employee.
- S/4 HANA (Version 1610)
- SAP HANA (BW & ABAP Modelling Tools)
- Analysis for Microsoft Excel
Data Flow Architecture:
Create CDS view(s) for an actual data.
Considered below HR tables to provide Actual Data.
- PA0001 (HR Master Record: Info type 0001 (Org. Assignment))
- PA0002 (HR Master Record: Info type 0002 (Personal Data)
- PA0008 (HR Master Record: Info type 0008 (Basic Pay)) tables to provide the Employee related Data.
The below are the CDS views (ZHR_I_PA0003 & ZHR_I_SALARY) which are used to extract the data from the above HR Tables.
CDS View (ZHR_I_PA003) for Employee Data from PA0001 & PA0002 Tables.
CDS View ZHR_I_SALARY is an association view with ZHR_I_PA0003 and PA0008 Table.
Create a Calculation View to consume the CDS SQL view.
Calculation View (ZHR_PAYROLL) created to consume the CDS SQL View (ZHR_SALARY) along with Time Dimension to populate Month, Year from the Start Date of an Employee.
Output fields from the Calculation View (ZHR_PAYROLL).
Create a virtual Cube in Data Warehouse Work bench (RSA1) with an option Based On a SAP HANA Model.
Virtual Info cube HR Salary (ZHR_PA03) created by using the Calculation view (ZHR_PAYROLL) as a source. This cube supplies the Actual Data.
Assign the Info Cube Info objects to the HANA Information Model fields.
Virtual Info Cube HR Salary (ZHR_PA03) output.
Create Real Time Info cube to store Plan Data.
Payroll Planning (ZHR_PL02) is a Real time info cube with the same Info objects of Virtual Info Cube (HR Salary (ZHR_PA03). It will store the Plan related data by using Planning Functions or from Input ready query.
Create a Composite Provider with Virtual and Real Time Info cubes.
The Composite Provider HR Payroll (ZHR_PAYROLL) created with the Union join of Virtual Info cube HR Salary (ZHR_PA03) and Real Time Info cube (Payroll Planning (ZHR_PL02)).
Create an Aggregation level on top of Composite Provider HR Payroll (ZHR_PAYROLL) to perform planning activities.
An Aggregation Level Payroll Aggregation (ZHR_AGLPY) created on top of Composite Provider HR Payroll (ZHR_PAYROLL) with the required fields.
Create Copy Planning Function to copy Actual data for a particular Year to Target Year.
Planning Function Yearly Salary Copy Planning Function (ZHR_PFPY_VAR) created on top of an aggregation level (ZHR_AGLPY) and the parameter restriction are as follows.
- Variables Source Year (ZSOURCE_VAR_PF) & Target Year (ZTARGET_VAR_PF) are used to define the years at run time
- Source Info cube ZHR_PA03 for actual data & Target Info cube ZHR_PL02 used for Copied Plan Data.
Create an Input ready query to perform Manual Planning.
An Input Ready Query Employee Annual Salary Manual Planning (ZHR_ZHR_PAYROLL_Q0002) created on top of Aggregation Level Payroll Aggregation (ZHR_AGLPY) to perform the manual planning for selected year.
Create a Bex Query on Composite Provider to view Actual & Plan Values.
HR Actual & Planned Year Salary Data (ZHR_ZHR_PAYROLL_Q0003) query created on top of Composite Provider HR Payroll (ZHR_PAYROLL) to analyze Actual and Planned data for selected years.
Create an Analysis for Microsoft Excel report to analyze & to perform Planning activities.
- HR Annual Salary Planning Report created with HR Actual & Planned Year Salary Data (ZHR_ZHR_PAYROLL_Q0003) as DS_1.
- Used Employee Annual Salary Manual Planning (ZHR_ZHR_PAYROLL_Q0002) Input ready query as DS_2.
- Used Yearly Salary Copy Planning Function (ZHR_PFPY_VAR) with an alias (PF_1) to perform copy data from Actual to Plan years.
- Created Button groups for each report to perform the Report activities.
Report Execution Steps:
- Open the report from SAP Net Weaver Platform (Since the report was saved in Net Weaver Platform).
- Enter the Variable selections for Source Year / Target year for Copy Function and for manual Planning.
- Currently No Data under Plan Year (2017) and can be generated upon clicking on Copy Annual Salary Button which in turn executes the Copy Planning Function (ZHR_PFPY_VAR).
- After execution of Copy Annual Salary Button
- Save the Data by clicking Save Button under HR Annual Salary Planning
- Perform Manual Planning by adjusting Annual salary for each employee under Employee Annual Salary area.
- Employee (16 & 24) annual salary adjusted and the total now 100,331 which was updated immediately in the HR Annual Planning Query under 2017 Year.
- Prompt for Planning button can also be used to perform Manual planning for the selected year.