Monday, 30 September 2019

Restricted & Calculated Measures in S/4 HANA Cloud Custom Analytical Queries(In-app extensibility)

In S/4 HANA cloud Custom Analytical Queries are used to build reports. Here in this blog we will talk about Restricted & Calculated measures and how those can be used. Let’s talk about a simple example to illustrate the use of these measures. For example, we need a report for financial reporting which includes –

1. Company Code (Dimension)
2. Ledger (Dimension)
3. G/L Account (Dimension)
4. Current Year Total In Company Code currency (Measure)
5. Previous Year Total In Company Code currency (Measure)
6. Total In Company Code currency (Measure)

Since “Amount In Company code currency” from standard CDS view Accounting Journal Entry Item Cube(I_JournalEntryItemCube) will contain line items with values from all previous years and the current year we can use restricted & calculated measures to get these values.

1. Create a Query with source I_JournalEntryItemCube.

SAP HANA Study Materials, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Online Exam

2. Select required fields.

SAP HANA Study Materials, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Online Exam

3. In order to remove a field from the output display simply uncheck the display box.

SAP HANA Study Materials, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Online Exam

4. Select Add option and click on Add Restricted Measures.

SAP HANA Study Materials, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Online Exam

5. Create a restricted measure, in this case, we need to restrict by dimension Fiscal Year.

SAP HANA Study Materials, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Online Exam

6. You may also create a User Input Filter, for user selection.

SAP HANA Study Materials, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Online Exam

7. We similarly create one for previous year and a similar measure to restrict values for previous year.

SAP HANA Study Materials, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Online Exam

8. Now create a Calculated measure to add the two measures just defined.Edit expression to SUM the values based on G/L Account.

SAP HANA Study Materials, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Online Exam

9. Final Output –

SAP HANA Study Materials, SAP HANA Certifications, SAP HANA Tutorials and Materials, SAP HANA Online Exam

No comments:

Post a Comment