This blog will take you through some key features in ‘SAP HRF’ by using ‘Channel Management’ business scenario. As a developer, I have no working knowledge on SAP HRF (Hana Rules Framework), but with the help of some colleagues, product documentation and content available on SCN, I have come up with small demo on HRF.

Before jumping to Demo directly will explain some of HRF key features, artifacts and their configuration & utilization.

What is Channel Management?

Channel management, as a process by which a company creates formalized programs for selling and servicing customers within a specific channel, can really impact the business—and in a positive way. The Channel Strategy, if implemented correctly, can significantly reduce complexity and operating costs and improve control over the transactions that flow through the ‘Source-to-Settle end to end process.

Business Scenario

A procurement channel consists of a number of process steps. Here, analyzing means to calculate KPIs like, cost/process step, time/process step, Total Cost or Time/Channel, etc.

It should be possible to configure for which process step in which channel these KPIs have to be calculated – as an example (from the case) the following matrix shows the channels and the steps; an “X” indicates that the admin wants these KPIs to be calculated for a channel/step combination:


In addition to defining a particular combination of channel/step, the admin configures which data goes into the KPI calculation for this combination (what is the data that describes a certain step of a channel).

Formula for calculating the KPI (e.g., Total Cost) at all steps is same but the data can come from different sources. Each steps can have different sets of tables, but calculation rule should be same (in particular, they has a fix interface) across each step on which KPI need to be calculated. Here, the admin can also put the filter criteria on the data to define the inputs to the KPI.


This requirement can be achieved by creating below set of rules, which is based on decision table, and the data administrator can configure data.

  • Create HRF Vocabulary for Channel/Step combination and active flag.

V_Active_CH_ST – This vocabulary can be consumed in rule for creating the decision table, which contains channel/step active data.


  • Create HRF Rule based on Decision Table –

R_Active_CH_ST – This rule is used for configuring all the active steps involved in a particular channel.


Decision Table for this rule looks like –


Data Administrator can add/modify/delete any channel step combination. As soon as rule is activated, it becomes usable in the application.

  • Create another vocabulary and decision-based rule for each configured step, for determining the calculated KPI.

V_STEP_STEP1 – This vocabulary has two outputs (calculated KPI) EXEC_TIME (FTE*8) and TOTAL_COST ( DIRECT COST + INDIRECT COST )



R_STEP_STEP1 – This rule calculate the KPI’s for the GR step, it uses the GR data and administrator can apply filter on the multiple attributes of the associated data. On execution, this rule provides desired result like, Total Execution Time, or Total cost (Direct Cost, Indirect Cost, etc.) for GR step.


Admin can add filter on data object based on the requirements and it can be changed on the fly and upon activation rule become usable after changes.


Similarly, vocabulary and Rule can be created for each step for which KPI is to be calculated.

  • Now we need to create another rule where admin configures which rule is executed for which step

R_STEP_RULE – This rule is used for configuring the rules required for all active steps.


  • Now create XSJS so that all rules can be called in below sequence on basis of inputs coming from the UI.
    1. Execute rule R_Active_CH_ST to determine input channel and step are configured as an active for KPI calculation.
    2. If they are configured as an active then for input step determine the configured RuleName by executing the Rule R_STEP_RULE.
    3. Now execute the RuleName determined from the above step which give the calculated KPI (Total Cost, Total Execution Time, etc.)
    4. Now calculated KPI can be displayed to UI where these information can be shown in the graphical format.


Key takeaway from this blog –

  1. This demo shows a complex requirement, which can be achieved with lots of coding and UI designing effort for all configurations screens, but using HRF, this can be done easily by just creating some rules and consuming them in simple graphical based UI.
  2. If the requirement changes frequently then development effort of non-HRF based solution, tend to increase. The changes can easily be accommodated with the small modification in the affected rules for HRF based solution. Data administrators using Web UI of HRF can easily do these changes, and after activating the rules, the solution becomes compliant to the changes without troubling developers, as there is no code change.
  3. If the configuration data in Decision table of Rules grows rapidly then also, there is no impact on performance of HRF based solution. As upon activation/generation, a stored procedure is generated in the backend, which is executed when rule run.
To report this post you need to login first.


You must be Logged on to comment or reply to a post.

Leave a Reply