For a recent internship we thought about the potential and capabilities of Machine Learning. We looked at it from a new business perspective and how we, as an innovative company, would be able to get experience with this new software technology. This brought us to a use case where we, as a company who optimizes business processes, wanted to further automate and simplify the day to day workflow of our clients.

What’s our business case?

With SAP in our mindset we wanted to create a project where we could integrate Machine Learning into our own SAP-backend. We came up with a business case in which we wanted to automate the decision making of PO’s (Purchase Orders). This Machine Learning decision was then passed towards the users of SAP MyInbox. So the process of accepting or declining Purchase Orders, will be optimized and works more swiftly.

We also thought about a second option, in which we wanted to fully automate this process, by letting the Machine Learning make the decisions. But from our internal research we concluded that many companies still like to have a manual control on matters which could potentially involve a huge amount of responsibility.

Figure 1: Visual representation of our first idea

Figure 1: Visual representation of our first idea

What were our goals for this project?

  • Get a good insight into the Machine Learning capabilities;
  • Explore the different Machine Learning platforms:
    • Google Tensorflow (Keras);
    • SAP Leonardo
    • Apache MXnet;
  • Investigate the possibility to integrate/connect external Machine Learning platforms into SAP;
  • Research the possibilities of the different kinds of neural networks:
    • ANN (Artificial Neural Network)
    • RNN (Recurrent Neural Network)
    • CNN (Convolutional Neural Network) (image recognition)
    • SOM (Self-Organizing Maps)
    • BM (Boltzmann Machine)
    • Auto Encoders;
  • See what opportunities Machine Learning has to offer from a business process optimization point of view.

What technologies did we evaluate ?

We researched three different Machine Learning platforms: Google Tensorflow, SAP Leonardo and Apache MXnet.

SAP Leonardo already offers a wide scale of predefined Machine Learning algorithms, but for this project we needed an algorithm that could give us a decision making output. The fact is that currently Leonardo offers lots classification and recognition algorithms, but there currently is only 1 time prediction algorithm available. Because we needed a 'yes' or 'no' decision algorithm, which is not available yet, we decided not to use Leonardo.

Google’s deep learning platform, which is called Tensorflow, offers a wide variety of algorithm libraries which can be used for free. This is because unlike SAP Leonardo, Tensorflow is an open source platform. There are also lots of libraries available for data science, these can be used for modifying and/or monitoring the data you are working with. It also provided us with the flexibility to alter the decision making algorithm to our needs. We also used Keras, which is a simplified layer for Tensorflow, which Google uses to encourage more users to experiment with their Machine Learning platform.

This made us eventually choose Google Tensorflow for our first jump into the era of Machine Learning.

Which neural network did we use?

Furthermore, after our research into machine learning, it was decided to set up an ANN (Artificial Neural Network) and not a CNN (Convolutional Neural Network). This because a CNN is meant for e.g. recognizing photographs which clearly does not apply to our use case. The RNN (Recurrent Neural Network) was not chosen because it is used for predictions where time plays a very important role, which is why it’s not applicable to us. We also researched the possibility of the self-supervised neural networks: Auto-encoders, Boltzmann Machines and SOMs (Self-Organizing Maps). But these often turn out to be very complicated and still in development, with lots of problems being encountered during the implementation.

Artificial neural network

Within an artificial neural network we enter our data within the input layer. We can see on the image below that not all inputs of the ANN are connected to the neurons in the hidden layer. Some neurons take into account all input nodes and some neurons are only connected to 1 input node. The machine makes new calculations within these neurons in the hidden layers and these calculations become new parameters for our decision. All these new parameters collide into the end node in the output layer, where a final calculation is made which leads to a decision(output) being formed.

Figure 2:  Example of an artificial neural network

Figure 2: Example of an artificial neural network


Model creation and connection to SAP

After our research into the different platforms and neural networks it was time to implement. We wrote our model in Python using the Keras libraries and the Spyder 3 IDE, this allowed us to visually represent our data so we knew what we were editing. The model was trained using data from 20.000 Purchase Orders for testing purposes, but in reality this number should be much higher (500.000+). We could not use that many data due to performance issues we encountered. But to compensate for that we made the model self-learning from the new decisions of the users.

This model was then made available as a REST-API on virtual private server, so we could approach our data from the SAP-backend. We tested our REST-API with postman and perfected the code before we connected it with our SAP-Backend.

Figure 3: Our test with postman being succesfull

Figure 3: Our test with postman being succesfull

We made a new extended version of SAP MyInbox were we added an extra field with the Machine Learning decision, which you can see on the image below.

Figure 4: Extended version of MyInbox with the extra machine learning field

Figure 4: Extended version of MyInbox with the extra machine learning field


The model relearns all data every 24 hours when new data from Purchase Orders was entered. This way the model keeps learning from the decisions made by the users so it can give even better predictions.


During the implementation of the model we noticed that Machine Learning is a feature that’s still in development. Although you can find lots of interesting lecture about Machine Learning, it’s still hard to find valuable information about the implementation part of the neural network. Google is trying to make the feature more accessible, but it’s still a work in progress.

The connection between the external Machine Learning server and SAP-backend requires a good SAP knowledge, but our great team managed to address all the issues we encountered. This lead to us successfully finishing our project.

We also noticed that the business is still a bit eager to use these Machine Learning models for decision making. Because the company which uses it has the feeling they are losing some sort of control on the matter. So it still has a trust issue that needs to be overthrown, and we as an innovative company will try to help it do that over time!

For questions or additional information on this subject, please contact Wouter Van Peteghem.

Thanks to Nicholas Vermeersch for writing this article.