Cancellation Prediction of Production Order in Machine Learning Cockpit
In the world of production planning, where uncertainties hang in the air and risks lurk around every corner. Picture this: a magical crystal ball that grants you the power to peer into the future and anticipate potential production order cancellations. Now, get ready to be captivated by the extraordinary Machine Learning Cockpit in SAP Business ByDesign! This revolutionary application harnesses cutting-edge technologies to unveil the hidden risks of production order cancellations, empowering you to steer clear of any potential disasters. Brace yourself for a thrilling journey where foresight meets innovation!
Just as a crystal ball offers tantalizing glimpses into what lies ahead, the Machine Learning Cockpit taps into the power of historical data to predict the likelihood of production order cancellations. But here’s the real enchantment: these predictions materialize right before your eyes, seamlessly integrated within the Production Order document, empowering you to take swift and decisive action.
Say goodbye to uncertainties and welcome to Machine Learning Cockpit. With this innovative solution at your fingertips, you gain the power to proactively address high-risk production orders, averting disruptions, reducing costs, and enhancing operational efficiency. It’s as if you have your very own crystal ball, guiding you through the intricacies of your business processes.
After reading this blog post, make sure to check the links at the end to get your hands on my other blogs related to Machine Learning Cockpit use cases.
You must have the authorization to access the following work center/ work center views:
- Business Analytics
- Machine Learning Cockpit
- Production Control
In this blog, we’ll go through all the steps to make predictions with the help of Production Orders data source where predictions can be consumed in the General tab of Production Orders document.
Now to give you an overview, firstly we’ll cover the creation of a scenario, which is a set of data and parameters that are used to create and train a machine learning model.
Next, we’ll dive into the model building and training process. We’ll walk through the steps to create and train your own model, so you can get accurate predictions.
Once you have your model, we’ll see how to create and execute a prediction run. This will allow you to see your model in action, making predictions based on your specific data.
Finally, we’ll look at how to view your predictions in the Production Order UI. This will give you a visual representation of your data, making it easy to understand and work with. By following these steps, you’ll have a comprehensive understanding of how to implement the solution end-to-end.
So, let’s get started with steps to create a new Scenario in Machine Learning Cockpit.
To create a new scenario, navigate to the Machine Learning Cockpit work center and select the Scenario work center view. This is where you will find all the existing scenarios and be able to create new or edit existing ones
Once you’re in the Scenario work center view, click the “New” button to create a new scenario. This will open a new window where you can enter the details for your new scenario. Name your scenario and make sure it starts with the letter Z, e.g., Z_PO_CANCELLATION, otherwise the tool will throw out an error as By Design has this rule for all user defined scenarios.
You should now select the data source that you want to use for your scenario in the Data Source field. For this case select “Production Orders/Lot: Dates and Quantities”
Then you must select the field that you want to predict in the Target Field section,” Production Order Status” in this case.
Next, from the list of work center views, select the Work Center View ID. For example,” Production Orders”. If there are no work center views in the list, it means that there is either no report created for the “Production Orders” data source or none of the reports have the work center view assigned.
Moreover, under Input Field Selection, you should select the fields to be included in the training which may contribute to decide the outcome of Target field. I recommend selecting more fields in scenarios and decide about final selection in the model, based on data distribution statistics. Make sure to avoid fields that contain either ID or data from past years which is not helpful for new items, or which have data for only one outcome and null values for others and so on. You may refer to Technical Specification | SAP Help Portal and read details about the fields for Production Order– Cancelation Prediction use case.
To restrict training data to items for which the business outcome is already known, add Filter Conditions. For this scenario, use Production Order Status = “Canceled”, “Started”, “Finished”, “Closed”
That’s all. You have completed the first step and now your scenario is ready to have models built on it. Let’s go through the next section Model Management to understand how to build and train a model.
There are 3 sections here – model creation, data pre-processing and model training. Data pre-processing is a major step before model training. Raw data might contain many garbage values or no value at all which may lead to training failure or inefficient training and low accuracy. This is not what we want.
Don’t forget to check out the Model – Outliers Removal section in online Help Portal for more information. With a little tweaking, you can ensure that your data is clean and ready to be used in your models.
Great job! Now our model is trained and tested. It’s the time to run predictions on unreleased outbound deliveries. Prediction Run Management section below explains that in detail.
Prediction Run Management
This is the process for which we were preparing the data. To get started with Prediction Runs, you first need to create two extension fields in the Production Order document UI in business context Production Order – Material Output Details:” Cancelation Prediction” and “Cancelation Probability”. My recommendation would be to use field type ‘Extended Text’ and ‘Decimal Number’ respectively. Later, these fields will be used to map the prediction results to be able to view them in the Production Order UI. You can read more about creating an extension field in SAP online Help portal.
Once you’ve created these fields, navigate to Prediction Run and select New to create new prediction run. This is where you’ll set the name and scenario for your prediction, for e.g., Z_PO_CANCELLATION_PREDICTION. Also, map the extension fields “Cancellation Prediction” to Prediction Outcome and “Cancelation Probability” to Prediction Probability: to the appropriate prediction outcomes. You’ll also want to add a filter condition to restrict training data to production orders for which business outcome is not yet known for e.g., Production Order Status = “In Preparation”, “Released”
That was it. All the production orders in status “Released” or “In Preparation” should now have a predicted business outcome assigned to them and the probability of that outcome being true.
Now comes the exciting part – checking the prediction results!
You did it! These predictions can be viewed in both business documents and Business Analytics.
That’s how Machine Learning Cockpit can help by doing the analysis and prediction for you so that you can focus on important things like strategies, action items and customer relationship.
Feel free to post your questions or share your experience in comments about this use case of Machine Learning Cockpit for SAP Business ByDesign.
Do check out my other blogs related to Machine Learning Cockpit use cases by clicking the links below and stay tuned for more.