Skip to content
Business Rule Framework
  • Home
    • Get informed
    • Practical advice
    • Be prepared
    • Career opportunities
  • Blog
    • Disclaimer
    • Cookie Policy
  • Training courses
  • Contact Me

Blog

Practical Advice

How to transpose a string into a table using…

  • November 20, 2019
  • by Isard Haasakker

You are probably aware that Excel has a great function to convert a row of data into a column. This action is called “transpose”. In some cases you might want to do the same in BRF+, for example converting words within a sentence into individual words in a single column.

There are no standard solutions within Business Rule Framework to transpose. This means that you have to build this functionality yourself.

It makes sense to create a separate application in BRF+ that contains core functions that replicate functionality, such as the transpose requirement. The aim is to collect functions that can be used in any other application that is linked to a specific object (e.g. sales order, production order or purchase order). This system application will contain functions that is not meant to be called in ABAP code, but only called within other BRF+ functions in other applications. It is probably best to call this the application containing support functions.

These support functions are stored in a system application to make them immediately available in all clients within a SAP system. Obviously has the impact that the signature for these support functions have to be stable when they are going to be used in other BRF+ functions. Normally that should not be a problem because these support functions should not be complex.

For example, you want to transpose the text “Business Rule Framework” into a table with one column containing three rows with the words “Business”, “Rule” and “Framework”.

How do you do that within BRF+?

You can achieve this goal by having two support functions:

  • GET_SUBSTRING, and
  • CONVERT_STRING_TO_TABLE

The GET_SUBSTRING function uses sentence and to derive the first word.

That sounds a very straightforward task, but you will discover that the formula functions within BRF+ cannot use the pace as a delimiter.

So you need to build a loop to scan the sentence from left to right and find the first character that is identified as a delimiter.

You stop as soon as you have found a single word.

The CONVERT_STRING_TO_TABLE puts words into a table.

That requires a loop to call the support function GET_SUBSTRING.

Every time a word is found then this needs to be removed in your original sentence, else you trigger an endless loop.

There will be obstacles along the way, but eventually you end up with a very efficient support function that is universal.

When you have created your first support function, you find out that these will be valid in any SAP system, irrespective which SAP client and independent to what extend this client has deviated from standard SAP.

You will start collecting these universal support functions. Who knows, you might even be able to monetize them or trade them for support functions other BRF+ consultants have made.

Be Prepared

How to create time to learn BRF+

  • November 19, 2019November 19, 2019
  • by Isard Haasakker

The most common feedback that I receive when offering my free BRF+ training relates to the lack of time. Something I can fully understand. People tend to be very busy every day and eventually, years later, they wonder what new skills they have learnt. Often a shocking realisation that their skill set has not been widened of deepened, triggering a worry that they become less attractive in the market place.

Finding time to learn new skills has to come outside of normal business hours. This is a trend confirmed by many research institutes. It also becomes an expectation from your employer or client that education is a cost your have to bare yourself. Getting approval for training during working hours becomes a rare occurrence.

There are choices to make when you are convinced that new skills have to be taught in your spare time. Sacrifices need to be made. The biggest issue probably is the rule of delayed gratification. Imagine you want to learn Business Rule Framework but your client or employer is not aware this tool exists. Apart from learning the skills to demonstrate its potential, you have no assurance you will be successful to apply this new skills in your daily working life.

In fact, you probably can make a very long list why you should not dedicate your precious free time to education. The number of reasons to commit to training will be short and are easy to push aside.

But when you are convinced that Business Rule Framework could ignite your career, then creating time for education could be easier then initially thought.

First find out when you are most productive. For many this is either in the early morning or late in the evening. Identify this highly productive time and see what you can do to take full advantage to reserve just 30 minutes to focus on education. Make it a habit that you do something every day to learn something new, even when it seems insignificant.

I am very effective in the early morning, so I have to find time every morning to do something towards my education. The advantage of early birds is that you can give yourself the time off the rest of the day.

If you are also productive at dawn, then avoid reading emails or checking Facebook statuses. Do your education first and then let the chaos of the day take over.

On my blog you can find a training course that allows you to build the rock, paper, scissors game in the SAP system using BRF+. Every day you get instructions and you learn new capabilities every time. After one week you should be able to play this game and at the same time get a basic understanding what Business Rule Framework can do. You make data objects, expressions, call formulas within formulas, call functions within functions, create constants to fill decision tables and load decision table content using Excel.

If you have access to a SAP system in which BRF+ is activated, then building this BRF+ game should not be a huge sacrifice to make.

Sign up for the training course.

Be Prepared

BRF+ ignites S/4 HANA migration preparation

  • November 18, 2019December 9, 2019
  • by Isard Haasakker

It is not a secret that the deadline for SAP ECC support ends by 2025 and for the moment there is no sign that date will move. You would believe it gives businesses running SAP sufficient time to get prepared. Reality shows that many are not making much progress or just planning a technical upgrade to S/4 HANA.

The majority of SAP clients, especially those who already migrated R3 to ECC, have a lot of custom solutions on top of the standard functionality. Unfortunately most of those custom developments will lack proper documentation and those involved with the original design have left the company. This makes them vulnerable when they need to upgrade to S/4 HANA. Then they seek guidance from their service providers how to make the move to the new platform. Than a specific vision is required to make the transformation and take advantage of all the new capabilities on offer.

However, most SAP clients will get the advice from their service providers to make existing ECC code S/4 HANA compliant and move this to the new platform. In other words, no opportunity to verify if custom built developments have standard SAP solutions. Also no preparations for new technologies like machine learning, artificial intelligence, blockchain or Internet of Things. What if your competition is in limbo while you can make that leap to new techniques to improve your business processes and serve suppliers and clients?

When you believe that your migration to S/4 HANA could go hand in hand with a competitive advantage, then Business Rule Framework (BRF+) should be embraced as the tool for that transition today.

Business Rule Framework allows you to look at your custom code, find the areas where complex decisions are made and then transform them into configuration. The power of Business Rule Framework is the excellent prototyping and simulation capabilities. When the decision making has the expected results then the Business Rule Framework tool generates all the object oriented ABAP code by the press of a button.

But the real eyeopener is the ability to move the BRF+ objects from ECC to S/4 HANA. When you are a bit clever and keep the new S/4 HANA platform in mind while building solutions in ECC, then you can ensure that the converted code into configuration will work both on ECC and S/4 HANA.

So when your company runs SAP and your service provider is not proposing BRF+ as a means to handle a secure transition from ECC to S/4 HANA, then you should get a second opinion.

Find the service provider with proven BRF+ experience and let them build a few prototypes to prove the potential. It can be a game changing experience and makes you believe that moving to S/4 HANA is feasible and at the same time make steps ahead from your competition.

Get Informed

Convert decisions into binary choices

  • November 15, 2019
  • by Isard Haasakker

You find that Business Rule Framework is very flexible and can be adapted to fit the most extreme complex decision making. However, there is always a limit as it cannot make all decisions a human can.

Humans are emotional beings, making decisions that seem not logical. Those illogical decisions cannot be made by BRF+.

Imagine you have several routes to visit family. You have the fastest route, shortest route and most ecological route. The decision on making the type of route depends on many factors that is based on logic. For example, road blocks, traffic jams, weather conditions or time of day can influence the decision. By default you would imagine that everyone would select the fastest route. Still, even on a normal day you can select a different route that is not based on any logic. Maybe this time you just take the pretty route because you get bored with always driving the same way to your destination. This is emotional decision, not based on logic. Such a decision making process cannot be replicated within BRF+.

Business Rule Framework can guide you from A to B as soon as you have selected the type of route. You can process all influencing factors that could support the most logical decision. The more data you supply to the BRF+ function the more likely the most logical route is selected. But the result is always pointing to the decision that would make the most sense given the circumstances.

You find that it will be extremely rare that business decisions are of an emotional and illogical nature. That is why your challenge is to challenge the business requirements to get very specific details how decisions are made. Just not accept that you sometimes need to go left when in apparently same circumstances need to a different direction. When a specific person makes a specific decision then dive inside the thought process up to the moment that a binary choice is made. Then try to describe how this core binary decision is made and then work your way back to how this impacts the business process involved.

When you use BRF+ for complex decision making then it is useful to build a prototype as soon as you receive the business requirements. Then use this prototype to challenge these business requirement up to the moment that all binary decisions are identified and approved in the prototype. You might need a lot of information to make decisions, but that is the point of this exercise. You are eliminating potential reasons to fail user acceptance testing at the end of the deployment process.

Be Prepared

Introducing BRF+ requires perseverance

  • November 14, 2019November 15, 2019
  • by Isard Haasakker

The biggest mistake is to treat Business Rule Framework as a tool. The potential to save your company money through efficiency and productivity could be enormous. Tapping into that opportunity is often not that easy.

The first hurdle is the fear of the unknown. Even though BRF+ exists as a NetWeaver component since 2006, businesses running SAP are not aware it exists. Probably the first time it gets on their radar is when they need to maintain decision tables in S/4 HANA to activate new or enhanced functionality (e.g. revenue recognition). Then the risk is that you only focus in learning the bare minimum and discard that you can build complex decision making solutions for your custom developments.

The second hurdle is the people working with Business Rule Framework. Too often this tool is seen as an extension for development and therefore given to developers to learn and apply. However, BRF+ should be seen as configuration, generating the object oriented ABAP code with the press of a single button. The built in simulation capabilities are ideal to discuss and challenge business requirements, which is not a common task given to developers. Hence it makes more sense to teach business analysts how to use Business Rule Framework as an extension of their customising skills.

The third hurdle is linked to change management. BRF+ allows you to become agile within a waterfall project. Successful introduction of Business Rule Framework will trigger closer interaction with key users, business analysts and developers. The powerful simulation features allows the design of complex decision making prototypes before a functional specification is written by the business analyst. Decision making itself does not require a technical specification, as code is generated by BRF+. Of course technical specifications are needed to identify when to call BRF+ functions, how data is supplied to the function and what to do with the returned result. It might surprise you how difficult it will be to reorganise the teams to fit into this new way of working. The wish for change has to come top-down.

The fourth hurdle is resistance from the IT service supplier. Imagine the company running SAP uses external resources for development. With the arrival of Business Rule Framework, much of the needed development resources will evaporate and instead moved to business analysist. Knowing the previous hurdles, it is easy for the IT partner to discredit BRF+ and persuade to keep the status quo. Only forward thinking service providers with a rich portfolio of clients will embrace BRF+ as a method to expand their own customer base and claim market share from their competitors.

When all these hurdles are taken, then you need to be fortunate that you have employees who want to learn this new tool. They need to be given enough support and time to play with Business Rule Framework and become familiar with the core functionality. Some can build complex decision making within days, others need weeks. But eventually everyone can learn BRF+. It takes courage to make the first step. It takes dedication to get through the moments when you believe you are stuck. Gradually you get the confidence that any problem can be solved with Business Rule Framework. After a few successful implemented BRF+ functions you will be glad that the hurdles have been taken, as your company will reap the benefits and will never look back.

Practical Advice

Most popular BRF+ expressions

  • November 13, 2019
  • by Isard Haasakker

When you get hands-on experience with BRF+, it is likely that you will get very familiar with the following expressions:

  • Decision tables
  • Table operations
  • Formulas
  • Decision trees
  • Cases
  • Loops
  • Function calls
  • Database lookups

The most common expression is probably going to become the decision table in which you can derive a result based on multiple parameters. Those familiar with the SAP condition technique (as used in pricing and output determination), the decision table can be seen as a merged set of condition tables. Each ruleset will read this decision table with a specific key, just like hierarchical access.

Quite often you supply a table in a signature. Then it is very likely that you need to use a table operation to select a specific row in that table for decision making.

There is a wide range of functions available to determine a result using a formula. For example, adding subtracting days to a date, manipulating a string value, count number of rows in a table or calculating a cosine. You will be surprised how many functions exist and in most cases it will be sufficient to perform the task you desire.

Sometimes you have a set of IF-THEN-ELSE statements to determine a specific result. Most BRF+ consultants tend to use a decision table, but eventually have to conclude a decision tree is easier to understand. Quite often the decision tree will be more efficient and faster than a decision table.

A good alternative to a decision tree is a case when a specific result is based on a specific value. For example, the system stores the factory calendar per year. Then you have twelve fields for each month to identify whether to is a working day. You can use a formula to get the month based on the current date and then use that as input to select the workday information from the factory calendar with the case expression.

Continuing of the working days within a calendar month, you can use a loop to find the next or previous working day. Just decision whether the loop is based on a while or until condition. Be careful that you avoid triggering an infinite loop, but that can be assured by performing good simulations.

Sometimes it makes sense to call functions within functions. You can do this with a function call. You will discover that you will use this technique a lot, as result of the modular design. It is also useful to have multiple functions to keep specific decision making separate.

Finally, the database lookup should be avoided. Understanding decision making will be complicated when some data is supplied via the signature whereas other data is collected via a database lookup. Also, using the database lookup will limit the ability to test your functions in a system that has poor data quality.

Career Opportunities

Learn new skills through BRF+

  • November 12, 2019November 13, 2019
  • by Isard Haasakker

It is very common that SAP clients look for new resources based on what they currently want instead what they need in the future. That is why job offers primarily focuses on hard skills, such as SAP module knowledge and experience. Nowadays also S/4 HANA platform exposure is important. And we cannot blame them for doing this, as that is what they can quantify. Often they have to replace a resource like-for-like or expand a team with a specific skill set.

What seems to be forgotten is the marriage of hard skills with soft skills.

Business Rule Framework pushes the ability of problem solving into the limelight. Understanding this tool allows you to solve any complex decision making problem, even when you have no hand-on experience with the area of SAP functionality affected.

For example, any BRF+ expert can solve problems with Human Resource Management, even when they do not know this module. Often this lack of knowledge increases the chance of deploying solutions that are fit for purpose. That is because BRF+ consultants need to listen and understand the business requirements and provide feedback through prototype simulations. Existing HR knowledge based on past experience could be a barrier. The interaction between the HR module expert and the BRF+ expert can trigger Q&A sessions that would otherwise never happen. This synergy improves the quality of the business requirements and at the same time enhances the module knowledge of BRF+ professional.

With Business Rule Framework you learn how to translate business requirements for complex decision making into working prototypes. This prototype then gets approved by using the powerful BRF+ simulation functionality. The deployment after the prototype approval becomes a relative easy task that any developer with object oriented ABAP experience can solve.

Another BRF+ advantage is the interchangeable functionality between ECC and S/4 HANA platforms. In theory the BRF+ applications built in ECC can be re-used in S/4 HANA, as long as you use the data dictionary binding that is valid in both systems.
When working on a ECC platform some tables and fields will not be available in S/4 HANA. If you avoid using them in ECC then you increase the likelihood that the BRF+ functions will work on both platforms.

When you have BRF+ experience you can use this to your benefit when you work for clients that are not even aware that this exists.

When you start at a new client and you have to solve a complicated puzzle, then persuading management to switch on BRF+ in a sandbox system might be the hardest hurdle to overcome. Often you will realise that it takes weeks (or even months) to get approval to use the tool, as many fear the unknown. Also they will doubt that BRF+ has hardly any disadvantages.

So apart from learning the BRF+ you also need to learn how to sell the tool to managers.

Practical Advice

BRF+ and variant configuration with IBase

  • November 7, 2019November 7, 2019
  • by Isard Haasakker

Many businesses running SAP will use the variant configuration functionality to limit the number of materials in the system while offering a wide range of options how to configure the material at sales order entry.

For example, you can have one material representing a car and decide upon the module, engine size and colour when the customer places its order.

The variant configuration is based on classes and characteristics and stored in the database using Installed Base Management (IBase).

You can easily retrieve the details of the IBase via the function module CUCB_GET_CONFIGURATION, which is advised to use when you are not collecting data from the SAP database within BRF+ functions.

But when you are using the database lookup expression, then you need to know which tables to access and how to get specific characteristic values.

Here a list of IBase tables:

  • IBIB: Basic data
    Identifies for what purpose the IBase is used, e.g. variant configuration.
  • IBIN: Instance
    Provides the link between the IBase data and  the variant configuration of a sales order item.
  • IBINOWN: Owner of the instance
    Identifies whether the instance is linked to a sales order item (Make-to-Order) or plant (Make-to-Stock), etc.
  • IBINVALUES: Characteristic values of an instance
    The overview of values associated to the instance, e.g. the characteristics with values for a configurable sales order item.
  • IBSYMBOL: Characteristic value combinations
    List of values linked to characteristics.

Imagine you want the value of a specific characteristic maintained for a material in the sales order item and you want to use the database lookup expression in BRF+.

Then you need to approach the database from two angles.

First, you use the internal reference of the configuration of the sales order item to access the IBase instance (VBAP-CUOBJ = IBIN-INSTANCE). Be aware that multiple IBase records can exist for the same instance when you make changes to the configuration in the sales order item. If you want the most recent configuration details, then select the IBase record with the end date set to infinity (IBIN-VALTO = 31-DEC-9999). This allows you to access the characteristic values of an instance (IBINVALUES).

Next, use the specific characteristic name (CABN-ATNAM) to get the internal reference of that characteristic to match the IBase symbol (CABN-ATINN = IBSYMBOL-ATINN). If such a match is found, then you can try to access the characteristic values of an instance (IBINVALUES).

When you are successful in accessing the characteristic values of an instance (IBINVALUES) via the sales order item (VBAP) and characteristic (CABN), then you found the characteristic value used in the variant configuration of the material in the sales order item (IBSYMBOL-ATWRT). You can then store this result in a BRF+ element as input for decision making.

Practical Advice

When to create a BRF+ function

  • November 6, 2019
  • by Isard Haasakker

Many decisions are being made in the SAP system and Business Rule Framework is the ideal tool to control complex decision making without having any coding skills. However, that does not mean that BRF+ should be used for all decision making.

There are 5 main reasons why BRF+ would be a logical choice:

  • Business rule that can be re-used on different platforms
    Validation of master data could be valuable when executing transaction codes, Fiori apps, data load using the migration cockpit or when processing an inbound interface. As soon as you can access ABAP code then you can use same BRF+ function, allowing you to assure one version of the truth.
  • Business rule that is likely to change in time
    A phased introduction of new functionality will trigger new rules for decision making after deployment. In those circumstances you save time when using BRF+ functions, especially when the signature anticipates all data required for future decision making.
  • Single complex business rule
    When a single decision requires hundreds lines of code, then it makes more sense to create a BRF+ function. The simulation capability within Business Rule Framework would be more user friendly compared to debugging ABAP code.
  • Set of business rules to define a specific result
    A decision can be based on preceding decisions sequentially. You can replicate this within Business Rule Framework by calling BRF+ functions within BRF+ functions. This can also be easily simulated how you derive to the final decision, which is much more user friendly than ABAP debugging.
  • Set of business rules influencing each other
    A decision can be based on preceding decisions in parallel. This complex set of cause and effect are by definition a minefield when you try to do this with ABAP code. It can happen that you have to execute one specific BRF+ function multiple times because the results can influence other BRF+ functions. The need to construct this complex set of rules is very rare, but when they exist then trying to code this cause and effect in ABAP quickly becomes a mission impossible.

This is a great checklist to decide when to use Business Rule Framework.

The advice is to use BRF+ when the business requirements hint that at least 2 of the reasons listed above apply.

When you decide to incorporate Business Rule Framework in the solution design, then building a prototype for decision making should start as soon as business requirements are known. This prototype can be used to check whether these requirements are accurate and complete. If so, then the prototype can already be used to check if the decision making process offers the expected results. If the prototype is approved by the business users performing the acceptance testing, then the most complex part of development is already under control before a functional specification is written. An approved prototype also builds the trust at a very early stage that the final solution would be fit for purpose.

Practical Advice

How to simulate the condition technique with BRF+

  • November 5, 2019
  • by Isard Haasakker

The SAP condition technique allows you to control decision making via configuration and master data.

It will be a set of condition types, access sequences and condition tables and a vital part of pricing and output determination.

Depending on the complexity of pricing, you could run out of the available condition tables. You might decide in those circumstances to use Business Rule Framework.

The SAP standard condition tables for the price condition type PR00 has the access sequence PR00 with the following condition tables:

  • #1: Condition table A005 = Sales organisation, distribution channel, sold-to party, pricing reference material
  • #2: Condition table A006 = Sales organisation, distribution channel, price list, document currency, pricing reference material
  • #3: Condition table A004 = Sales organisation, distribution channel, pricing reference material

When using hierarchical access, then you do not need three condition tables because you merge them into one. Then you configure the sequence in reading this single table to get the correct pricing master data.

Hierarchical access can be replicated in BRF+ using a single decision table and three rulesets within a function.

The first step within Business Rule Framework is to create a data element for the pricing result for the price condition type PR00.

When you want to return 5 pound sterling per 1 piece, then:

  • Rate = 5
  • Currency = GBP

The rate and currency are linked when creating a element that is linked to the SAP data dictionary data element KBETR.

In this example we assume that all prices will be per 1 piece.

Then you create decision table with the following columns:

  • Sales organisation (VKORG)
  • Distribution channel (VTWEG)
  • Price list (PLTYP)
  • Document currency (WAERS)
  • Sold-to party (KUNNR)
  • Pricing reference material (MATNR)
  • Price (KBETR)

Notice that the last column is the result. There can only be one result that can be returned by the decision table.

You now can fill the decision table with data.

Next step is to create a BRF+ function that will contain three rulesets. Each ruleset will refer to the same decision table, but uses a different key to find a price.

Ruleset #1 looks in the decision table where the Sales organisation, distribution channel, sold-to party and pricing reference material matches the values received in the BRF+ function signature.

If no match was found, then ruleset #2 will try to get a price using sales organisation, distribution channel, price list, document currency and pricing reference material.

When that also failed, then ruleset #3 examines the decision table using the sales organisation, distribution channel and pricing reference material.

Obviously no result will be returned when all rulesets did not find a price.

Posts navigation

1 2 3 4

Recent Posts

  • BRF+ at the centre of your excellence
  • IDOC monitoring triggering BRF+ requirements
  • Why your business is not aware of BRF+

Categories

  • Be Prepared
  • Career Opportunities
  • Get Informed
  • Practical Advice
  • Training Courses
  • Uncategorized
Theme by Colorlib Powered by WordPress
This site uses cookies: Find out more.