NextLytics Blog

How to maintain transformation rules for SAP BW in NextTables

Written by Bernhard | Oct 24, 2024 7:10:32 AM

Do you need a manageable set of rules that can be maintained by business users and easily consumed in SAP BW  ETL processes? Let me paint a picture for you. Lets say you want  to have a Rule to determine a missing “Sales Manager” by checking the “Product” and “Country” value. So if the “Product” equals “NextCola” and the “Country” equals “Germany” the assigned “Sales Manager” should be “Sebastian Uhlig.”
And now you want to do that scaled up with many variations and fallbacks defined by multiple  business departments in multiple data models.

We have great news!
You can use the Master/Detail feature included from Version 11+ to maintain Rules for data transformations with our NextRules Code Addon. NextRules is a simpler and more user-friendly rule engine than the usual suspects of the Business Rule Framework Plus (brfplus) or the HANA Rules Framework.

The business can set values for input and output for data derivations. This allows you to dynamically implement data transformations and let the business department maintain the rule values, removing any maintenance efforts from the IT.

NextRules comes with a few new aDSOs and BAdIs which you can further customize to your requirements. It also comes with Pre-configured NextTables Apps for both setting up Rules as well as Rule Maintenance for business departments.
The Addon is implemented really dynamically and generically. IT can set up Rule Areas and individual Rules with definitions on which InfoObjects should be available for Input and Output and what Priority any given Rule should have.
The business departments then can add values to the rules, with automatically restricted Inputs and Outputs, allowing only valid values for the selected Rules.
The values stored in our aDSO can then be used to derive data in SAP BW transformations or any ETL process dynamically.

To see when a rule or its value was last modified and by whom, we’re using our Changelog-Feature which is generally available for all tables. 

Too technical for you?
Let us show you how NextRules works in a live demo!

 

Initializing NextRules

NextRules allows IT to set up Rule Areas and Input/Output options before giving the business access to NextRules application.
Rule Areas can be used to give context for individual rules but are also great for use in authorizations, so that different departments can only see one or multiple specific rule areas. Input/Output options need to be defined, to ensure the right InfoObjects are used. Those are then needed for our masterdata value help, but also for the later processing of the rules. 

Setting up Rules

After initializing you can start actually creating the rules according to your business needs. Each rule can be assigned a priority and gets an automatically incremented ID. Per rule, you can now define a valid Input/Output combination generating a SubRule ID.
Sticking with our example, two inputs “Product” and “Country” can be defined with “Sales Manager” as an output, meaning the “Sales Manager” will be derived from the two inputs. Then you can create a second rule with a lower priority that just derives the output “Sales Manager” by the input “Country”, so that every case that is not covered by the first rule is caught by the lower priority rule as a fallback.

 

Maintaining Rules Values

Business departments can then start to populate the rules with semantic derivations. They have the full masterdata value help for every InfoObject that they have come to expect from NextTables, with the possibility of disallowing them to add non-existing values to the list.

If we continue with our previously used example, business can now define that the “Product” of “NextCola” in combination with the “Country” of “Germany”, should have the “Sales Manager” output of “Sebastian Uhlig”.

Processing the Rule Values

When the business departments are regularly maintaining the rule values, processing those in BW transformations or other ETL processes is the next step.
To do that, the NextRules central storage aDSO can be accessed, where every single rule is saved. The aDSO has been transposed in our BAdIs automatically, so it is easy to read in any further code accessing the table.
So for every rule with its respective sub rules, you get a row in the storage table in the usual OPTION, SIGN, LOW, HIGH format. Out-of-the-box, only OPTION = ‘EQ’ and SIGN = ‘I’ are supported, but of course NextRules can be extended to support intervals as well.

 

Summary

With our NextRules Addon for NextTables, you already have a strong foundation for a Data Rule Maintenance system, erasing the need for a third-party-tool that is hard to integrate into SAP BW. We deliver a lot of features out-of-the-box, that require very little setup both on the IT end as well as the business side.
By utilizing standard aDSOs and BAdIs for the implementation of NextRules, you can easily extend the tool according to your requirements.

Interested? Do you want to try it out yourself? Get your free trial and let us know you want to test NextRules. Feel free to contact us and we will answer any questions and give you a live demo of NextRules.