1. Introduction to Machine Learning In SAP
Machine Learning is a subset of Artificial intelligence where computers learn from data without being explicitly programmed, machines can read, learn and interact without human intervention.
The technology on which intelligent ERP are built in SAP S4 HANA as below:
- S4 HANA Backend Machine Learning Technologies (Integration with SCP)
- S4 HANA Embedded Predictive and PAI framework
Guiding principle on both above cases of Machine learning will be
1) Train the Model
2) Test the model
2. S4 HANA Embedded Predictive and PAI framework
One of the key enablers of this digital revolution to the predictive analytics suite is Predictive Analytics Integator (PAI). PAI Enables SAP applications such as SAP S/4 HANA to create and ship predictive use cases specific to Client Business. For e.g. from SAP S4 HANA 1709 on-premise edition, many use cases called predictive models that are available for the functionalities like Procure to Pay, Finance and Treasury, Project System, Order to Cash etc. Can be trained and consumed.
SAP worked closely with their Data Scientists to identify key business areas where predictive and machine learning techniques can be used to improve efficiency, reduce costs, and automate time consuming business processes
Through Predictive Model app we can view all the models provided by SAP for our customers to leverage as shown below:


We are going to discuss in detail about the new model provided by SAP in 1909 edition for finance predictive scenarios (FCLM_RDT_CAL1_V1) i.e. Check Assigned Liquidity Items.
3. Check Assigned Liquidity Items Scenario – Predctive model
Cash Manager categorizes cash flows by different liquidity items, such as cash flows from operations and cash flows from investment. By leveraging machine learning capabilities, Cash Manager can gain predictive insights into liquidity item by comparing actual and predicted results. The actual liquidity items that are assigned can then be replaced by the predicted liquidity items that are proposed by the machine learning service.
This predictive model helps the cash manager to assign correct liquidity item for the respective data source and enables him to analyse the liquidity position of his organization.
SAP has provided a new model from SAP S4 HANA On Premise -1909 as below:

Before training this predictive model, the following pre-requisite is mandatory
- All the Configurations related to Cash Management especially related to “one exposure” should be in place
- DATA origin from Source application should be activated and all these applications should have more transactional data to train the model

- Liquidity item defined in configuration settings and assigned

4. Train and Activate the Model
SAP S/4 HANA is shipped with preconfigured Predictive Scenarios to help customer run an intelligent enterprise. This model should be first trained on historical data before to produce predictive proposal.
We have to Train this model to produce a model version, retrain model versions, validate and activate predictive models in order to return a predictive result.
Main per-requisites to train the model is system should have more than 0 to 1000 historical records for the respective scenario to predict accurate results. If there a smaller number of data, the system will throw error and the model cannot be trained. Also, only one version of the model can be activated at one time though many versions can be created at same time.
When training the predictive model, consider the following:
- Use the data that corresponds to your business cases
Training the predictive model with data that is no longer relevant for your current business (for example, data that is too old or from exceptional cases) could impact the quality of your model. To improve, you can set filters to exclude irrelevant data from your training data sets.
- Train the model with a sufficient amount of data
A successful training requires a sufficient amount of data which is, according to your business cases, reasonably distributed among your key business dimensions. This helps the model learn the key aspects of your business and thus positively affects the model’s predictive capabilities. Insufficient data may result in a failed training. Therefore, we recommend that you conduct the training only after your systems (especially newly installed systems) contain a sufficient volume of business data. We recommend that you provide enough data records every time that you train the model.
- Train and activate the predictive model regularly to keep the model up-to-date
The amount of time required for each training depends on the volume of training data. Therefore, we recommend that you train the model during non-working hours (for example, at night).
- To Train the model, first select the filters shown below:Company Code : equal to 1710
Liquidity Item: Between BNK0001 to BNK0009:-
Then click it on activate, model will get activated with version 1 as shown below:

- Click it on the model version and view as per below:-
Execute the above selection criteria.
The result will propose the liquidity item for those source applications where no liquidity item has been assigned and also propose correct liquidity item for wrong liquidity items that are assigned in the source application line item.
Compare the Difference and accept the proposals
Compare the actual and predicted liquidity items dynamically and collectively. Depending on your business cases, the assigned liquidity items might not be exactly the same as the predicted liquidity items as proposed by the system. You can check the details by selecting a line of cash flow to confirm the information.
After comparing we have to accept the proposal and the system gives you a response telling you how many items are accepted. If you accept all the proposals and refresh the page, you might find that there's no flows with different liquidity items.
6. Conclusion
We should have basic Data Science knowledge to use the predictive models and gain better performance in SAP S4 HANA. Data Scientist should be able to tune the model and filter data to get better prediction quality. The model itself cannot guarantee the performance, the experts who use it are.