Adding commercial value with predictive analytics in SAP BW

5 December 2016

Peter Douglas

Peter Douglas

Senior Consultant

There is a perception that predictive analytics is a solution looking for a problem*. It is often not clear how this capability fits in to the great jigsaw puzzle of SAP systems and solutions. It’s also often not clear to business decision makers how this mysterious force can be harnessed to improve their enterprise processes. Let me open your eyes to the potential… 

In the past I would have explained that predictive analytics comes in several forms from an SAP perspective: from the “Predictive Analytics” tool to predictive algorithms running in SAP HANA using the “Predictive Analytics Library” (PAL). The selection and application of these tools or algorithm libraries would depend on the client’s use cases. Classic SAP Business Warehouse (BW) also has embedded functionality for predictive analytics in the form of “Analysis Process Designers” (APD). This could be used for regression and data mining, but the options were limited. This meant that there was a disconnect between the “New World” of HANA and all its enhanced capabilities and the “Old World” of BW due to the differences in user interfaces and toolsets.

Voyage to the New World 

The introduction of “HANA Analysis Processes” (HAP) in BW version 7.4 SP5 has vastly changed the way predictive is deployed in BW solutions. APDs can now be substituted for HAPs; apart from providing us with yet another acronym, what does this actually mean? The key point to note is that rather than a limited and prescribed list of algorithms being available, this time the power of the HANA “Application Function Library” (AFL) as well as open-source libraries in the “R” statistical programming language are now available for use. And what do I mean by “use”? Well, now we can embed AFL and R script in data flow transformations which provides massive potential to enhance data flows with more advanced analytics. Quite apart from the ultra-fast, optimised PAL algorithms delivered by SAP that run in-memory, we now have access to thousands of open-source algorithms in R. These are widely used globally within the science community and also increasingly in enterprise applications. 

Pete-Douglas-Predictive-analytics-december-2016-content-1.jpg

Figure 1: Example HAP scenario 

Example: fraud detection in supplier invoicing 

To help demonstrate the difference that a predictive algorithm could make to a BW data flow, here’s an example where fraudulent supplier invoices are detected. This type of fraud does occur and can be hard to detect, particularly if the fraudulent amounts are small and sporadic.

Old World: Supplier invoices received in ECC flow through to BW via batch processing and are transformed and aggregated before being presented in an invoice report. Potentially, an exceptions report is used which is based on heuristic business rules to flag potential fraudulent behaviour. This is accurate as long as the patterns that indicate such behaviour are understood and included in the business rules behind the report. If conditions change, then it could be that a number of supplier invoices are flagged as suspicious although they are quite legitimate. The business rules would then need to be revised and re-deployed or worse, ignored. 

New World: Supplier invoices flow from ECC to BW (on HANA, BW/4HANA, etc.) and are processed automatically by an HAP embedded in a data flow that feed the invoice report. This time, predictive algorithms kick in rather than heuristic business rules, which proceed to look for patterns in the invoice data that appear anomalous and therefore could be flagged as suspicious. The algorithms would have been tuned and refined using historical data and this process would be ongoing as new data arrived. Importantly, what constitutes anomalous behaviour would be decided by the algorithm and validated in an exception report by a human user. If the machine got the wrong answer, this would be taken into account for future processing. The machine would learn from its mistakes. 

So, in the “New World” there is no need to re-configure the business rules that deal with detection of fraudulent behaviour, since the predictive algorithm is constantly learning and refining its method for detecting fraud.

A quick demo

HAPs have nine predictive functions available as standard. I applied the “Anomaly Detection” function (0BW_OPER_OUTLIERS) to the dataset provided in the example diagram above to see whether it could truly pick out the anomalous invoices. In order to set this up, I created a small BW data flow to load the transactional invoice data into a DSO as the source for the HAP. For convenience, the output went to a persisted “Analytic Index”, although this could have been another DSO. To compare the results with an industry standard I also processed the same dataset using the “outliers” library in R. 

Pete-Douglas-Predictive-analytics-december-2016-content-2.jpg

Figure 2: BW on HANA HAP setup 

The results are shown below. As you can see, both the R and HAP algorithms identified the cluster of anomalous invoices up in the top right of the scatter plot, although there were some small differences due to a slight difference in the algorithms. What this does show is how useful it can be to be able to test the outputs of an HAP with an alternative but similar benchmark. 

Pete-Douglas-Predictive-analytics-december-2016-content-3.jpg

Figure 3: Comparison of performance of outlier detection algorithms: SAP vs. R. Detected outliners are coloured in red.

Deploying this capability in your business 

If you have BW on HANA above version 7.4 SP5 or indeed BW/4HANA, then you already have this capability. The next step is to work to identify areas of your business that would benefit from advanced or predictive analytics. If needed, a small “Proof of Concept” (PoC) can then be built that tests whether useful results can be achieved by the application of this technology, before you take the plunge to fully integrate it with your BW landscape. It’s often a good idea to run a PoC or a pilot on the timescale of a few weeks, as this ensures the value of these seemingly complex solutions can be quantified and demonstrated to the business as quickly as possible. 

SAP continues to commit to building predictive analytics into its product suite and this is undoubtedly a good thing for all businesses who invest in the newest technologies that SAP has to offer. Both algorithms and computer power are constantly improving and so the quality of predictive processes will also keep improving and new use cases where predictive can play a valuable role will continue to emerge.

*The optical laser was also considered to be a solution looking for a problem, back when it was invented in 1960. The rest, as they say, is history. 

 

View comments

Comments

Blog post currently doesn't have any comments.

About the author

Peter Douglas

Senior Consultant

Focused on helping businesses gain valuable insight from their enterprise data through the delivery of solutions in predictive & advanced analytics.

Since arriving at Bluefin, Peter has had the pleasure of being part of challenging and rewarding projects across the Consumer Business, Manufacturing and Pharmaceuticals industries, for some well-known global names. His primary focus is working with clients to understand and exploit the power of emerging capabilities in advanced analytics and apply this to their business needs. His skills and hands-on experience span a range of SAP technologies, such as HANA / BW, Predictive TPM and CRM.

Peter’s passion for all things “Data Science” manifests itself in championing the predictive & advanced analytics ecosystem of SAP tools as a great opportunity for clients to tap into the power of their data to answer targeted business questions with accuracy and insight.

His previous life as a Quantum Physicist and PhD Grad has left Peter with old habits: in everything he does he loves testing theories and experimenting with new ideas and technology. He’s also addicted to continually learning new things.

Outside of work Peter enjoys life in London and, when he can, explores the World.