# Switching on embedded AI in S/4HANA: prerequisites, activation and a rollout plan

> Know how SAP's delivered AI features in S/4HANA are licensed, switched on, trained and monitored per edition, and turn Calder's wish list into a rollout plan.

- Course: Orchestrate, Unit 23 · Joule and the AI platform: the architect's view
- Page: https://erpfde.com/topics/activating-embedded-ai-in-s4hana/
- Updated: 2026-11-29
- Reading time: Foundational 9 min, Deep 38 min

Independent learning resource. Not affiliated with, sponsored by or endorsed by SAP SE. SAP and other SAP products mentioned are trademarks of SAP SE in Germany and other countries.

## Foundational layer

### The 60-second version

S/4HANA ships with AI already inside it: summaries on object pages, predictions in sales and purchasing apps, extraction of sales orders from PDF purchase orders. None of it is on by default. Each feature is switched on by a mix of contract, configuration, roles and, for the predictive ones, a model trained on your own data.

How you switch a feature on depends on two things. The first is the **edition**. In S/4HANA Cloud Public Edition, SAP runs the system and switches Base features on after you accept its AI terms. In Private Edition, as for Calder Pumpworks (the course's fictional pump maker), your team runs much more of it. The second is the **kind of feature**. A generative feature needs a role. A predictive feature needs a role, enough history and a trained model. A premium feature also needs AI Units.

This topic gives leaders the questions that turn "SAP says it's included" into a dated rollout plan: what we may use, what we can switch on now, what we must test first, and what we must ask SAP.

### Why it matters to the business

Delivered features are the cheapest AI an S/4HANA customer can get: no build, no separate platform, often no extra licence. Many still stay unused, for reasons that are easy to fix once someone owns them:

- **Nobody accepted the terms or assigned the role.** In Public Edition, SAP's support note on Easy Filter describes a missing app that only appears after the AI terms are accepted and the business catalog is added to users' roles.
- **The model was never trained.** A predictive app without an active model shows nothing useful. SAP Learning notes that the sales performance predictions app shows predicted results as 0% when no model is active.
- **The data isn't there.** Predictive scenarios learn from completed history. SAP's notes ask for more than 1,000 completed sales documents for one scenario, and SAP Learning advises at least 2,000 records for another.
- **It went to everyone at once.** Without a pilot group, nobody can tell whether the feature saves time, and nobody owns the complaints.

A concrete case at Calder: the customer service team spends its mornings on blocked and incomplete sales orders. A delivered scenario that helps complete sales orders, and another that creates orders from distributors' PDF purchase orders, both look attractive. Whether Calder can use them depends on its edition, its data and the setup each one needs. This topic shows how to find out before anyone promises them.

### How SAP does it

As of November 2026, SAP's own pages describe four ways a delivered AI feature reaches an S/4HANA user.

| Kind of feature | Example | How it is switched on | Licence |
| --- | --- | --- | --- |
| **AI-assisted UI feature** (generative) | Smart Summarization, Easy Filter | Public Edition: accept SAP's AI terms once, then add an IAM app or business catalog to the users' business roles ([SAP KBA 3658326](https://userapps.support.sap.com/sap/support/knowledge/en/3658326)) | Base AI, no AI Units, for the features SAP lists as Base |
| **Embedded machine learning** | Sales performance predictions (scope item 2YJ), supplier delivery prediction (3FY) | Train the delivered scenario on your data in the **Intelligent Scenario Management** app, check its quality, activate it ([SAP Learning](https://learning.sap.com/courses/implementing-sap-s-4hana-cloud-public-edition-sales-automation-and-analytics-de/modelltraining-f-r-predictive-analytics-beschreiben-verkauf-2yj)) | Part of the standard S/4HANA licence, per SAP's [ISLM deck](https://assets.dm.ux.sap.com/in-clmday-2023/pdfs/islm_clm_day.pdf) |
| **Side-by-side machine learning** | Creating sales orders from unstructured data (scope item 4X9) | The model runs on SAP BTP; you create the BTP service and connect it to S/4HANA before training and activating | S/4HANA licence plus the BTP service it uses |
| **Premium AI features** | Joule in Private Edition, AI-assisted journal upload | Bought with AI Units, then set up per the feature's guide ([Joule product page](https://www.sap.com/products/erp/joule-with-sap-s4hana-cloud-private-edition.html)) | "AI Units are currently required," per sap.com |

The machinery behind the predictive features is **Intelligent Scenario Lifecycle Management (ISLM)**, SAP's framework for training, activating and managing machine learning scenarios inside S/4HANA. SAP released it with S/4HANA 2020 for on-premise systems ([SAP Community FAQ by SAP, 2021](https://blogs.sap.com/2021/05/09/intelligent-scenario-lifecycle-management-frequently-asked-questions/)), so it is there in Calder's Private Edition 2023 system too.

> **Note** Which features exist for which edition changes every release. Most of SAP's public step-by-step material is written for Public Edition. For Private Edition, confirm each feature with SAP's feature scope description for your release before you plan it. Joule itself is a BTP service with its own setup; see [Activating Joule across SAP products](https://erpfde.com/topics/activating-joule-across-products/).

### A rollout plan on one page

A rollout plan for embedded AI is a register: one row per feature, with the gates it must pass. The gates come from SAP's activation steps; the order comes from what each one blocks.

| Gate | Question | Who answers |
| --- | --- | --- |
| Edition | Does SAP state this feature for our edition and release? | Enterprise architect, from SAP's scope documents |
| Licence | Base, standard licence, BTP service, or AI Units? | Account manager and procurement |
| Prerequisites | Terms accepted, BTP service connected, communication arrangement set up? | Basis or BTP team |
| Access | Which pilot role gets the catalog or app, not everyone? | Security team and process owner |
| Owner | Which business person decides whether it stays on? | Process owner |
| Data | Do we have enough completed history of the right kind? | Data owner |
| Quality | Which number must the trained model reach before it goes live? | Process owner with the analyst |
| Operations | Who retrains it, how often, and who reads the quality trend? | Application support |
| Tests | Which test cases prove it works, including when the model is inactive? | Test lead |
| Human check | For generated or extracted output, where does a person check it before it is saved? | Process owner |

Each feature then lands in one of four places: **wave 1** (switch on for a pilot role now), **wave 2** (train and test in the quality system first), a **backlog** (prerequisites or data missing), or a **question for SAP** (edition or AI Units).

> **Note** **For functional consultants.** Embedded AI changes your work in four places. Configuration: some scenarios need settings such as training windows, and side-by-side ones need a service connection. Roles: the AI app or catalog goes into business roles, so role design and authorization tests include it. Test cases: add cases for "model not yet active" and for a proposal the user rejects. Data: a predictive scenario only learns from completed documents, so data cleansing and archiving decisions now change what the model sees.

### Questions to ask

1. Which delivered AI features does SAP state for **our edition and release**, and where is that written?
2. Which of them are Base AI, which come with the S/4HANA licence, and which need AI Units?
3. Which business role gets each feature first, and how many users are in it?
4. For each predictive scenario: how many completed records do we have, and how far back?
5. Which quality number must a model reach before go-live, and who decided that?
6. Who retrains the models, how often, and what happens when quality drops?
7. Where does a person check generated or extracted output before it is saved?
8. How will we know, after three months, whether the feature saved time?

### Common misconceptions

- **"It's included, so it's on."** Included means licensed. Somebody still accepts terms, assigns roles and, for predictions, trains and activates a model.
- **"Public Edition steps apply to Private Edition."** Much of SAP's step-by-step content is written for Public Edition. Private Edition customers run more of the setup and must check scope per release.
- **"A trained model stays good."** SAP Learning advises training and activating at least once a month for the sales predictions. Business changes, and a model trained on last year's mix drifts.
- **"Assign it to everyone and see."** Without a pilot role there is no comparison group, and no owner for wrong proposals.

### Key terms

- **Embedded AI:** AI features SAP delivers inside S/4HANA apps, as opposed to AI you build yourself.
- **Base AI:** SAP's term for AI capabilities included in eligible cloud subscriptions without AI Units.
- **AI Units:** SAP's consumption currency for premium AI features; see [AI Units and SAP's commercial model](https://erpfde.com/topics/ai-units-and-commercial-model/).
- **Intelligent Scenario Lifecycle Management (ISLM):** the S/4HANA framework that holds machine learning scenarios and their models, trains them and activates the version the apps use.
- **Intelligent scenario:** an SAP-delivered (or custom) object that ties a business app to its machine learning model.
- **Embedded vs. side-by-side:** an embedded scenario trains and runs inside the S/4HANA database; a side-by-side one runs on SAP BTP.
- **Scope item:** an SAP Best Practices package of a business process, such as 2YJ or 73P, that names the apps and configuration a feature needs.
- **Business catalog / IAM app:** the authorization objects that grant a user access to an app; adding them to a business role switches a UI feature on for that role.

### Check yourself

1. SAP's notes describe a Public Edition AI feature whose app is missing for users. What usually has to happen first?
   - A. An AI Core instance must be created on SAP BTP and connected to S/4HANA
   - B. Accept SAP's AI terms, then add the catalog or IAM app to the users' roles
   - C. The system must be upgraded to the next Public Edition release
   - D. A model must be trained in Intelligent Scenario Management

   Answer: B. For Base AI-assisted features in Public Edition, SAP's KBA says to accept the AI terms, then assign the business catalog or IAM apps to business roles. Training applies to predictive scenarios, not to UI features such as Easy Filter.

2. Calder runs S/4HANA Cloud Private Edition. A partner shows a Public Edition demo of a feature. What should the architect do before putting it in the plan?
   - A. Copy the Public Edition activation steps, since both editions share one code line
   - B. Ask the partner to rebuild the feature with BTP for Private Edition
   - C. Check SAP's scope documents for Private Edition 2023; ask SAP if silent
   - D. Wait for Calder's move to Public Edition before planning any AI feature

   Answer: C. Feature availability differs by edition and release, and most step-by-step material is written for Public Edition. The rollout register records an "ask SAP" verdict when SAP's sources don't state the feature for your edition.

3. A predictive sales app is switched on, but it shows predicted results as 0%. What is the likely cause?
   - A. The users' licence has no AI Units for the predictive scenario
   - B. The app needs Joule to be activated first
   - C. Generative output varies between runs, so it rounds down to zero
   - D. No trained model version is active for its intelligent scenario

   Answer: D. SAP Learning notes that the sales performance predictions app shows 0% when the prediction model isn't active or training failed. Predictive features need a model trained on your data and activated in Intelligent Scenario Management.

4. Why does the rollout plan give each feature to a named pilot role rather than to all users?
   - A. SAP's licence for Base AI only covers a limited number of users
   - B. It gives an owner, a comparison group and an easy way to stop
   - C. The business catalog can hold only a few users at a time
   - D. A broad assignment would make the model train on too much data

   Answer: B. Rolling out to a pilot role lets the owner compare the pilot team with colleagues who don't have the feature and handle wrong proposals. Nothing in SAP's notes limits user numbers; this is about proof and control.

5. Which question tells you whether a predictive scenario can work at all for a plant?
   - A. Whether the plant's users already work in SAP Fiori apps
   - B. Whether the scenario is listed in SAP's release highlights
   - C. Whether there is enough completed history of the right documents to train on
   - D. Whether the plant has its own BTP subaccount for analytics

   Answer: C. Predictive scenarios learn from completed history; SAP's notes name minimums such as more than 1,000 completed sales documents. Calder's Augsburg plant has no history in the S/4HANA system until its rollout, so its scenario waits for data.

6. Which feature in Calder's plan needs a purchase decision before any setup work?
   - A. Supplier delivery prediction for the Rockford buyers
   - B. Joule in S/4HANA Cloud Private Edition
   - C. Sales performance predictions for the sales analysts
   - D. Sales orders created from distributors' PDF orders

   Answer: B. SAP's product page says AI Units are currently required for Joule in Private Edition, and Calder holds none. The predictive scenarios come with the S/4HANA licence, and the PDF extraction uses a BTP service.

## Deep layer

### Mental model

Treat every delivered AI feature as a **switch with four locks**: a contract lock (licence and terms), a technical lock (services and connections), an access lock (roles) and, for predictive features, a model lock (enough data, a trained version that passes a quality bar). The edition decides who holds the keys: in Public Edition SAP holds some of them; in Private Edition your Basis, BTP and security teams hold most.

The architect's job is not to turn every key. It is to keep a register that says which locks are open for each feature, who holds the next key, and what evidence shows the feature is worth keeping on. Everything else in this topic fills that register.

### How it works

#### Four activation paths

```mermaid
flowchart LR
  W[Feature wanted] --> E{Stated for our<br/>edition and release?}
  E -->|no or silent| Q[Ask SAP]
  E -->|yes| L{Licence}
  L -->|AI Units, none held| Q
  L -->|Base or S/4HANA licence| K{Kind}
  K -->|UI feature| R[Terms + role]
  K -->|embedded ML| D[Data + train + activate]
  K -->|side-by-side ML| B[BTP service + connection<br/>+ train + activate]
  K -->|premium feature| P[Feature setup guide]
  R --> T[Pilot role, test, measure]
  D --> T
  B --> T
  P --> T
```

| Path | What you do, per SAP's sources | Who does it |
| --- | --- | --- |
| **UI feature** | Public Edition: accept the "SAP AI Terms for Base AI-assisted Features in SAP S/4HANA Cloud Public Edition"; SAP sends a confirmation email with the last-mile configuration; add the IAM app (recommended) or business catalog to the business roles ([KBA 3658326](https://userapps.support.sap.com/sap/support/knowledge/en/3658326), [SAP Learning](https://learning.sap.com/courses/implementing-sap-s-4hana-cloud-public-edition/using-the-ai-assisted-capabilities-in-the-sap-fiori-launchpad_fec17991-b3d6-4f7e-bb82-7abebd43cc02)) | Contract owner, then security |
| **Embedded ML** | Prepare data and any scenario settings, train in **Intelligent Scenario Management** (app F4470), check the version's quality, activate it; the business app then uses it ([SAP Learning, Utilities](https://learning.sap.com/courses/configuring-billing-and-invoicing-in-sap-s-4hana-utilities/understanding-machine-learning-for-outsorted-billing-documents)) | Analyst with the process owner |
| **Side-by-side ML** | As embedded, but first create the BTP service and its key, and connect S/4HANA to it; some Public Edition scenarios need a communication scenario that SAP activates by support case ([KBA 3632785](https://userapps.support.sap.com/sap/support/knowledge/en/3632785)) | BTP team, then analyst |
| **Premium feature** | Buy AI Units, then follow the feature's own setup ([AI Units topic](https://erpfde.com/topics/ai-units-and-commercial-model/)) | Account manager, then the feature's admin |

#### The model lifecycle in ISLM

SAP's ISLM material describes one lifecycle for every predictive scenario ([SAP CLM Day deck](https://assets.dm.ux.sap.com/in-clmday-2023/pdfs/islm_clm_day.pdf)): discover and check readiness, set up, train on customer data, analyze quality, deploy (side-by-side only, per SAP's FAQ), and activate. Activation is a separate, explicit step: it decides which trained version the business application uses.

```mermaid
sequenceDiagram
  participant A as Analyst
  participant M as Intelligent Scenario<br/>Management (F4470)
  participant H as HANA (APL/PAL)<br/>or BTP service
  participant U as Business app
  A->>M: Train scenario (model)
  M->>H: Training job on history
  H-->>M: New version, status Ready
  A->>M: Read quality indicators
  alt good enough
    A->>M: Activate version
    M-->>U: App uses the active version
  else not good enough
    A->>M: Fix data or window, train again
  end
```

Three details from SAP's lessons shape the plan:

- **Version status.** A training run creates a new model version; when it reaches status *Ready* it can be activated, and SAP Learning says only the best version is activated.
- **Quality indicators.** For classification and regression scenarios in sales, SAP Learning names *predictive power*, *prediction confidence* (it recommends at least 95% before using a model for predictions) and *AUC*. Other scenarios show other measures; read the version report.
- **Cadence.** For the sales scenarios, SAP Learning recommends at least 2,000 records per training, training and activating at least monthly, and training outside working hours.

#### What "enough data" means

Each scenario learns from a specific slice of history, and that slice is narrower than people expect.

| Scenario | Data it learns from | Minimum SAP names |
| --- | --- | --- |
| `SLS_DOC_AUTO_COMPLTN` (scope item 73P), Public Edition | Sales documents with overall status *Completed*; not those of archived customers; not open orders | More than 1,000 records ([KBA 3697052](https://userapps.support.sap.com/sap/support/knowledge/en/3697052)) |
| Sales predictions (2YJ) | Quotations, orders, deliveries and billed revenue | At least 2,000 records per training (best practice) |
| `UTI_BI_OUTSORTD_DOC`, S/4HANA Utilities | Outsorted billing documents in a window set in table `TEML_OUTBILPARAM` | Not stated; the window is configuration |

Two consequences for an architect. Archiving and data cleansing change what a model can learn, so they belong in the same plan. And a company code or plant that joins the system later has no history in it, whatever it had in the old system.

#### Control points

| Control point | What you set | Evidence |
| --- | --- | --- |
| Contract | Terms accepted, AI Units bought | Signed terms, SAP for Me balance |
| Access | IAM app or catalog in a pilot business role | Role assignment report |
| Model | Active version and its quality | Version report in Intelligent Scenario Management |
| Output | A person checks generated or extracted output | Process design; acceptance and edit rates |
| Operations | Retrain cadence, owner, quality trend | Retraining log, quality per version |

### Build it yourself: Calder's embedded AI rollout plan

You will review Calder's wish list of eight delivered AI features for its S/4HANA system `CP10` against ten gates, and turn it into a rollout plan with waves. The script finds the design errors in a partner's draft, shows what still blocks each feature, and writes the plan as a document.

```mermaid
flowchart LR
  D[register_draft.json] --> S[embedded_ai_rollout.py]
  R[register_reviewed.json] --> S
  S --> V[verdict per feature]
  S --> M[embedded_ai_rollout.md<br/>plan by wave]
```

**Before you start:** complete [Set up your computer for this course](https://erpfde.com/topics/set-up-your-computer/) and [Set up for Unit 23](https://erpfde.com/topics/set-up-for-unit-23/). This topic needs nothing from the setup beyond the `unit23/` folder.

> **Note** New words. A **register** is a JSON file (a text format of names and values) with one entry per feature. A **gate** is a rule the entry must pass, numbered `R01` to `R10`. A line is `OK`, `WARN` (risky, doesn't block), `TODO` (do it next), `ASK` (a question for SAP or the account team) or `FAIL` (a design error). The **verdict** per feature is one of `READY`, `PILOT`, `HOLD`, `TODO`, `BLOCKED: DATA`, `NEEDS AI UNITS`, `ASK SAP: EDITION` or `FIX DESIGN`.

#### What you need

- Your course folder `orchestrate-course` with `.venv`.
- 30 to 45 minutes. Free; no account, no network, no SAP system.

#### Calder's wish list

Calder's `CP10` runs on S/4HANA Cloud Private Edition 2023 (see [landscape and deployment options](https://erpfde.com/topics/landscape-and-deployment-options/)) and holds no AI Units. These are the features its process owners asked for:

| ID | Feature | Asked for by | Kind |
| --- | --- | --- | --- |
| E01 | Smart Summarization on object pages | Sales operations manager `00100296` | Generative UI feature |
| E02 | Sales document completion (`SLS_DOC_AUTO_COMPLTN`, 73P) | Sales operations manager `00100296` | Embedded ML |
| E03 | Sales performance predictions (F3304, `SALESVOLUME001`, 2YJ) | Inside sales rep `00100266` | Embedded ML |
| E04 | Supplier delivery prediction (3FY) for `CP11` purchasing | Buyer `00100211` | Embedded ML |
| E05 | Slow and non-moving stock (20N) for `CP21` Augsburg | Demand planner `00100298` | Embedded ML |
| E06 | Sales orders from unstructured data (4X9) | Customer service clerk `00100265` | Side-by-side ML |
| E07 | Joule in Private Edition | Enterprise architect `00100290` | Premium (AI Units) |
| E08 | AI-assisted journal upload | G/L accountant `00100310` | Premium (AI Units) |

> **Note** Calder is fictional. Record counts, quality values and role names (`ZB_..._PILOT`) in the registers are course values. Which edition each feature is stated for comes from the SAP sources in this topic as read on 29 November 2026; "listed" means an SAP overview names the scenario without confirming your edition and release.

#### Step 1: Open the course folder

1. Open VS Code, choose **File > Open Folder**, and open `orchestrate-course`.
2. Open **Terminal > New Terminal** and turn on the virtual environment if the prompt doesn't show `(.venv)`:

   - **Windows (PowerShell):**

     ```powershell
     .venv\Scripts\Activate.ps1
     ```

   - **macOS / Linux:**

     ```bash
     source .venv/bin/activate
     ```

3. Make sure the `unit23` folder exists:

   - **Windows (PowerShell):**

     ```powershell
     New-Item -ItemType Directory -Force unit23
     ```

   - **macOS / Linux:**

     ```bash
     mkdir -p unit23
     ```

#### Step 2: Create the rollout script

1. Create `unit23/embedded_ai_rollout.py`, paste the code below and save:

```python
"""Embedded AI rollout plan for Calder's S/4HANA system CP10 (Unit 23).

Run from your course folder:
    python unit23/embedded_ai_rollout.py --init               # write the two sample registers into unit23/embedded_ai/
    python unit23/embedded_ai_rollout.py                      # review the partner's draft register
    python unit23/embedded_ai_rollout.py --register reviewed  # review the reviewed register
    python unit23/embedded_ai_rollout.py --register reviewed --md          # also write unit23/embedded_ai_rollout.md
    python unit23/embedded_ai_rollout.py --register reviewed --edition public  # what-if: CP10 on Public Edition

Built-in Python only, no randomness, no account. Rules marked SAP restate SAP Learning, SAP Knowledge Base
Articles and sap.com product pages as read on 2026-11-29; rules marked course are course rules.
Calder Pumpworks is fictional and every count and quality value in the registers is synthetic.
Exit code 0 when nothing is FAIL, 2 when a design error is found.
"""
import argparse
import json
import pathlib
import sys

HERE = pathlib.Path(__file__).resolve().parent
FOLDER = HERE / "embedded_ai"
REPORT = HERE / "embedded_ai_rollout.md"
AS_OF = "2026-11-29"

CONTEXT = {"system": "S4P", "company_code": "CP10", "edition": "private", "release": "2023",
           "ai_units_held": 0, "test_system": "S4Q"}

ML = ("embedded-ml", "side-by-side-ml")
NEEDS_REVIEW = ("generative", "side-by-side-ml")  # features whose output a person must check before saving

ORDER = ["FIX DESIGN", "ASK SAP: EDITION", "NEEDS AI UNITS", "BLOCKED: DATA", "TODO", "HOLD", "PILOT", "READY"]
WAVES = {"READY": "Wave 1: switch on for the pilot role in S4P",
         "PILOT": "Wave 2: train and test in S4Q, then decide",
         "HOLD": "Wave 2: train and test in S4Q, then decide",
         "TODO": "Backlog: finish the prerequisites",
         "BLOCKED: DATA": "Backlog: wait for the data",
         "NEEDS AI UNITS": "Questions for SAP and the account team",
         "ASK SAP: EDITION": "Questions for SAP and the account team",
         "FIX DESIGN": "Fix the register before planning"}


def feature(fid, name, pattern, editions, source, licence, prereqs, access, data, quality, ops, tests, review):
    return {"id": fid, "name": name, "pattern": pattern, "editions": editions, "edition_source": source,
            "licence": licence, "prerequisites": prereqs, "access": access, "data": data,
            "quality": quality, "operations": ops, "test_cases": tests, "human_review": review}


def sample(reviewed):
    """Calder's register. The draft has the partner's errors; reviewed=True has them fixed."""
    pilot_sales = "ZB_SALES_ANALYST_PILOT"
    feats = [
        feature("E01", "Smart Summarization on object pages", "generative",
                {"public": "stated", "private": "not stated"},
                "SAP Learning, Public Edition course: IAM app F7924_SUM_TRAN or catalog SAP_CORE_BC_AIU_SUM_PC",
                "base",
                [{"item": "SAP AI terms for Base AI-assisted features accepted", "done": False, "edition": "public"}],
                {"grant": "F7924_SUM_TRAN", "assigned_to": "ZB_O2C_CLERK_PILOT"},
                None, None, {"owner": "00100296", "retrain_days": None}, 3, True),
        feature("E02", "Sales document completion (scenario SLS_DOC_AUTO_COMPLTN, scope item 73P)", "embedded-ml",
                {"public": "stated", "private": "not stated"},
                "SAP KBAs 3697052 and 3632785 (Public Edition)",
                "base",
                [{"item": "Communication scenario SAP_COM_1199 activated through a support case", "done": False,
                  "edition": "public"}],
                {"grant": "scope item 73P apps", "assigned_to": "ZB_O2C_CLERK_PILOT"},
                {"minimum": 1000, "minimum_source": "SAP", "available": 61000,
                 "note": "only sales documents with overall status Completed are used"},
                {"indicator": "quality indicator (owner's choice)" if reviewed else None,
                 "threshold": 85.0 if reviewed else None, "measured": None},
                {"owner": "00100296", "retrain_days": 30}, 3, False),
        feature("E03", "Sales performance predictions (app F3304, scenario SALESVOLUME001, scope item 2YJ)",
                "embedded-ml", {"public": "stated", "private": "listed"},
                "SAP Learning (2YJ lesson); SAP CLM Day 2023 deck lists 2YJ as an embedded ISLM scenario",
                "s4-licence", [],
                {"grant": "Sales Performance - Predictions",
                 "assigned_to": pilot_sales if reviewed else "all sales users"},
                {"minimum": 2000, "minimum_source": "SAP", "available": 144000,
                 "note": "billed invoice and debit memo items, 24 months"},
                {"indicator": "prediction confidence", "threshold": 95.0, "measured": 96.4 if reviewed else None},
                {"owner": "00100266", "retrain_days": 30}, 4 if reviewed else 1, False),
        feature("E04", "Supplier delivery prediction (scope item 3FY) for CP11 purchasing", "embedded-ml",
                {"public": "listed", "private": "listed"},
                "SAP CLM Day 2023 deck: embedded ISLM scenario",
                "s4-licence", [],
                {"grant": "scope item 3FY apps", "assigned_to": "ZB_P2P_BUYER_PILOT"},
                {"minimum": 2000, "minimum_source": "course", "available": 8600,
                 "note": "purchase order items with goods receipts at CP11, 24 months"},
                {"indicator": "quality indicator (owner's choice)" if reviewed else None,
                 "threshold": 80.0 if reviewed else None, "measured": None},
                {"owner": "00100211" if reviewed else None, "retrain_days": 30 if reviewed else None},
                3, False),
        feature("E05", "Slow and non-moving stock detection (scope item 20N) for CP21 Augsburg", "embedded-ml",
                {"public": "listed", "private": "listed"},
                "SAP CLM Day 2023 deck: embedded ISLM scenario",
                "s4-licence", [],
                {"grant": "scope item 20N apps", "assigned_to": "ZB_INVENTORY_PILOT"},
                {"minimum": 2000, "minimum_source": "course", "available": 0,
                 "note": "CP21 stock moves into CP10's system at the rollout on 2027-07-05"},
                {"indicator": "quality indicator (owner's choice)", "threshold": 80.0, "measured": None},
                {"owner": "00100298", "retrain_days": 30}, 3, False),
        feature("E06", "Create sales orders from unstructured data (scope item 4X9)", "side-by-side-ml",
                {"public": "listed", "private": "listed"},
                "SAP CLM Day 2023 deck (side-by-side); SAP demo script for S/4HANA 2023",
                "btp-consumption",
                [{"item": "SAP BTP Document Information Extraction service instance and key", "done": True},
                 {"item": "Service connection in S4P (ISLM) to that instance", "done": False}],
                {"grant": "Create Sales Orders from Unstructured Data", "assigned_to": "ZB_O2C_CLERK_PILOT"},
                None,
                {"indicator": "quality indicator (owner's choice)", "threshold": 90.0, "measured": None},
                {"owner": "00100265", "retrain_days": None}, 3, reviewed),
        feature("E07", "Joule in S/4HANA Cloud Private Edition", "joule",
                {"public": "not stated", "private": "stated"},
                "sap.com product page: AI Units currently required",
                "ai-units", [], {"grant": "Joule role content", "assigned_to": "JOULE_O2C_CLERK"},
                None, None, {"owner": "00100290", "retrain_days": None}, 6, True),
        feature("E08", "AI-assisted journal upload", "generative",
                {"public": "not stated", "private": "stated"},
                "sap.com product page: AI Units currently required",
                "ai-units", [], {"grant": "journal upload app", "assigned_to": "ZB_GL_ACCOUNTANT_PILOT"},
                None, None, {"owner": "00100310", "retrain_days": None}, 3, True),
    ]
    return {"as_of": AS_OF, "context": CONTEXT, "features": feats}


def check(f, ctx):
    """Return (lines, verdict). Each line is (status, rule, text)."""
    lines = []
    ed = ctx["edition"]
    stated = f["editions"].get(ed, "not stated")
    if stated == "stated":
        lines.append(("OK", "R01", f"{ed} edition stated by SAP"))
    elif stated == "listed":
        lines.append(("WARN", "R01", f"listed in an SAP overview; confirm the scope item for {ed} edition, release {ctx['release']}"))
    else:
        lines.append(("ASK", "R01", f"SAP's source names {[k for k, v in f['editions'].items() if v == 'stated']} only"))

    if f["licence"] == "ai-units":
        if ctx["ai_units_held"] > 0:
            lines.append(("OK", "R02", "AI Units held"))
        else:
            lines.append(("ASK", "R02", "AI Units required, none held"))
    else:
        lines.append(("OK", "R02", f"licence: {f['licence']}"))

    for p in f["prerequisites"]:
        if p.get("edition", ed) != ed:
            continue
        lines.append(("OK" if p["done"] else "TODO", "R03", p["item"]))

    who = (f["access"] or {}).get("assigned_to") or ""
    if not who or who.lower().startswith("all") or who == "*":
        lines.append(("FAIL", "R04", f"{f['access']['grant']} granted to '{who}', not a pilot role"))
    else:
        lines.append(("OK", "R04", f"{f['access']['grant']} -> {who}"))

    owner = f["operations"].get("owner")
    lines.append(("OK", "R05", f"owner {owner}") if owner else ("FAIL", "R05", "no business owner"))

    data_short = False
    if f["pattern"] == "embedded-ml" and f["data"]:
        d = f["data"]
        if d["available"] >= d["minimum"]:
            lines.append(("OK", "R06", f"{d['available']:,} records >= {d['minimum']:,} ({d['minimum_source']})"))
        else:
            data_short = True
            lines.append(("TODO", "R06", f"{d['available']:,} records < {d['minimum']:,} ({d['minimum_source']}): {d['note']}"))

    low = untrained = False
    if f["pattern"] in ML:
        q = f["quality"] or {}
        if not q.get("indicator") or q.get("threshold") is None:
            lines.append(("FAIL", "R07", "no quality indicator and threshold agreed before training"))
        elif q.get("measured") is None:
            untrained = True
            lines.append(("TODO", "R07", f"{q['indicator']} >= {q['threshold']}: not trained in {ctx['test_system']} yet"))
        elif q["measured"] < q["threshold"]:
            low = True
            lines.append(("WARN", "R07", f"{q['indicator']} {q['measured']} < {q['threshold']}"))
        else:
            lines.append(("OK", "R07", f"{q['indicator']} {q['measured']} >= {q['threshold']}"))
        days = f["operations"].get("retrain_days")
        if f["pattern"] == "embedded-ml":
            if days and days <= 31:
                lines.append(("OK", "R08", f"retrain every {days} days"))
            else:
                lines.append(("WARN", "R08", "no monthly retraining planned"))

    if f["test_cases"] >= 3:
        lines.append(("OK", "R09", f"{f['test_cases']} test cases"))
    else:
        lines.append(("WARN", "R09", f"{f['test_cases']} test case(s), fewer than 3"))

    if f["pattern"] in NEEDS_REVIEW:
        lines.append(("OK", "R10", "a person checks the output before it is saved") if f["human_review"]
                     else ("FAIL", "R10", "output is saved without a person checking it"))

    st = [s for s, _, _ in lines]
    if "FAIL" in st:
        verdict = "FIX DESIGN"
    elif lines[0][0] == "ASK":
        verdict = "ASK SAP: EDITION"
    elif any(s == "ASK" and r == "R02" for s, r, _ in lines):
        verdict = "NEEDS AI UNITS"
    elif data_short:
        verdict = "BLOCKED: DATA"
    elif any(s == "TODO" and r == "R03" for s, r, _ in lines):
        verdict = "TODO"
    elif low:
        verdict = "HOLD"
    elif untrained:
        verdict = "PILOT"
    else:
        verdict = "READY"
    return lines, verdict


def load(name):
    path = FOLDER / f"register_{name}.json"
    if not path.exists():
        sys.exit(f"No register yet: {path.name}. Run: python unit23/embedded_ai_rollout.py --init")
    try:
        return json.loads(path.read_text(encoding="utf-8"))
    except json.JSONDecodeError as e:
        sys.exit(f"A JSON file is not valid: {path.name} line {e.lineno}")


def write_md(reg, results, ctx):
    out = [f"# Embedded AI rollout plan: {ctx['company_code']} ({ctx['edition']} edition {ctx['release']})", "",
           f"As of {reg['as_of']}. Synthetic: Calder Pumpworks is fictional; counts and quality values are course values.", ""]
    for wave in dict.fromkeys(WAVES.values()):
        rows = [(f, v, ls) for f, v, ls in results if WAVES[v] == wave]
        if not rows:
            continue
        out += [f"## {wave}", "", "| ID | Feature | Verdict | Owner | Next action |", "| --- | --- | --- | --- | --- |"]
        for f, v, ls in rows:
            nxt = next((f"{r}: {t}" for s, r, t in ls if s in ("FAIL", "ASK", "TODO")), "switch on and measure")
            out.append(f"| {f['id']} | {f['name']} | {v} | {f['operations'].get('owner') or '-'} | {nxt} |")
        out.append("")
    REPORT.write_text("\n".join(out), encoding="utf-8")
    print(f"Wrote {REPORT.name}")


def main():
    ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
    ap.add_argument("--init", action="store_true", help="write the sample registers (never overwrites)")
    ap.add_argument("--register", default="draft", help="draft or reviewed (file unit23/embedded_ai/register_<name>.json)")
    ap.add_argument("--edition", choices=["private", "public"], help="what-if: review for another edition")
    ap.add_argument("--md", action="store_true", help="also write unit23/embedded_ai_rollout.md")
    a = ap.parse_args()

    if a.init:
        FOLDER.mkdir(exist_ok=True)
        for name, rev in (("draft", False), ("reviewed", True)):
            path = FOLDER / f"register_{name}.json"
            if path.exists():
                print(f"{path.name} exists, left as it is")
            else:
                path.write_text(json.dumps(sample(rev), indent=2), encoding="utf-8")
                print(f"Wrote {path.name}")
        return 0

    reg = load(a.register)
    ctx = dict(reg["context"])
    if a.edition and a.edition != ctx["edition"]:
        ctx["edition"] = a.edition
        ctx["release"] = "current"  # Public Edition releases follow SAP's cloud schedule
    print(f"Embedded AI rollout for {ctx['company_code']} ({ctx['edition']} edition {ctx['release']}) "
          f"as of {reg['as_of']} (synthetic), register: {a.register}")
    results, counts, fails = [], {}, 0
    for f in reg["features"]:
        lines, verdict = check(f, ctx)
        results.append((f, verdict, lines))
        counts[verdict] = counts.get(verdict, 0) + 1
        print(f"{f['id']} {f['name']}")
        for s, r, t in lines:
            if s != "OK":
                print(f"  {s:<5} {r}  {t}")
            fails += s == "FAIL"
        print(f"  => {verdict}")
    print(", ".join(f"{counts[v]} {v}" for v in ORDER if v in counts))
    if a.md:
        write_md(reg, results, ctx)
    return 2 if fails else 0


if __name__ == "__main__":
    sys.exit(main())
```

2. Write the two sample registers:

   ```bash
   python unit23/embedded_ai_rollout.py --init
   ```

   ```text
   Wrote register_draft.json
   Wrote register_reviewed.json
   ```

   The files are in `unit23/embedded_ai/`. Running `--init` again never overwrites them.

#### Step 3: Review the partner's draft

1. Run the review on the draft:

   ```bash
   python unit23/embedded_ai_rollout.py
   ```

2. Compare with the expected output (only lines that aren't `OK` are printed):

```text
Embedded AI rollout for CP10 (private edition 2023) as of 2026-11-29 (synthetic), register: draft
E01 Smart Summarization on object pages
  ASK   R01  SAP's source names ['public'] only
  => ASK SAP: EDITION
E02 Sales document completion (scenario SLS_DOC_AUTO_COMPLTN, scope item 73P)
  ASK   R01  SAP's source names ['public'] only
  FAIL  R07  no quality indicator and threshold agreed before training
  => FIX DESIGN
E03 Sales performance predictions (app F3304, scenario SALESVOLUME001, scope item 2YJ)
  WARN  R01  listed in an SAP overview; confirm the scope item for private edition, release 2023
  FAIL  R04  Sales Performance - Predictions granted to 'all sales users', not a pilot role
  TODO  R07  prediction confidence >= 95.0: not trained in S4Q yet
  WARN  R09  1 test case(s), fewer than 3
  => FIX DESIGN
E04 Supplier delivery prediction (scope item 3FY) for CP11 purchasing
  WARN  R01  listed in an SAP overview; confirm the scope item for private edition, release 2023
  FAIL  R05  no business owner
  FAIL  R07  no quality indicator and threshold agreed before training
  WARN  R08  no monthly retraining planned
  => FIX DESIGN
E05 Slow and non-moving stock detection (scope item 20N) for CP21 Augsburg
  WARN  R01  listed in an SAP overview; confirm the scope item for private edition, release 2023
  TODO  R06  0 records < 2,000 (course): CP21 stock moves into CP10's system at the rollout on 2027-07-05
  TODO  R07  quality indicator (owner's choice) >= 80.0: not trained in S4Q yet
  => BLOCKED: DATA
E06 Create sales orders from unstructured data (scope item 4X9)
  WARN  R01  listed in an SAP overview; confirm the scope item for private edition, release 2023
  TODO  R03  Service connection in S4P (ISLM) to that instance
  TODO  R07  quality indicator (owner's choice) >= 90.0: not trained in S4Q yet
  FAIL  R10  output is saved without a person checking it
  => FIX DESIGN
E07 Joule in S/4HANA Cloud Private Edition
  ASK   R02  AI Units required, none held
  => NEEDS AI UNITS
E08 AI-assisted journal upload
  ASK   R02  AI Units required, none held
  => NEEDS AI UNITS
4 FIX DESIGN, 1 ASK SAP: EDITION, 2 NEEDS AI UNITS, 1 BLOCKED: DATA
```

3. Read it as an architect would:
   - **Four design errors.** The draft gives sales predictions to "all sales users" (`R04`), names no owner and no quality bar for supplier delivery prediction (`R05`, `R07`), lets extracted sales orders be saved unchecked (`R10`), and plans sales document completion without a quality threshold (`R07`).
   - **Two features wait for money.** Joule and journal upload need AI Units; Calder has none (`R02`). The [AI Units topic](https://erpfde.com/topics/ai-units-and-commercial-model/) plans that purchase.
   - **One edition question.** SAP's step-by-step sources for Smart Summarization are Public Edition material. That is an ask, not a no.
   - **One data block.** Augsburg's stock is still in ECC; its history enters `CP10`'s system only at the rollout on 5 July 2027 (see [data migration strategy](https://erpfde.com/topics/data-migration-strategy/)).

   The script ends with exit code 2 because of the `FAIL` lines, so a pipeline would stop here.

#### Step 4: Review the reviewed register

The architect fixed the draft: a pilot role for sales predictions, four test cases, an owner and a quality bar for every predictive scenario, a person checking extracted orders, and the model for sales predictions trained once in the quality system `S4Q`.

1. Run:

   ```bash
   python unit23/embedded_ai_rollout.py --register reviewed
   ```

2. Expected output:

```text
Embedded AI rollout for CP10 (private edition 2023) as of 2026-11-29 (synthetic), register: reviewed
E01 Smart Summarization on object pages
  ASK   R01  SAP's source names ['public'] only
  => ASK SAP: EDITION
E02 Sales document completion (scenario SLS_DOC_AUTO_COMPLTN, scope item 73P)
  ASK   R01  SAP's source names ['public'] only
  TODO  R07  quality indicator (owner's choice) >= 85.0: not trained in S4Q yet
  => ASK SAP: EDITION
E03 Sales performance predictions (app F3304, scenario SALESVOLUME001, scope item 2YJ)
  WARN  R01  listed in an SAP overview; confirm the scope item for private edition, release 2023
  => READY
E04 Supplier delivery prediction (scope item 3FY) for CP11 purchasing
  WARN  R01  listed in an SAP overview; confirm the scope item for private edition, release 2023
  TODO  R07  quality indicator (owner's choice) >= 80.0: not trained in S4Q yet
  => PILOT
E05 Slow and non-moving stock detection (scope item 20N) for CP21 Augsburg
  WARN  R01  listed in an SAP overview; confirm the scope item for private edition, release 2023
  TODO  R06  0 records < 2,000 (course): CP21 stock moves into CP10's system at the rollout on 2027-07-05
  TODO  R07  quality indicator (owner's choice) >= 80.0: not trained in S4Q yet
  => BLOCKED: DATA
E06 Create sales orders from unstructured data (scope item 4X9)
  WARN  R01  listed in an SAP overview; confirm the scope item for private edition, release 2023
  TODO  R03  Service connection in S4P (ISLM) to that instance
  TODO  R07  quality indicator (owner's choice) >= 90.0: not trained in S4Q yet
  => TODO
E07 Joule in S/4HANA Cloud Private Edition
  ASK   R02  AI Units required, none held
  => NEEDS AI UNITS
E08 AI-assisted journal upload
  ASK   R02  AI Units required, none held
  => NEEDS AI UNITS
2 ASK SAP: EDITION, 2 NEEDS AI UNITS, 1 BLOCKED: DATA, 1 TODO, 1 PILOT, 1 READY
```

   No `FAIL` lines remain, so the exit code is 0. Sales document completion now waits on an edition question (`E02`), not a design error.

> **Note** These verdicts are synthetic. A `READY` here means the register says every gate is passed, not that a real model reached 96.4% prediction confidence.

#### Step 5: Finish a prerequisite

The BTP team connects `S4P` to Calder's Document Information Extraction instance.

1. Open `unit23/embedded_ai/register_reviewed.json` and find `"Service connection in S4P (ISLM) to that instance"`.
2. On the next line, change `"done": false` to `"done": true`. Save.
3. Run the review again:

   ```bash
   python unit23/embedded_ai_rollout.py --register reviewed
   ```

   ```text
   E06 Create sales orders from unstructured data (scope item 4X9)
     WARN  R01  listed in an SAP overview; confirm the scope item for private edition, release 2023
     TODO  R07  quality indicator (owner's choice) >= 90.0: not trained in S4Q yet
     => PILOT
   ...
   2 ASK SAP: EDITION, 2 NEEDS AI UNITS, 1 BLOCKED: DATA, 2 PILOT, 1 READY
   ```

   The feature moves from the backlog to wave 2: it still needs a trained model that passes its 90% bar.

#### Step 6: Record a training run

The analyst trains supplier delivery prediction in `S4Q` and reads 83.2 on the quality indicator the buyer chose.

1. In the same file, find `"Supplier delivery prediction (scope item 3FY) for CP11 purchasing"`. In its `"quality"` block, change `"measured": null` to `"measured": 83.2`. Save.
2. Run the review again:

   ```bash
   python unit23/embedded_ai_rollout.py --register reviewed
   ```

   ```text
   E04 Supplier delivery prediction (scope item 3FY) for CP11 purchasing
     WARN  R01  listed in an SAP overview; confirm the scope item for private edition, release 2023
     => READY
   ...
   2 ASK SAP: EDITION, 2 NEEDS AI UNITS, 1 BLOCKED: DATA, 1 PILOT, 2 READY
   ```

   Try `"measured": 78.5` instead: the verdict becomes `HOLD`, with `WARN R07 quality indicator (owner's choice) 78.5 < 80.0`. Set it back to 83.2.

#### Step 7: Ask the edition what-if

What if `CP10` were on Public Edition?

1. Run:

   ```bash
   python unit23/embedded_ai_rollout.py --register reviewed --edition public
   ```

2. Among the lines:

   ```text
   Embedded AI rollout for CP10 (public edition current) as of 2026-11-29 (synthetic), register: reviewed
   E01 Smart Summarization on object pages
     TODO  R03  SAP AI terms for Base AI-assisted features accepted
     => TODO
   E02 Sales document completion (scenario SLS_DOC_AUTO_COMPLTN, scope item 73P)
     TODO  R03  Communication scenario SAP_COM_1199 activated through a support case
     TODO  R07  quality indicator (owner's choice) >= 85.0: not trained in S4Q yet
     => TODO
   ...
   E07 Joule in S/4HANA Cloud Private Edition
     ASK   R01  SAP's source names ['private'] only
     ASK   R02  AI Units required, none held
     => ASK SAP: EDITION
   E08 AI-assisted journal upload
     ASK   R01  SAP's source names ['private'] only
     ASK   R02  AI Units required, none held
     => ASK SAP: EDITION
   2 ASK SAP: EDITION, 1 BLOCKED: DATA, 2 TODO, 1 PILOT, 2 READY
   ```

   Smart Summarization now has a known path, starting with the AI terms; sales document completion needs communication scenario `SAP_COM_1199`. Joule and journal upload become edition questions, because their product pages are for Private Edition. The edition changes the plan, not just the steps.

#### Step 8: Write the plan

1. Run:

   ```bash
   python unit23/embedded_ai_rollout.py --register reviewed --md
   ```

2. Open `unit23/embedded_ai_rollout.md` and use **Open Preview** (the icon with a magnifier, top right). It starts like this:

```text
# Embedded AI rollout plan: CP10 (private edition 2023)

As of 2026-11-29. Synthetic: Calder Pumpworks is fictional; counts and quality values are course values.

### Wave 1: switch on for the pilot role in S4P

| ID | Feature | Verdict | Owner | Next action |
| --- | --- | --- | --- | --- |
| E03 | Sales performance predictions (app F3304, scenario SALESVOLUME001, scope item 2YJ) | READY | 00100266 | switch on and measure |
| E04 | Supplier delivery prediction (scope item 3FY) for CP11 purchasing | READY | 00100211 | switch on and measure |

### Wave 2: train and test in S4Q, then decide

```

   Each wave is a table of feature, verdict, owner and next action. This is the page you'd bring to the AI steering meeting.

#### Step 9: Save your work in Git

```bash
git add unit23/embedded_ai_rollout.py unit23/embedded_ai/ unit23/embedded_ai_rollout.md
git commit -m "Unit 23: embedded AI rollout plan for CP10"
```

#### How the code works

| Part | What it does |
| --- | --- |
| `CONTEXT` | Calder's system, edition, release, AI Units held and test system |
| `sample()` | Builds the eight features; `reviewed=True` has the draft's errors fixed |
| `check()` | Applies gates `R01` to `R10` to one feature and picks the verdict in a fixed order: design errors first, then SAP questions, data, prerequisites, quality |
| `--edition` | Re-reads the register for another edition, including edition-only prerequisites such as the AI terms |
| `write_md()` | Groups features by wave into markdown tables with the next action |
| Exit code | 0 without `FAIL`, 2 with any, so a pipeline can stop |

| Gate | Source |
| --- | --- |
| `R01` edition stated | SAP's pages as read in this topic |
| `R02` licence and AI Units | sap.com product pages, SAP KBA 3658326 |
| `R03` prerequisites | SAP KBAs 3658326 and 3632785, SAP's ISLM material |
| `R04` pilot role, `R05` owner, `R09` three tests | Course rules |
| `R06` data minimum | SAP where SAP names one, else course |
| `R07` quality bar | SAP Learning's 95% for prediction confidence where it applies, else the owner's threshold |
| `R08` monthly retraining | SAP Learning's advice for the sales scenarios, applied as a course rule |
| `R10` human check | SAP's notes that summaries vary and that journal proposals are validated before posting; course rule for extraction |

#### If something goes wrong

| What you see | What it means | What to do |
| --- | --- | --- |
| `python: command not found` or `'python' is not recognized` | Python isn't on your PATH or `.venv` is off | Turn on `.venv` (Step 1); on macOS/Linux try `python3` |
| `No register yet: register_draft.json` | `--init` hasn't run | Run `python unit23/embedded_ai_rollout.py --init` |
| `A JSON file is not valid: register_reviewed.json line 198` | An edit left a missing comma or `True` instead of `true` | JSON uses lowercase `true`, `false` and `null`; fix the line, or delete the file and run `--init` |
| Counts differ from Step 4 | You edited the register before Step 4 | Delete `unit23/embedded_ai/register_reviewed.json` and run `--init` |
| `ModuleNotFoundError` | You ran another unit's script | This script uses built-in modules only; check the file name |
| Network or proxy errors | None expected | The script never connects to anything |

### The SAP way

#### Public Edition: terms, last mile, roles

For Base AI-assisted features, SAP's KBA 3658326 (read 29 November 2026) gives the order:

1. Accept the **SAP AI Terms for Base AI-assisted Features in SAP S/4HANA Cloud Public Edition**.
2. Wait for SAP's confirmation email, which links the last-mile configuration documentation.
3. Add the IAM artifacts and assign the business catalog or IAM apps to the end users' business roles.
4. Find which features are Base in the SAP Discovery Center's Business AI section: AI Type *AI Feature Without Package* and pricing that says AI Units aren't required. Premium features show *AI Feature in Package* and need the AI Unit SKU 8019164.

The KBA says release 2508 contains three base AI-assisted features. SAP Learning lists the authorization for each Fiori launchpad capability:

| Capability | IAM app (recommended) | Business catalog |
| --- | --- | --- |
| Smart Summarization | `F7924_SUM_TRAN` | `SAP_CORE_BC_AIU_SUM_PC` |
| Easy Filter | `F8552_TRAN` | `SAP_CORE_BC_AIU_FIL_PC` |
| Error Explanation | `F8553_TRAN` | `SAP_CORE_BC_AIU_EXP_PC` |
| Smart Personalization (insights cards) | `F8555_TRAN` | `SAP_CORE_BC_AIU_PER_PC` |
| Smart Personalization (Smart App Finder) | `F8818_TRAN` | `SAP_CORE_BC_AIU_PRO_PC` |

For predictive scenarios in Public Edition, the scope item's test script carries the training steps. KBA 3697052 points to the 73P test script's section "Train and Activate Model SLS_DOC_AUTO_COMPLTN Manually (Optional)". Where a scenario needs an SAP service, SAP activates it: KBA 3632785 says `SLS_DOC_AUTO_COMPLTN` needs Data Attribute Recommendation connectivity, and the communication scenario `SAP_COM_1199` is activated by a support case on component `XX-S4C-OPR-SRV`, per tenant (development, test and production each).

#### Private Edition: you run more of it

Private Edition is technically close to on-premise S/4HANA, and SAP's public material for it is thinner. What the sources in this run support, as of 29 November 2026:

- **ISLM is in the system.** SAP's FAQ says ISLM shipped with S/4HANA 2020 FPS0 and replaced Predictive Analytics Integrator, with migration support for its content. SAP's ISLM deck says it is delivered in SAP BASIS and is part of the standard S/4HANA licence; the FAQ adds that remote (side-by-side) scenarios need licences for the ML service they use.
- **Two apps.** **Intelligent Scenarios** (F4469) displays and creates scenarios; **Intelligent Scenario Management** (F4470) trains, activates and manages them, both SAP's and your own.
- **Scenario configuration is yours.** In S/4HANA Utilities, for example, SAP Learning has you set the training and prediction window in table `TEML_OUTBILPARAM`, precalculate features with a report, train and activate in F4470, then run the prediction report. The lesson also names a successor scenario from SAP Note 3480987 and ties that note to the APL version on S/4HANA 2023 and lower, so the HANA library version is part of the prerequisite check.
- **Premium features need AI Units.** The sap.com pages for Joule with Private Edition and for AI-assisted journal upload say AI Units are currently required.

> **Note** Generative features in Private Edition reach their models through SAP BTP. The ISLM setup for a generative scenario (AI Core on the extended plan, OAuth client, `ISLM_REUSE_CONNECTION`, usage type) is shown step by step in [Embedded AI across SAP applications](https://erpfde.com/topics/embedded-ai-across-sap-applications/); that is the pattern to check when a delivered generative feature in your release asks for a BTP connection.

#### ISLM steps an analyst follows

From SAP's lessons and KBAs, for a delivered predictive scenario:

1. In **Intelligent Scenario Management** (F4470), search the scenario and open it.
2. Select the model and choose **Train**.
3. Wait for the new model version to reach status *Ready*.
4. Open the version and read its quality indicators.
5. If quality is good enough, select the version and choose **Activate**; wait for *Active*.
6. Test as a business user in the consuming app.
7. Retrain on the agreed cadence and compare versions before activating a new one.

#### Licensing in one place

| Feature type | What you pay | Source |
| --- | --- | --- |
| Base AI-assisted UI features (Public Edition) | No AI Units; accept AI terms | KBA 3658326 |
| Delivered ISLM scenarios | Standard S/4HANA licence | SAP ISLM deck and FAQ |
| Side-by-side scenarios | Plus the BTP service used | SAP ISLM FAQ |
| Premium features (for example Joule in Private Edition, journal upload) | AI Units, SKU 8019164 | sap.com product pages, KBA 3658326 |

### Build vs. SAP

| Situation | Choose | Why |
| --- | --- | --- |
| SAP delivers the feature for your edition and release | Switch it on for a pilot role | Lowest cost; SAP maintains it through upgrades |
| SAP delivers it, but your data is thin | Wait or fix the data | A model trained on too little history will fail its quality bar |
| SAP's page is silent for your edition | Ask SAP before building | A build may duplicate a feature you already own |
| SAP delivers a similar feature that misses your rule | Extend with a custom ISLM scenario | Keeps operations in the same apps; see [Embedded AI across SAP applications](https://erpfde.com/topics/embedded-ai-across-sap-applications/) |
| Needs data from several systems | Build side-by-side | Delivered scenarios learn from the S/4HANA system's own data |
| Needs AI Units you can't justify yet | Defer or build drafts-only | Compare with the [AI Units plan](https://erpfde.com/topics/ai-units-and-commercial-model/) |

### Architecture view

#### Where it sits

```mermaid
flowchart LR
  subgraph S4P[S/4HANA CP10 S4P]
    APP[Fiori apps] --> ISLM[ISLM scenarios]
    ISLM --> HANA[HANA APL/PAL]
    ROLE[Business roles]
  end
  subgraph BTP[SAP BTP calder-ai-prod]
    DOX[Document Information<br/>Extraction]
    AIC[AI Core / generative AI hub]
    J[Joule]
  end
  ISLM -->|side-by-side| DOX
  ISLM -->|generative| AIC
  J --> APP
  S4Q[S/4HANA S4Q] -.->|train and test first| ISLM
```

Embedded scenarios stay inside `S4P`: data never leaves the system. Side-by-side and generative ones cross to BTP through the same connectivity as the rest of Calder's AI work (see [BTP connectivity](https://erpfde.com/topics/btp-connectivity/)).

#### Non-functional requirements

| Requirement | Typical target at Calder | What breaks if missed |
| --- | --- | --- |
| Data residency | Embedded scenarios stay in `S4P`; BTP services in `us10` | Customer data in an unapproved region |
| Training window | Outside working hours, monthly | Training load slows month-end jobs |
| Model quality | Each scenario's agreed bar, e.g. 95% prediction confidence | Wrong proposals erode trust; users stop using the app |
| Availability | Same as the consuming app; an inactive model must degrade gracefully | Users see 0% or blank proposals and open incidents |
| Cost | Base and standard features: zero AI Units; side-by-side: budgeted BTP consumption | Surprise BTP bill or AI Unit overrun |

#### Integration and identity

UI features and embedded scenarios run under the user's own S/4HANA authorizations; the AI app or catalog is one more authorization in the business role (see [roles and authorization design](https://erpfde.com/topics/roles-and-authorization-design/)). Training jobs run under the analyst's user in Intelligent Scenario Management. Side-by-side scenarios call BTP with a technical connection (service key, OAuth client), so that connection is a credential to register and rotate like any other ([services, instances and bindings](https://erpfde.com/topics/btp-services-and-bindings/)).

#### The decision to record

- **Context:** Calder wants eight delivered AI features on `CP10` (Private Edition 2023), holds no AI Units, and `CP20` joins in July 2027.
- **Options:** A switch on everything SAP lists at once; B one register with gates, waves and pilot roles; C wait for the rollout and do all AI after it.
- **Decision:** B. Wave 1 sales predictions; wave 2 supplier delivery prediction and PDF order extraction after training in `S4Q`; ask SAP about Smart Summarization and sales document completion for Private Edition 2023; the AI Units purchase decides Joule and journal upload; Augsburg's stock scenario after 5 July 2027.
- **Consequences:** every feature has an owner and a quality bar; nothing reaches all users without a pilot; the plan has to be re-run after each release and each SAP answer.

#### What a design review will ask

1. Where does SAP state each feature for our edition and release, and when did we last check?
2. Which features send data to BTP, and in which region?
3. Who can train and activate a model version in production, and is that separated from who uses it?
4. What does the user see when a model is inactive or below its bar?
5. Which process KPIs will tell us in three months whether to keep each feature on?

### Production concerns

- **Authorizations.** Keep training and activation (F4470) with a small analyst role, separate from business users. Activating a bad version changes every user's proposals at once.
- **Transport and system order.** Train and test in `S4Q` first. Plan to train in each system on its own data, and don't assume a model version travels with a transport; check your release's documentation. Record each system's version quality.
- **Evaluation.** Use the pilot role as the test group and colleagues without the feature as the comparison, as in the pilot scorecard of [Embedded AI across SAP applications](https://erpfde.com/topics/embedded-ai-across-sap-applications/).
- **Monitoring.** Watch the quality indicators per version and the acceptance of proposals in the app; a falling trend is drift ([hypercare and drift after go-live](https://erpfde.com/topics/hypercare-and-drift-after-go-live/)).
- **Cost.** Base and standard-licence features cost effort, not AI Units. Side-by-side scenarios consume BTP services; premium features consume AI Units.
- **Clean core.** Delivered scenarios and ISLM are standard; prefer them to custom code. Custom ISLM scenarios are a released extension path, not a modification.
- **Upgrades.** Each release can add, rename or replace scenarios (SAP's Utilities lesson shows a successor scenario replacing an older one). Re-run the register after every upgrade.

### Where AI fits

This topic is about AI, so the question turns round: where does AI help run the rollout? Three places, all modest. An assistant can draft register entries from SAP's release notes, which the architect then checks against the scope documents; it can't answer the edition question for you. Joule, once licensed, can answer users' "how do I use this" questions from SAP Help content. And the acceptance and edit logs of each feature are exactly the data for the online evaluation covered in [online evaluation and user feedback](https://erpfde.com/topics/online-evaluation-and-user-feedback/). The agents SAP now ships are a different, Premium category; [SAP's agent catalogue for architects](https://erpfde.com/topics/sap-agent-catalogue-for-architects/) scores them.

### Pitfalls

- **Planning from a demo.** A Public Edition demo proves nothing about your Private Edition release. Ask for the scope document.
- **Confusing similar names.** Check feature names and licences on SAP's own pages; similar names can mean different features with different licences.
- **Training on a test system's thin data and calling it proof.** `S4Q` often holds a fraction of production history; set the bar knowing that.
- **Activating every new version automatically.** Compare quality before activating; keep the previous version to fall back to.
- **Forgetting the inactive state.** Users meet "0%" or empty proposals and assume the feature is broken. Test it and tell them.
- **Letting extracted or generated output save itself.** SAP's own pages tell users to verify summaries and validate journal proposals. Design the check into the process.
- **One plan, never refreshed.** A register that isn't re-run after each release and each SAP answer is out of date within a quarter.

### Exercise

Add quotation conversion rates to Calder's plan and take it from `HOLD` to `READY`.

1. In `unit23/embedded_ai/register_reviewed.json`, before the last `]` of `"features"`, add a comma after the E08 entry's closing `}` and paste:

   ```json
   {"id": "E09", "name": "Quotation conversion rates (app F1904, scenario SLSQTANPREDICTION)",
    "pattern": "embedded-ml", "editions": {"public": "stated", "private": "listed"},
    "edition_source": "SAP Learning (2YJ lesson); 2YJ listed in SAP's ISLM deck",
    "licence": "s4-licence", "prerequisites": [],
    "access": {"grant": "Quotation Conversion Rates", "assigned_to": "ZB_SALES_ANALYST_PILOT"},
    "data": {"minimum": 2000, "minimum_source": "SAP", "available": 3360, "note": "quotations, 24 months"},
    "quality": {"indicator": "prediction confidence", "threshold": 95.0, "measured": 93.1},
    "operations": {"owner": "00100266", "retrain_days": 30}, "test_cases": 3, "human_review": false}
   ```

2. Run `python unit23/embedded_ai_rollout.py --register reviewed`. E09 shows `WARN R07 prediction confidence 93.1 < 95.0` and `=> HOLD`.
3. The analyst retrains on 36 months of quotations. Change `"available": 3360` to `5040` and `"measured": 93.1` to `95.6`. Run again.
4. Run with `--md` and check that E09 is in wave 1.
5. Write two sentences under the plan in `unit23/embedded_ai_rollout.md`: which test cases you would add for E09, and how you would tell users the conversion rate is a prediction.

**Done when** the last line reads `2 ASK SAP: EDITION, 2 NEEDS AI UNITS, 1 BLOCKED: DATA, 1 PILOT, 3 READY` and E09 appears in wave 1 of `unit23/embedded_ai_rollout.md`. Keep the file: the Unit 32 capstone pack collects one rollout plan per AI platform decision.

### Check yourself

1. In Intelligent Scenario Management, a new model version shows status Ready. What still has to happen before the business app uses it?
   - A. The version must be transported from S4Q to S4P
   - B. The version must be deployed to SAP BTP before the app can call it
   - C. Someone checks its quality and activates that version
   - D. Joule must be activated for the users of the app

   Answer: C. Activation is a separate, explicit step that chooses which trained version the app uses; only one version is active per model. Deploy applies to side-by-side scenarios only, and the plan trains each system on its own data.

2. The sales document completion scenario fails to train with too few records, although CP10 has thousands of sales orders. What is the most likely reason?
   - A. The scenario only trains on orders created in the last month
   - B. Only completed documents count, and open orders and archived customers' documents are excluded
   - C. The scenario needs AI Units before it reads any data
   - D. Training reads data only from the quality system S4Q

   Answer: B. SAP's KBA 3697052 says training uses only sales documents with overall status Completed and excludes those of archived customers. Open orders don't count, so the usable slice is smaller than the order count suggests.

3. In the script, why does the verdict for E02 become ASK SAP: EDITION in the reviewed register while its prerequisites list is empty?
   - A. The register forgot to list SAP_COM_1199 for Private Edition
   - B. The quality threshold of 85 is below SAP's recommended 95
   - C. The scenario needs AI Units that Calder doesn't hold
   - D. SAP's sources state it for Public Edition only, so R01 asks first

   Answer: D. R01 checks whether SAP states the feature for the register's edition; E02's sources are Public Edition KBAs, so the verdict is an edition question. Its SAP_COM_1199 prerequisite is marked for Public Edition and only shows in the public what-if.

4. The partner's draft grants sales performance predictions to "all sales users". Which gate fails and why does it matter?
   - A. R04: without a pilot role there is no test group or owner
   - B. R01, because the feature isn't stated for Private Edition
   - C. R06, because too many users would exhaust the training data
   - D. R10, because predictions are saved without a person checking

   Answer: A. R04 is the course rule that features go to a named pilot role first. A broad grant removes the comparison group the pilot scorecard needs and leaves nobody owning wrong proposals.

5. Calder's buyer chose a quality bar of 80 for supplier delivery prediction, and the first S4Q training reads 78.5. What should the plan say?
   - A. READY, because 78.5 is close enough for a pilot role
   - B. HOLD: improve the data or window and train again
   - C. FIX DESIGN, because the threshold must always be 95
   - D. BLOCKED: DATA, because the record count is below the minimum

   Answer: B. A measured value below the agreed bar is a hold, not a design error: the gate exists so the owner decides before go-live. SAP's 95% recommendation is for prediction confidence in the sales scenarios; this feature uses the buyer's own indicator and threshold.

6. Augsburg's planner wants slow and non-moving stock detection for CP21 now. What would you do?
   - A. Train the scenario on CP21's ECC history copied into S4Q
   - B. Switch it on in S4P and let it learn from the first weeks
   - C. Buy AI Units so the scenario can use Augsburg's data
   - D. Plan it after the July 2027 rollout, once CP21's history is in CP10's system

   Answer: D. Embedded scenarios learn from the S/4HANA system's own history, and CP21 has none there until the rollout. Training on a copied test system wouldn't prove anything about production, and AI Units don't change what data a scenario can read.

7. Which statement about licensing is supported by SAP's sources in this topic?
   - A. All AI features in Private Edition are included in the S/4HANA licence
   - B. Base AI features need a small AI Unit purchase to switch on
   - C. ISLM scenarios need no AI Units; Joule in Private Edition does
   - D. Side-by-side scenarios are free because they run on SAP BTP

   Answer: C. SAP's ISLM deck and FAQ say ISLM is part of the standard licence, with remote scenarios needing licences for the ML service used. The sap.com product page says AI Units are currently required for Joule in Private Edition.

8. Why should extracted sales orders (E06) require a person's check before saving?
   - A. SAP blocks extraction scenarios from saving documents directly
   - B. The check is needed to train the side-by-side model each month
   - C. A person must enter the AI Units consumed per document
   - D. Extraction can be wrong, and a wrong order would ship and bill

   Answer: D. R10 is a course rule for generated or extracted output, in line with SAP's own advice to verify summaries and validate journal proposals before posting. A wrong extraction saved unchecked creates a wrong order that ships and bills.

## Sources

- [How to Enable AI-Assisted Easy Filter Functionality in SAP S/4HANA Public Cloud (SAP KBA 3658326, read 2026-11-29)](https://userapps.support.sap.com/sap/support/knowledge/en/3658326): Public Edition, all versions. Accept the SAP AI terms for Base AI-assisted features first; SAP then sends a confirmation email with 'last mile' configuration; assign the business catalog or IAM apps to business roles; find Base features in the SAP Discovery Center (AI Type 'AI Feature Without Package', no AI Units); Premium features need AI Unit SKU 8019164 ('AI Feature in Package'); release 2508 has three base AI-assisted features
- [Using the AI-Assisted Capabilities in the SAP Fiori Launchpad (SAP Learning, Public Edition course, read 2026-11-29)](https://learning.sap.com/courses/implementing-sap-s-4hana-cloud-public-edition/using-the-ai-assisted-capabilities-in-the-sap-fiori-launchpad_fec17991-b3d6-4f7e-bb82-7abebd43cc02): Smart Summarization F7924_SUM_TRAN / SAP_CORE_BC_AIU_SUM_PC, Easy Filter F8552_TRAN / SAP_CORE_BC_AIU_FIL_PC, Error Explanation, Smart Personalization; IAM app recommended, business catalog as alternative; summaries 'may vary each time', verify before sharing
- [Modelltraining für Predictive Analytics beschreiben – Verkauf (2YJ) (SAP Learning, Public Edition sales course, German, read 2026-11-29)](https://learning.sap.com/courses/implementing-sap-s-4hana-cloud-public-edition-sales-automation-and-analytics-de/modelltraining-f-r-predictive-analytics-beschreiben-verkauf-2yj): train in Intelligent Scenario Management, version status Ready, check quality indicators (predictive power, prediction confidence at least 95% recommended, AUC), activate the best version; at least 2,000 records per training, train and activate at least monthly, outside working hours; apps F1904 (scenario SLSQTANPREDICTION), F3304 (SALESVOLUME001; shows 0% when no model is active), F3408
- [Failure in Data Training for Sales Document Completion in SAP S/4HANA Cloud Public Edition (SAP KBA 3697052, read 2026-11-29)](https://userapps.support.sap.com/sap/support/knowledge/en/3697052): scenario and model SLS_DOC_AUTO_COMPLTN, scope item 73P; training uses only sales documents with overall status Completed, not those of archived customers; the test script asks for more than 1,000 records
- ['This intelligent scenario has no versions' or 'DAR Connectivity - Connection fails' for SLS_DOC_AUTO_COMPLTN (SAP KBA 3632785, read 2026-11-29)](https://userapps.support.sap.com/sap/support/knowledge/en/3632785): Public Edition: the scenario needs Data Attribute Recommendation connectivity; activate communication scenario SAP_COM_1199 by a support case on component XX-S4C-OPR-SRV, per tenant
- [Understanding Machine Learning for Outsorted Billing Documents (SAP Learning, S/4HANA Utilities, read 2026-11-29)](https://learning.sap.com/courses/configuring-billing-and-invoicing-in-sap-s-4hana-utilities/understanding-machine-learning-for-outsorted-billing-documents): apps Intelligent Scenario Management (F4470) and Intelligent Scenarios (F4469); training and prediction windows in table TEML_OUTBILPARAM; scenario UTI_BI_OUTSORTD_DOC replaces UTI_BI_OUTSORTED (SAP Note 3480987, tied to the APL version on S/4HANA 2023 and lower); steps: set the window, precalculate features, train, activate, run the prediction report
- [Embed & Operate ML Scenarios for your Intelligent Enterprise (SAP CLM Day 2023 deck, P. Dhingra and R. Devarajan, SAP; read 2026-11-29)](https://assets.dm.ux.sap.com/in-clmday-2023/pdfs/islm_clm_day.pdf): embedded scenarios run APL/PAL in the S/4HANA stack, side-by-side ones on SAP BTP; ISLM is delivered in SAP BASIS and part of the standard S/4HANA licence; lifecycle discover, set up, train, analyze quality, deploy, activate; delivered scenarios with scope items, e.g. 4X9 sales orders from unstructured data (side-by-side), 3FY supplier delivery prediction, 20N stock in transit and slow/non-moving stock, 2YJ sales performance prediction (embedded)
- [Intelligent Scenario Lifecycle Management: Frequently Asked Questions (SAP Community, blog by SAP, 9 May 2021, read 2026-11-29)](https://blogs.sap.com/2021/05/09/intelligent-scenario-lifecycle-management-frequently-asked-questions/): ISLM released with S/4HANA 2020 FPS0 on-premise; successor to Predictive Analytics Integrator (PAi) with migration support; deploy applies to side-by-side scenarios only; part of the S/4HANA licence, remote scenarios need licences for the ML service used; not for ECC
- [Joule with SAP S/4HANA Cloud Private Edition (sap.com product page, read 2026-11-29)](https://www.sap.com/products/erp/joule-with-sap-s4hana-cloud-private-edition.html): AI Feature for Private Edition: navigation, answers from SAP Help Portal, business object details; 'AI Units are currently required'; activate with AI Units
- [SAP S/4HANA Cloud Private Edition, Journal Upload (sap.com product page, read 2026-11-29)](https://www.sap.com/products/erp/s4hana-cloud-private-edition-journal-upload.html): AI-assisted journal upload from a guidance document in natural language; users validate the posting proposals before posting; AI Units currently required
