Create Calculation Views Related to Transactional Data

Objective

After completing this lesson, you will be able to create Calculation Views Related to Transactional Data

Modeling Measures in Calculation Views

Calculated and Restricted Columns

Calculations and Functions in SAP HANA Modeling.

To derive new values, you can add a calculated column, counter, or restricted column, to enhance an existing SAP HANA View.

Note

Calculated columns are similar to calculated key figures. Restricted columns are similar to restricted key figures in SAP BW/4HANA.

These functions are executed during reporting and are typically not part of a data storage scenario, but defined on a specific SAP HANA View node. As a prerequisite, make sure that all fields that you need in the expression, are available at this level.

Calculated and restricted columns are defined in an SAP HANA calculation view and restricted key figures and calculated key figures are defined in SAP BW/4HANA. In the table, you see how specific tasks can be done in both approaches.

Comparing SAP HANA and SAP BW/4HANA Approach

TaskSAP HANA Calculation ViewSAP BW/4HANA
IF... THEN...Condition can be defined on any data typeCondition must compare key figures
Derive Top NUse Rank Node:
  • Threshold is a number, not a % level
  • You can calculate and filter with rank number
Use SAP BW/4HANA Condition:
  • You can filter for top 80%, bottom Sum 100
  • You can not use rank number to filter or calculate
Filter
  • Can be combined with fuzzy search
  • Can not be easily re-used
  • Can only be defined on exact match
  • Can be saved and used in other Queries
Union, Join and CalculationCan be combined in any orderCombinations of Unions and Joins in CompositeProviders more flexible then calculation in Query
FunctionsLeverage SAP HANA functions, for example substring, date conversion, add x daysOften only via SAP BW/4HANA variables with custom code

Currency Conversion

Currency Conversion

SAP HANA offers modeling options for currency conversion.

To enable conversion in SAP HANA, the following tables must be available in the SAP HANA database. For example, in a dedicated schema for currencies and exchange rates.

Required Conversion Tables

Table NameDescription

TCURC

Currency codes

TCURR

Exchange rates

TCURV

Exchange rate types for currency translation

TCURF

Conversion factors

TCURN

Quotations

TCURX

Decimal places in currencies

These tables exist in most SAP Systems (SAP S/4HANA, SAP BW/4HANA). In the currency calculation definition, you must specify the schema for the currency conversion.

If you want to reference the SAP BW/4HANA tables, choose the SAP BW/4HANA schema. Make sure that they are regularly updated to cover all necessary Conversion Dates.

The models may be based on data replicated from another system. If so, the replication process must also include these tables so that they are always synchronized with the ones located on the source system.

By default, a measure has no Semantic Type. When a measure contains an amount and you want to enable conversion, you must set its Semantic Type to Amount with Currency Code.

Note

This is different in SAP BW/4HANA, where the relationship to a currency is already set in the definition of a Key Figure.

This Amount with Currency Code type is the prerequisite for the currency conversion, but can be a valuable setting on its own, to combine values with a currency.

Enhance a Calculation View with Formulas and Currency Conversion

Watch the video to see how to enhance an existing calculation view with formulas.

Watch the video to see how to create a Star Join calculation view and implement currency conversion.

Watch the video to see how to show the HDI calculation view in analysis for Microsoft Excel.

Log in to track your progress & complete quizzes