100% found this document useful (1 vote)
2K views40 pages

SAC - Performance Best Practices For Planning

The document discusses best practices for troubleshooting performance issues in SAP Analytics Cloud for Planning. It covers the SAP Analytics Cloud architecture and key components, planning models, data import and actions, and data entry. Performance considerations include limiting large dimensions, deciding on a security concept, and optimizing the account dimension structure.

Uploaded by

andrefumian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views40 pages

SAC - Performance Best Practices For Planning

The document discusses best practices for troubleshooting performance issues in SAP Analytics Cloud for Planning. It covers the SAP Analytics Cloud architecture and key components, planning models, data import and actions, and data entry. Performance considerations include limiting large dimensions, deciding on a security concept, and optimizing the account dimension structure.

Uploaded by

andrefumian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Best Practices for SAP Analytics Cloud

for Planning – General Troubleshooting


Ian McAlpine, BI & Analytics Competence Center
August, 2021

PUBLIC
Agenda

SAP Analytics Cloud architecture diagram


§ Highlight key components

Planning Model
§ Performance considerations / Calculations / Account dimension / Versions

Data Import

Data Actions
§ Advanced Formula best practices
§ Demo Data Action Performance Statistics & Analysis story

Data Entry

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Links to key resources

SAP Analytics Cloud Best Practices for Performance Blog


§ https://www.sapanalytics.cloud/resources-performance-best-practices/

General Troubleshooting SAP Note


§ 2511489 - Troubleshooting performance issues in SAP Analytics Cloud *** Master KBA ***

Performance Analysis
§ SAP Analytics Cloud Performance Analysis Tool

Data Actions
§ Performance Best Practices
§ Example Business Scenarios

Planning
§ Modelling Checklist
§ Optimizing Calculations

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


SAP Analytics Cloud
Architecture
High Level Architecture Diagram

Browser HANA
JavaScript Engine SAC tenant
SAC tenant
SAC tenant
SAC tenant
SAC Client
Contentlib
Contentlib
Contentlib
Contentlib
HTTP for acquired data
Chart Engine
EPM Models
EPM EPM
Models
Models
Models
Request generator

HANA on premise
UI interactivity (UI5)
HTTP for live connection
Calc View engine and MDS

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


High Level Architecture Diagram

Client side with the browser


§ High CPU and Memory usage consumed by the User Machine In the Cloud
browser Network
§ Requires good client machine
§ SAC story design impact

SAC Tenant
§ Can have an impact when doing acquisition
scenarios

Network (bandwidth)
§ Network infrastructure in general
§ Data transfer between the different components

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Story

Planning Model
Model
Best Practices
Data Actions Analytic
/ Allocations Applications
Planning in SAP Analytics Cloud

Planning Models are created and designed on the SAC Tenant.

All data is stored on the SAC Tenant, i.e. Acquisition Model.

Special Dimensions

Special Attributes

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


New Model vs Classic Account Model

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


Performance Components in Planning Scenarios

Table Calculations
Story-based Calculated Accounts
Cross Calculations Special Widget Features:
Story Ad-hoc Planning Panel, Variances etc.
Calculated Dimensions
fx
Data
Widgets

fx Calculated
Accounts

Model
Advanced Formulas Security Application JavaScript (Result Set API)
Visual Formulas Data Data Validation Table Calculations
Actions / Analytic
Data Locking Applications
Allocations Allocations Application-based Calculated Accounts
fx fx Cross Calculations
Calculated Dimensions

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Calculation Options in Planning Scenarios

Persistent
On-the-fly Calculations
Calculations

Backend Calculation Backend Calculation Client Calculation


(SQL Procedure) (MDS Query) (JavaScript)

Data Account Cross Table Application


Allocations Formulas Calculations Formulas Logic
Actions

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


Planning Model: Performance Considerations

Limit the number of large dimensions with many members Story


and complex hierarchies.

Decide on a Security Concept:


§ Dimension Member-based via Data Access Controls
§ Role-based via SAC Roles
Model
Limit the number of Driving Dimensions for Data Locking.

Limit the number of Validation Rules. Data Actions


/ Allocations
Analytic
Applications

Avoid large data volumes in Planning Versions.

The main concern in performance situations is very often the


Account Dimension !!!

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


Planning Model: Account Dimension (1/4)

The Account Dimension contains attributes that define how values are
read, calculated and aggregated.

The most important ones:


Hierarchy, Exception Aggregation and Formula

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


Planning Model: Account Dimension (2/4)

Performance Recommendations / Considerations:

Avoid large hierarchies with many calculated accounts.

Limit the usage of …


§ Exception Aggregation
§ LINK Formulas
§ LOOKUP Formulas
§ many sequential / stacked Calculated Accounts (!!!)

Create calculations at the highest aggregation node possible.

Use hierarchies to replace calculations where possible.

Try use RESULTLOOKUP instead of LOOKUP where possible.

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


Planning Model: Account Dimension (3/4)

Exception Aggregation
§ Formula: Product_EA = Volume * Revenue
§ No Exception Aggregation defined: (Prio: Formula)

§ Exception Aggregation of Type SUM on Date (Prio: Aggregation)

Calculate all nodes


below “Q1 (2019)“
and sum up.

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15


Planning Model: Account Dimension (4/4)

Example of stacked Calculated Accounts

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 16


(Bad) Example of Account Calculations
[FUNC_04]
[LOOKUP_04]*[LOOKUP_05]*[LOOKUP_03]+[FUNC_03]

[LOOKUP_04] [LOOKUP_05]
LOOKUP([FUNC_01].[d/Flow]="#" and [d/lndustry]="#") LOOKUP([FUNC_02],[d/Date]="201712"and[d/Industry]="#", [d/Date])

[FUNC_03] [LOOKUP_03]
IF([d/Industry]="#"and[d/Flow]="#", 0, [FUNC_01] ) LOOKUP([FUNC_02],[d/Date]="201712")

[FUNC_01] [FUNC_02]
IF([d/Item].[p/SOURCE]='INM',[LINK_03]/[LOOKUP_01], IF(ISNULL([LOOKUP_02]) OR[LOOKUP_02]!=1,[LINK_06],[LINK_02] )
IF([d/Item].[p/SOURCE]='SAC',[LINK_04]+[LINK_05]/[LOOKUP_01] , 0 ) )

[LINK_03] [LINK_04] [_LINK_05] [LOOKUP_02] [LINK_06]


LINK([OtherModel], LINK([OtherModel], LOOKUP([LINK_02],,[d/Industry]) LINK([OtherModel],
LINK([OtherModel],
[ACC_04],[d/Market] = "[all]") [ACC_05],[d/Market] = "[all]") [ACC_06],[d/Unit] = "#" and
[ACC_03],[d/Market] = "[all]")
[d/Market] = "#")

[LOOKUP_01]
LOOKUP([LINK_01], ,[d/Version] and [d/Item] and
[d/Item].[p/SOURCE] and [d/Item].[p/CID]) Glossary:
• Function
[LINK_02] • Lookup
[LINK_01] LINK([OtherModel], [ACC_02],[d/Unit] = "#" and
• Link
LINK([OtherModel],[ACC_01],[d/Flow]="#" and [d/Industry]="#" and [d/Product]="#" and [d/Company]="[all]" [d/Market] = "#")
and [d/Item]="#" and [d/Market]="#" and [d/Unit]="#" and [d/Date]="[all]")
© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 17
Planning Model: Versions

Version Concept
§ Published data of public versions are stored in fact table.
§ Data of private versions are stored in separate tables
§ A public version in edit mode is treated as a user’s private version.
§ Once a public version is edited, a private version is created (by
copying all accessible data) for the user editing the version.
§ When the user publishes, the delta (i.e. updated rows) are saved.

Data copy of all accessible data Huge data volumes in a planning version

Edit à Long running copy process


Plan Plan* à Bad performance
Publish/Revert

Publish: Delta Update

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18


Story

Data Import Model


Data Actions Analytic
/ Allocations Applications
Data Import

Data Import Options

Append Keeps the existing data as is and adds new entries to the target
model. Duplicate rows can be aggregated or rejected.
Update Updates the existing data and adds new entries to the target
model. The scope of this update is based on a combination of
all dimensions in the target model.
Clean and Replace selected Version data Deletes the existing data and adds new entries to the target
model, but only for the versions that you specify in the import.
Clean and Replace subset of data Deletes the existing data and adds new entries to the target
model, but only for a defined subset of the data based on a
scope of selected versions and specific dimensions.
Reset Model (optional) Clean all the data currently in the model before it can be
replaced with the newest set. This will clean any existing data
in all dimensions, excluding public dimensions.
© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 20
Data Import

SAP Analytics Cloud Agent

Importing data from on-premise data sources typically requires the SAP Cloud
Connector and SAP Analytics Cloud Agent.

This should be installed on a machine with at least 8GB RAM.

Apache Tomcat is also required.


§ Allocate at least 4GB to the maximum heap size (-Xmx4096m)
§ May need to increase the Maximum memory pool when importing from SAP BW (KBA2450684)

System Requirements and Technical Prerequisites

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 21


Story

Data Actions Model


Data Actions Analytic
/ Allocations Applications
Data Actions

A Data Action accepts parameters, consists of one or more Story


steps and allows you to calculate & persist data in the model
leveraging the Version concept.

Type of Data Action Steps:


§ Copy
§ Cross Model Copy Model
§ Allocations
§ Advanced Formulas (Visual vs. Script) Data Actions
/ Allocations
Analytic
Applications
§ Embedded Data Action Step

Data Actions can be triggered from the Story or be scheduled.

If there are problems with expensive Calculated Accounts,


persisting data via Data Actions may be a valid replacement.
© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 23
Data Action Monitor

The Data Action Monitor lists all runs.

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 24


Data Actions: Copy & Cross-Model Copy Steps

Copy Steps
§ Copy (overwrite/append) data within a model
§ Can copy calculated accounts to regular accounts
§ Can persist aggregations

Cross-Model Copy
§ Copy data from one model to another model
§ Can copy calculated accounts to regular accounts

Performance Recommendations
§ Refrain from copying large data volumes if reading calculated accounts:
§ Refrain from copying large data volumes if reading non-standard aggregations
§ Background: Copying pure facts allows direct fact data access while calculated accounts enforce
querying data via MDS. In addition, you may run into query limitations (MaxResultSet Error).

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 25


Data Actions: Advanced Formula Steps

General Recommendations
§ Limit the calculation scope as much as possible:
– Use MEMBERSET to define the step’s data scope.
– Use parameters to restrict the scope.
– Define security to ensure the planner will run the calculations in the allowed data sections.
§ Simplify the formulas:
– The fewer RESULTLOOKUP / DATA calls, the better.
– Try use members and properties as parameters rather than IF … ENDIF.
– Use VARIABLEMEMBER as temporary results for aggregations and for reusing results in
multiple calculations.

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 26


Advanced Formula Example #1
Initialize Zeros

IF RESULTLOOKUP() = NULL THEN IF RESULTLOOKUP() = NULL THEN


DATA() = 1 DATA() = 0.0
DATA() = 0 ENDIF
ENDIF

INTEGER @ZERO = 0
IF RESULTLOOKUP() = NULL THEN
DATA() = @ZERO
ENDIF

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 27


Advanced Formula Example #2
Less IF Statements by using AND

IF <COND1> THEN IF <COND1>


IF <COND2> THEN AND <COND2>
IF <COND3> THEN AND <COND3>
<DO SOMETHING> THEN
ENDIF <DO SOMETHING>
ENDIF ENDIF
ENDIF

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 28


Advanced Formula Example #3
Less IF Statements by using Filter

IF [d/Acc]="X" THEN DATA([d/Acc]="X") =


DATA() = RESULTLOOKUP(
RESULTLOOKUP( [d/Acc]="X",
[d/Country]="FR“ [d/Country]="FR“
) )
* 1.25 * 1.25
ENDIF

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 29


Advanced Formula Example #4
Avoid IF Statements in Simple Aggregation

IF [d/Acc]=("A", "B", "C") THEN DATA([d/Acc]="X") =


DATA([d/Acc]="X") = RESULTLOOKUP() RESULTLOOKUP([d/Acc]="A") +
ENDIF RESULTLOOKUP([d/Acc]="B") +
RESULTLOOKUP([d/Acc]="C")

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 30


Advanced Formula Example #5
Less Queries by Using the right Variables

MEMBERSET [d/Account] = ("AccountX", "AccountY", MEMBERSET [d/Account] = ("AccountX", "AccountY",


"AccountZ") "AccountZ")
MEMBERSET [d/Date] = "202001" TO "202012" MEMBERSET [d/Date] = "202001" TO "202012"

VARIABLEMEMBER #YTD_AccountX OF [d/Account] VARIABLEMEMBER #YTD_Value OF [d/Date]


VARIABLEMEMBER #YTD_AccountY OF [d/Account]
VARIABLEMEMBER #YTD_AccountZ OF [d/Account] DATA([d/Date]=#YTD_Value) = RESULTLOOKUP()

DATA([d/Account]=#YTD_AccountX, [d/Date]="202012") =
RESULTLOOKUP([d/Account]="AccountX")

DATA([d/Account]=#YTD_AccountY, [d/Date]="202012") =
RESULTLOOKUP([d/Account]="AccountY")

DATA([d/Account]=#YTD_AccountZ, [d/Date]="202012") =
RESULTLOOKUP([d/Account]="AccountZ")

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 31


Advanced Formula Example #6
Less Queries by Using Properties

DATA([d/Acc]="X") = DATA() =
RESULTLOOKUP([d/Acc]="A") * RESULTLOOKUP([d/Acc]=[d/Acc].[p/CALC1]) *
RESULTLOOKUP([d/Acc]="B") RESULTLOOKUP([d/Acc]=[d/Acc].[p/CALC2])

DATA([d/Acc]="Y") =
RESULTLOOKUP([d/Acc]="C") *
RESULTLOOKUP([d/Acc]="D")
Model Properties
DATA([d/Acc]="Z") =
RESULTLOOKUP([d/Acc]="E") * Member ID CALC1 CALC2
RESULTLOOKUP([d/Acc]="F") X A B
Y C D
Z E F

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 32


Data Actions: Central vs. Decentral Execution

It should be considered to run Data Actions centrally by a single admin user


or the planning users individually per use case.

Decentral Execution
§ It is very important that the scope is properly limited to the minimal data section that
is required.

Central Execution
§ It should be considered to run Data Actions centrally for all users if there is a large
data volume involved.
§ Data Actions can be scheduled via the Planning Calendar.
§ Data Actions can be published automatically after the execution.

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 33


Multi Actions

Multi actions help you orchestrate a set of planning operations


across multiple models and versions.

Similar to Data Actions:


§ They both consist of a sequence of steps that you set up in a
separate designer
§ Users can trigger them in stories or analytic applications

Different focus:
§ Data Actions manipulate planning data
§ Multi Actions combine existing operations to simplify tasks for
planning users.
§ e.g. Use a Multi Action to run a Data Action, publish data, then run
another Data Action.

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 34


Story

Demo Model
Data Actions Analytic
/ Allocations Applications
Data Action Performance Statistics & Analysis Story

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 36


Story

Data Entry in Stories Model


Data Actions Analytic
/ Allocations Applications
Data Entry in Stories

Data Entry is done via tables with one entry causing a refresh. Story

Recommendations
§ Deactivate “Planning Enabled” for reporting tables.
§ Limit the number of tables (or in general data widgets) per page.
§ Make use of input controls instead of table navigations; particularly
when using unbooked mode. Model
§ Avoid expensive Calculated Accounts in input-ready tables.
§ Use Mass Data Entry mode, particularly for larger tables. Data Actions
/ Allocations
Analytic
Applications
– Enter Mass Data Entry Automatically
§ Avoid many hidden cells in large tables
– In these cases consider Restricted Measures.
§ Consider splitting tables instead of creating complex ones.

© 2021 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 38


Questions & Answers?
Thank you.
Contact information:
Ian McAlpine
Senior Product Expert
SAP Labs Vancouver, Canada

You might also like