Skip to Content
Technical Articles

PAi Series Blog 3: Training and Activating the out of the box predictive content shipped by S/4HANA

Welcome to the third installment in the PAi and S/4HANA Blog series. Since S/4HANA Cloud version 1705, and S/4HANA On Premise version 1709, we have been embedding predictive content in to various S/4HANA processes including Sales, Finance, Procurement, Logistics and Project Management.

These Predictive Scenarios are delivered as standard content and I have listed some of them below:

CE = SAP S/4HANA Cloud Edition
OP = SAP S/4HANA On Premise
Fig 8: Predictive Scenarios by S/4HANA Release

 

OK – for S/4HANA Cloud customers we can dive right in, but for the S/4HANA On Premise customers, please ensure you have completed the installation and configuration steps outlined in previous week’s blogs 1 & 2.

Roles and Authorizations:

The first thing you need to do is check that you have the correct role to access the Predictive Models Fiori tile. The role required is SAP_BR_ANALYTICS_SPECIALIST – Analytics Specialist. Once the role is assigned, you can go ahead and add the specific tile from the APP Finder in Fiori Launch Pad.

Go to App Finder and look for “Predictive Models” and “Predictive Scenarios” Apps. Add these to the Predictive Models group.

 

Fig 1. S/4HANA App Finder

 

You’ll now see the Predictive Models Group with the Predictive Models and Predictive Scenario tiles on your Fiori Launch Pad.

Fig 2. Predictive Models Fiori Tiles

Predictive Scenario Overview:

Depending on the version of S/4HANA you are on, you’ll see several Predictive Scenarios. These Predictive Scenarios have been preconfigured by SAP S/4HANA to be used within your business processes. A Predictive Scenario is a template for a predictive use case which contains information about the algorithm, the training data set, and the target variable to be used to train the model. The Predictive Scenarios are linked to the appropriate business process application, so that the predictive results are consumed by the end user in their own environment.

These templates are robustly tested internally by a data scientist within SAP, using sample data from customers who are participating in our co-innovation programs. As you can see, we don’t ship trained models, but rather the ability for a customer to train models using their own data, based on these preconfigured details.

When you first open the Predictive Scenario Fiori Tile you will see a list of all of the Predictive Scenarios S/4HANA has shipped out of the box:

Fig 3. List Predictive Scenarios in Predictive Scenarios Tile

You will find information about the Predictive Scenario such as:

  • Predictive Scenario Settings including Training Dataset and Scenario Type:
Fig 4. Predictive Scenario settings
  • Input Variables to train the model:
Fig 5. Predictive Scenario Inputs
  • Output Variables returned when model applied:
Fig 6. Predictive Scenario outputs
  • Information about the Model such as algorithm used in this case Auto Regression:
Fig 7. Predictive Scenario outputs

 

For this Blog, I am going to focus on our first 2 Predictive Scenarios, namely in the areas of Procurement and Inventory Management. Details below:

Contract Consumption: Enables a buyer to predict contract consumption by analyzing contracts. The purchaser can analyze important information, such as expiring contracts, and proactively trigger sourcing activities, and negotiate better deals.

Fiori Tile: Purchasing Analytics -> Quantity Contract Consumption

Role: SAP_BR_BUYER

Stock in Transit: The “Materials Overdue – Stock in Transit” app gives an overview of the open shipments allowing business users to take action. With embedded predictive analytics, the app is enhanced with ‘Predicted Shipment Dates’ for each Goods Movement, to allow users to take action in managing delivery delays. Here historical data based on the earlier stock transit scenarios, and various other factors, are fed to the regression algorithm techniques, to arrive at a probable delay in the number of days.

Fiori Tile: Materials Management -> Stock Monitoring -> Overdue Materials (Stock in Transit)

Role: SAP_BR_INVENTORY_MANAGER

You can find further details on both Predictive Scenarios here.

Training and Activating your Model:

Once you open your Predictive Models Fiori App you’ll see a list of Predictive Scenarios.

Fig 9: List of Predictive Scenarios

In the “Models” tab you’ll then see the default model, and in the “Settings” tab you’ll see details of the Predictive Scenario Template.

Fig 10: Models Tab

Fig 11: Settings Tab

In the Models tab, select the default model, and select Train. You’ll then be asked to give a model description, and apply filters to the training data set if required:

Fig 13: Train a model

Fig 14: Model version created

The model is now in training, and you can select the arrow to check on the progress. The model can have a different status, at different times – Training, Error, Ready, or Active. An Error status can often be caused by lack of training data, or missing configuration steps, as outlined in Blogs 1 & 2.

Fig 15: Model Version Status

Once the status changes from Training to Ready, you can review the debriefing information for your model version. Debriefing information gives you information about the Quality of the model, including the Predictive Power, Predictive Confidence, and information on the variables that have the most impact on the model version.

Fig 16: Model Quality Overview

Once you are happy with the quality of your model, you can set it to Active. The model can be retrained, deactivated, or deleted at any time within in the Predictive Models Fiori tile.

Now you have an active model version, and you can start to see predictive results in the corresponding S/4HANA Application*

Fig. 17 Quantity Contract Consumption*

*Note for Contract Consumption scheduling of a batch job to generate scores is required. Details here

Fig. 18 Overdue Materials App – Stock in Transit

 

Now you know how to train and activate Predictive Scenarios shipped out of the box with S/4HANA. Stay tuned in the coming weeks we will start to go through how to approach predictive modeling, create your own models and publish them as NEW Predictive Scenarios in S/4HANA.

 

16 Comments
You must be Logged on to comment or reply to a post.
  • Hello Orla,

    Thank you very much for the brief but precise walk-through of the process.

    Just wanted to know, if is it feasible to leverage the standard Scenarios provided in S/4 HANA (Onpremise) in a customized (Z*) functionality?

    For example:

    1. If for a client the standard transactions for Inventory Management (related to Stock-in transit) are not suitable, hence customized transaction with required Z* tables have been developed.
    2. In the case if the client wants to leverage the Process Scenario, is it feasible to call the scenario through an Enhancement?

    Your input would help to further showcase adaptability of the out of box ML functionality in S/4 HANA – OP

    Thanks !!

    Hitesh Kapadia

    • Hi Hitesh,

      Good question and one we have not been asked before. When a Predictive Scenario is published it generates an ABAP class which can be used to call predictions in another application. You will find this in the top right hand corder of the Predictive Scenario over screen called “API Details” see beow picture:

      In fact in later releases if you add an Apply Dataset within the Predictive Scenario when publishing it will also generate an apply CDS view from 1809 onwards.

      Thanks,

      Orla

  • Hello Orla,

    Thank you very much for the answer.

    We would anlayze the suitability of the solution on the business cases we are considering and reach out to you here if we have any further question.

    Thanks,

    Hitesh

     

     

  • Hello Orla,

    Background:

    1. We are evaluating feasibility of how the out-of-box Predictive Scenarios in S/4 HANA – OP can be adopted for a Greenfield implementation
    2. In the case of Greenfield implementation the S/4 HANA – OP will not have “relevant” data in with the required ‘size’. It will have only migrated balances and open line items.

    Question:

    Is it feasible to train a pre-delivered model for an out-of-box Predictive Scenario (for S/4 HANA – OP) outside SAP S/4 HANA (e.g. may be on SAP HANA) and import to SAP S/4 HANA?

    Thanks for your guidence,

    Regards,

    Hitesh Kapadia

     

    • Hi HItesh,

      Unfortunately it is currently not possible to train a model to use in PAi outside the application. It is something we are looking in to in particular for where we want to combine S/4HANA and non S/4HANA data.

      However we have no committed delivery date as yet.

      Thanks,

      Orla

  • Hi Orla,

    We understand that following sequence steps are feasible

    1. Train an out-of-box model on one instance of S/4 HANA (e.g. Quality Assurance instance)
    2. Transport the trained model from the QA instance to another instance of S/4 HANA (in the same pipeline as in which the QA instance is)
    3. Start using the model in the Production instance (without further training on the production instance)

    Request you to confirm if our understanding is correct.

    Thank you very much,

    Hitesh

  • Hi Hitesh,

    The model needs to be trained on the productive environment. We do not have the ability to transport model versions.

    Also it is recommended to train the model version on the latest data which is generally in a productive environment and subsequent retrains can be done there.

    Thanks,

    Orla

     

     

  • Hi Orla,

    When can we expect the Blog 4 in the series on custom predictive use case development? Want to understand the licensing part of PAi when using out of the box shipped content by SAP vis-a-vis custom use case development using PAi?

     

    Thanks

    Sameer

  • I was able to get this deployed and can train models.  However, when I attempt to activate, it runs as “Activating” and then returns to “Ready” rather than “Active.”  I am not seeing the additional data available in the app.  I am working with Overdue Materials – Stock In Transit currently.   Any direction on where to start looking for a cause or what might be missing, incorrect, etc.?

    • Hi Chris,

       

      One cause could be a known issue with HANA Rev40. If you are on that version you will need a minimum of PAi 1.12 to resolve this issue.

      If that is not the case can you raise a ticket and the team will take a look.

       

      Thanks,

      Orla

  • Hello Orla!

    This series has been really helpful in understanding all about Predictive Analytics. I am trying to work on the financial predictive models available – FIN_STATEMENT_INSIGHT_APP_1 and FCLM_ALI, but I am unable to find documentation around its functioning and  usage. Are they part of PAi or are they an added service?

     

    Thanks,

    Yuvashree