1

SAP Commissions : 5 Tips to Improve Pipeline Runtime

 1 year ago
source link: https://blogs.sap.com/2022/06/11/sap-commissions-5-tips-to-improve-pipeline-runtime/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
June 11, 2022 4 minute read

SAP Commissions : 5 Tips to Improve Pipeline Runtime

ralph-hutter-vuIBWXCI3Ro-unsplash-scaled.jpg

What is Runtime Performance?

To discuss any type of application performance, it’s important to define what we mean.

Runtime performance is how your application performs when it is running, as opposed to be loading. This article teaches you the tips to improve and how to avoid long running pipeline job to analyze your runtime performance.

diagram.gif

Let’s look at a few simple ways that suggests can improve each of these aspects.


Tip 1: Avoid writing Direct Conditions in Rules

As you know, In every rule there is a condition tab to filter the data or filter the results from the previous rule calculated (calling PMR or SMR)  .. so avoid writing the direct conditions as shown in below example

Example : A Rule which is written direct condition referencing all the reference types directly which leads to increase the performance of pipeline runtime calculation.

2022-06-11_10-39-35.png

Recommendation

Write all your condition logic in Formula and that would detect automatically the Rule Usage where this Formula as it be reference. By doing this, pipeline will calculate even before the allocate stage .. Go to your rule and add the Formula to the condition tab.

2022-06-03_21-44-28.png
In this example : Formula is called within Formula which would be faster way of calculating during the pipeline runtime
2022-06-03_21-45-51.png

Tip 2: Avoid enabling GA, EA & RA fields

you would be wondering what is EA & RA and where it’s been used ?

GA = Generic Attributes , EA  = Extended Attributes and RA = Reporting Attributes

Its been used in all the rule output tab – Advanced options – Generic columns

2022-06-11_10-46-57.png

In every rule, Generic columns contains below dropdown

  • Text ( String field)
  • Dates (Date field)
  • Numbers (Number field)
  • Booleans (True/False field)

Sometimes rule developer opens this fields through Settings – Customization for Participant, Position, Sales Order, Sales Transaction workspace to populate some values for their dependency calculation or for Dashboard purpose or for Reporting Purpose.

Recommendation

Open those fields if there is a necessary values needs to be shown only for an end user. Don’t open the fields if its unused which leads performance.

Note : Before you enable any EA or RA fields, there is already warning dialog appears.
2022-06-11_09-46-20.png
Don’t open the fields unless its required
2022-06-11_09-47-40.png

Tip 3: Territory Based Calculation

All your Direct & Indirect rule, there is a way to filter the data based on Territory which requires input from category and classifier data. Using Territory will improve your pipeline runtime which calculates during Classify stage.

Recommendation

Try to reference the Territory Variable or Territory rule element in your Direct, Indirect rule for improving the pipeline runtime.

An example of Territory Variable is referenced with Territory referenced in Rolled Transaction Rule.

2022-06-11_10-10-43.png

Tip 4: Enable On-demand Processing

If Customers with over 10,000 positions will improve calculation performance by configuring the calculation to perform on-demand position processing.

In on-demand mode, Commissions loads each position as it is needed by the calculation, instead of loading all positions in the system (regardless of whether or not the positions are active). By loading positions on demand, Commissions can process large numbers of positions in calculation runs.

28-info-solid.gifNote

On-demand processing is available only for calculation runs in full or incremental mode.

To specify on-demand:

  1. Click System Preferences under Preferences section in the Manage Setup card.

  2. Select the Calculation tab.

  3. Enable On Demand Position Processing.

  4. Click Save

  5. Log out and Log into SAP Commissions Application.

Your subsequent calculation runs will use on-demand by default.

2022-03-30_22-43-18.png

💡On-demand position processing does not currently apply to the Per-Position calculation mode.


Tip 5: Detect costly Performance impacting rule via Pipeline Logs

Run a pipeline job with logging option selecting Performance Statisics to detect all your query and rule performance runtime to understand better which rule is costly.

Select a tracing level for the log files. The tracing level controls the level of detail that Commissions writes to the log files. You can check the Enable SQL Logging option to insert SQL statements into the calculation log.

2022-06-11_12-55-13.png
Check Rule Profile and Query Profile data once the pipeline is executed. Run Profile and Query Profile provide high-level information that can help determine which job took more time to execute and help expedite the troubleshooting process once the calculation is completed.

Once the calculation is executed, you can view the Rule Profile and Query Profile metrics.

28-info-solid.gifNote

The run profile and query profile functionalities currently display results only for the following stages: compensate and pay, compensate, allocate, and reward.

2022-06-11_12-57-45.png
loioa1569fbe814a44eb9ea430c9654b5389_LowRes.png

arrow_192.gifStart Thinking

Go to TCMP.CS_PREFERENCES analyze each and every row
Go to TCMP.CS_WORKERCONFIG analyze each and every row

Its gives you Knowing where to begin when facing performance issues in your tenant

Hopefully these practical examples shown above where performance issues can hide and help you get started.

Before you make any changes or to improve your pipeline runtime significantly – Kindly contact Dave Ritson


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK