# IBP and supply chain planning AI

> Know what AI SAP ships for supply chain planning as of November 2026, how ready each piece is, and when Calder's forecast justifies IBP or stays in S/4HANA.

- Course: Orchestrate, Unit 14 · AI across SAP's cloud suite
- Page: https://erpfde.com/topics/ibp-and-supply-chain-planning-ai/
- Updated: 2026-11-23
- Reading time: Foundational 8 min, Deep 32 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

**SAP Integrated Business Planning (IBP)** is SAP's cloud product for supply chain planning. It sits beside the ERP. It forecasts demand, balances supply across plants and suppliers, sets inventory targets, and runs sales and operations planning. Its plans flow down to S/4HANA, where MRP turns them into purchase and production orders.

IBP has used statistics and machine learning for years. As of November 2026, SAP adds three newer kinds of AI on top:

- **AI features inside IBP.** Joule explains forecast results and optimizer runs in plain words. AI-assisted forecasting and demand sensing improve the numbers themselves. SAP calls the explanation features generally available.
- **A forecasting foundation model.** At SAP TechEd on 27 October 2026, SAP said a new SAP-RPT-TS model "will help" customers forecast in IBP without building their own machine learning. SAP's release states no availability date.
- **Joule Assistants and agents.** A Supply Chain Planning Assistant and a Logistics Assistant, among six supply chain assistants. SAP says their new capabilities are planned for general availability in Q4 2026.

The skill this topic teaches: for each planning problem, decide whether IBP's AI is the answer, whether the S/4HANA you already run is enough, or whether the problem isn't a forecasting problem at all.

### Why it matters to the business

A forecast that is too high fills the warehouse and ties up cash. One that is too low means expediting, overtime and missed delivery dates. Planning AI promises better numbers and faster answers to "why is this short?". The value depends on three things: whether you license IBP, whether the feature has reached your tenant, and whether your demand is forecastable in the first place.

Take Calder Pumpworks, the course's fictional pump maker. Its Rockford plant `CP11` plans ES-200 pumps in S/4HANA. A demand planner releases a monthly plan as **planned independent requirements (PIRs)**, and MRP builds the orders from them (see [plan-to-produce end to end](https://erpfde.com/topics/plan-to-produce-end-to-end/)). Calder's architecture decision there was to wait with IBP until the Augsburg plant joins S/4HANA. So the business question is concrete: does planning AI change that decision?

| Calder planning need | Does AI help? |
| --- | --- |
| Monthly ES-200 forecast from 12 months of sales | A little: a simple statistical method already lands close on Calder's sample data |
| March 2027 up from 20 to 24 because Brennock replaces pumps at two lift stations | No: only the planner knows this. The model can't see a customer's project |
| Seal kits sold as spares, 35 one month and 65 the next | Little: too little and too lumpy history; a reorder point fits better |
| "Why are we short on motors in week 47?" | Yes: explaining a plan in plain words saves a planner's morning |
| Pumps and machined parts planned across Rockford and Augsburg after the rollout | Yes, but that is a reason to buy IBP's supply planning, not its AI |

The pattern: AI pays most where planners read, explain and decide. Raw forecast accuracy gains are real but smaller than vendors' slides suggest, and they disappear when demand is driven by known events that only people know about.

### How SAP does it

As of 23 November 2026, SAP's own pages say this. Statuses move every quarter, so check the source before you repeat it.

| Capability | What it does | Product needed | Status SAP states |
| --- | --- | --- | --- |
| Statistical and machine learning forecasting | Forecasting algorithms combined with machine learning, plus demand sensing and inventory optimization | SAP IBP | Part of the product ([features page](https://www.sap.com/hk/products/scm/integrated-business-planning/features.html)) |
| AI-assisted forecasting | Uses relationships between variables across data sources to forecast | SAP IBP | Listed as an AI feature; "AI Units are not currently required" ([product page](https://www.sap.com/products/scm/integrated-business-planning-aiassisted-forecasting.html)) |
| Demand sensing | Daily forecasts for the near term from short-term data | SAP IBP plus Joule Base | Included with Joule Base at no extra cost ([product page](https://www.sap.com/finland/products/scm/integrated-business-planning-demand-sensing.html)) |
| Forecast, supply and inventory result analysis | Joule explains forecast results, unmet demand and inventory targets | SAP IBP | Generally available ([Q4 2025 highlights](https://news.sap.com/2026/01/sap-business-ai-release-highlights-q4-2025/)) |
| MRO inventory analysis; Excel add-in formulas | Explains safety stock drivers for spare parts; writes planning formulas from a request | SAP IBP | Generally available ([Q1 2026 highlights](https://news.sap.com/2026/04/sap-business-ai-release-highlights-q1-2026/)) |
| SAP-RPT-TS | Foundation model for time-indexed forecasting in IBP | SAP IBP | Announced at TechEd, no date ([SAP News, 27 October 2026](https://news.sap.com/2026/10/sap-teched-ai-developers-build-what-matters-autonomous-execution/)) |
| Supply Chain Planning Assistant | Helps planners sense, simulate and resolve exceptions in one workspace | Not named | GA planned for Q4 2026 ([SAP News, 8 October 2026](https://news.sap.com/2026/10/joule-assistants-agents-advance-autonomous-scm/)) |
| Logistics Issue Resolution Agent | Detects and fixes logistics issues that threaten customer promises | Not named | No status on SAP's [Logistics Assistant page](https://www.sap.com/use-cases/joule-assistant/logistics-ai) |

> **Note** The brief for this topic said SAP's release calls SAP-RPT-TS "announced" while trade press calls it GA. As read on 23 November 2026, SAP's TechEd release uses neither word: it says a new model "will help". One trade article says it is available now in SAP HANA Cloud and SAP AI Core, not in IBP. Treat it as announced until SAP's release notes say otherwise. The brief also placed the Logistics Issue Resolution Agent in planning; SAP lists it under the Logistics Assistant, which covers warehousing, fulfillment and transport.

### A decision guide: IBP's AI, S/4HANA, or no AI

```mermaid
flowchart TD
  A[Planning problem] --> B{Is it decided by<br/>events people know?}
  B -- Yes --> P[Planner input:<br/>record it with a reason]
  B -- No --> C{Enough steady<br/>history to forecast?}
  C -- No --> R[Reorder point or<br/>planner's estimate]
  C -- Yes --> D{Licensed IBP<br/>for this area?}
  D -- No --> S[Forecast in S/4HANA,<br/>release PIRs to MRP]
  D -- Yes --> E{Feature GA<br/>for our tenant?}
  E -- Yes --> U[Use it; planner<br/>approves the release]
  E -- No --> W[Plan around it;<br/>ask SAP for the date]
```

Applied to Calder:

| Calder need | Verdict |
| --- | --- |
| ES-200 monthly forecast at `CP11` | Stay in S/4HANA for now; a simple method is close enough |
| March uplift for Brennock's lift stations | Planner input, recorded with a reason |
| Seal-kit spares | Reorder point, not a forecast |
| Explaining shortages to the plant manager | Needs IBP; GA explanation features exist there |
| Network planning across `CP11` and `CP21` | A product decision for IBP after Augsburg joins, with its AI as a bonus |

> **Note** **For functional consultants.** Planning AI changes what you configure and test, not who decides. In IBP, forecast methods sit in forecast models, and a planner still releases the result. Your test cases need the statistical forecast, the planner's change and the released PIRs as three separate checks. Keep a field for the reason behind every manual change: it is the only record of why a plan differs from the model, and it is what the next forecast review reads.

### Questions to ask

- Which of our planning areas run in IBP today, and which stay in S/4HANA MRP?
- For each AI feature we want, is it in our IBP subscription, does it need Joule Base, or does it need AI Units?
- Which features are generally available for our tenant now, and which are planned for a later quarter?
- What forecast accuracy do we measure today, by product group, and over which horizon?
- How much of our demand is driven by known events (projects, promotions, replacements) that no model can see?
- Who approves a forecast before it reaches MRP, and where is that recorded?
- If SAP-RPT-TS arrives in IBP, how will we compare it with our current methods before switching?

### Common misconceptions

- **"A foundation model will fix our forecast."** Accuracy is capped by how predictable demand is. Known customer projects and lumpy spares stay hard for any model.
- **"IBP's AI works on S/4HANA's planning."** These features run in IBP. A company planning only in S/4HANA MRP doesn't get them.
- **"Announced means available."** SAP's TechEd release says SAP-RPT-TS "will help". It gives no date.
- **"An agent will replan for us."** SAP's planning assistant is pitched to help planners simulate and resolve exceptions; Calder's design keeps a person approving what reaches MRP.
- **"Demand sensing replaces the monthly plan."** It refines the near term from short-term signals. The monthly plan still drives procurement with longer lead times.

### Key terms

- **SAP Integrated Business Planning (IBP):** SAP's cloud product for demand, supply, inventory and sales and operations planning.
- **Planned independent requirement (PIR):** expected demand for a material in a plant, released to MRP before customer orders exist.
- **Demand sensing:** short-term forecasting, often daily, from recent orders and other near-term signals.
- **Best fit:** choosing, per product, the forecast method that did best on recent history.
- **SAP-RPT-TS:** a time-series foundation model SAP announced at TechEd 2026 for forecasting in IBP.
- **Joule Base:** the Joule entitlement SAP names as required for demand sensing.
- **Forecast bias:** whether a forecast is too high or too low on average.

### Check yourself

1. Calder plans ES-200 pumps in S/4HANA and licenses no IBP. Which statement about IBP's AI features is right?
   - A. They apply to S/4HANA MRP as soon as Joule is switched on
   - B. They arrive with the next S/4HANA upgrade at no extra step
   - C. They run inside IBP, so Calder would need IBP to use them
   - D. They only need a Business Technology Platform account

   Answer: C. The features in this layer are IBP features: forecast results analysis, demand sensing and AI-assisted forecasting all list IBP as the product. A company planning only in S/4HANA doesn't get them.

2. Calder's March 2027 plan is 24 pumps because Brennock will replace pumps at two lift stations. What should happen to that number?
   - A. Replace it with the model's forecast, which has more data
   - B. Keep it as planner input, with the reason recorded
   - C. Wait for SAP-RPT-TS to learn the replacement from history
   - D. Remove the uplift until Brennock places a sales order

   Answer: B. The replacement is a known event that no sales history contains, so only the planner can add it. Recording the reason keeps the override reviewable at the next forecast cycle.

3. What did SAP's TechEd release on 27 October 2026 say about SAP-RPT-TS?
   - A. It is generally available in IBP for all customers today
   - B. It replaces every forecasting algorithm already in IBP
   - C. A new model will help forecast in IBP; no date is given
   - D. It runs only inside SAP Logistics Management tenants

   Answer: C. SAP's own release says a new SAP-RPT-TS model "will help" with forecasting in IBP and states no availability date. One trade article says otherwise, which is why the layer treats it as announced.

4. Seal kits sell 35 one month and 65 the next, with three months of history. What fits best?
   - A. A foundation model, because it needs less history than statistics
   - B. A reorder point or a planner's estimate instead of a forecast
   - C. Demand sensing, because the swings happen in the short term
   - D. The same monthly method used for the ES-200 pump

   Answer: B. Too little and too lumpy history gives any forecast a poor footing. A reorder point plans spares on consumption and lead time instead of predicting each month.

5. Which SAP planning AI does SAP's Q4 2025 release call generally available?
   - A. The Supply Chain Planning Assistant in IBP
   - B. Joule's analysis of forecast results in IBP
   - C. The Logistics Issue Resolution Agent in IBP
   - D. SAP-RPT-TS forecasting in SAP HANA Cloud

   Answer: B. The Q4 2025 highlights list AI-assisted forecast results analysis in IBP as generally available. The planning assistant is planned for Q4 2026, the logistics agent has no stated status, and SAP-RPT-TS is announced.

6. Before buying IBP for its AI, what should a supply chain leader check first?
   - A. Whether the vendor's accuracy figure beats last year's
   - B. Whether every planner can use Joule in Microsoft Excel
   - C. Whether the plants can share one forecast algorithm
   - D. Whether the planning problem needs IBP even without the AI

   Answer: D. AI features ride on the product. If network planning or inventory optimization already justify IBP, the AI is a bonus; if not, the AI alone rarely pays for a new planning product.

## Deep layer

### Mental model

Planning AI comes in three layers that age at different speeds. **Methods** (statistical models, machine learning, best fit) produce numbers and have been in IBP for years. **Explanations** (Joule describing why a forecast or optimizer result looks the way it does) help planners read those numbers, and SAP calls several generally available. **Agents and foundation models** (the Supply Chain Planning Assistant, SAP-RPT-TS) are the newest and mostly planned or announced as of November 2026.

Under all three sits one boundary: a plan becomes real only when it is released to MRP as planned independent requirements. Every design decision in this topic is about what happens before that release, and who signs it.

### How it works

```mermaid
flowchart LR
  S4A[S/4HANA CP10<br/>sales history, stock,<br/>master data] --> IBP[SAP IBP<br/>forecast models,<br/>supply and inventory]
  IBP --> J[Joule<br/>explains results]
  IBP --> PL{Planner<br/>reviews and releases}
  PL -->|PIRs| MRP[S/4HANA MRP<br/>CP11]
  MRP --> PO[Purchase and<br/>production orders]
```

#### Methods: forecasting inside IBP

SAP's features page names demand planning, advanced demand sensing and statistical models, and describes forecasting algorithms combined with machine learning ([SAP](https://www.sap.com/hk/products/scm/integrated-business-planning/features.html)). The [time-series forecasting topic](https://erpfde.com/topics/time-series-forecasting-for-sap-planning/) covers the methods themselves, best fit and error measures. What matters here is how they're licensed:

- **AI-assisted forecasting** captures relationships between variables from several data sources. SAP's page says AI Units are "not currently required" and that this may change ([SAP](https://www.sap.com/products/scm/integrated-business-planning-aiassisted-forecasting.html)).
- **Demand sensing** produces daily near-term forecasts from short-term data. SAP's page says it is included with Joule Base at no extra cost and that a Joule Base subscription is required ([SAP](https://www.sap.com/finland/products/scm/integrated-business-planning-demand-sensing.html)).

Both pages need the IBP base product and carry no date. Neither names the model underneath.

#### Explanations: Joule on planning results

SAP's [Q4 2025 highlights](https://news.sap.com/2026/01/sap-business-ai-release-highlights-q4-2025/) (14 January 2026) list three IBP features as generally available: AI-assisted forecast results analysis, AI-assisted supply optimization analysis (Joule explains unmet demand and inventory targets after an optimizer run) and AI-assisted analysis of inventory optimization results. The [Q1 2026 highlights](https://news.sap.com/2026/04/sap-business-ai-release-highlights-q1-2026/) (14 April 2026) add MRO inventory analysis (plain-language summaries of what drives safety stock and reorder points for maintenance parts), AI-assisted formula writing in the IBP add-in for Microsoft Excel, and an AI-assisted system security check, all generally available.

These are the most useful items for a planner today. They don't change the plan; they shorten the time it takes to understand it.

#### Foundation models: SAP-RPT-TS

At TechEd on 27 October 2026, SAP wrote that a new SAP-RPT-TS model will help customers predict time-indexed business metrics for forecasting use cases in IBP, without custom machine learning ([SAP News](https://news.sap.com/2026/10/sap-teched-ai-developers-build-what-matters-autonomous-execution/)). The same release announced SAP-RPT-2.0 for tabular data. It gives no date for either.

A trade article the same day says SAP-RPT-TS is available now in SAP HANA Cloud and SAP AI Core ([The Letter Two](https://thelettertwo.com/2026/10/27/sap-rpt-2-tabular-ai-models/)). It cites secondary sources. Until an SAP release note or product page states availability, design as if the model is not yet in your tenant.

The SAP-RPT family started with tabular prediction; [predicting late deliveries](https://erpfde.com/topics/predicting-late-deliveries-with-sap-data/) uses SAP-RPT-1 models through the generative AI hub. A time-series variant is a different job: it forecasts a sequence, not one row.

#### Partners: foundation models beside IBP

The SAP Store also lists partner add-ons. One, from Integrated Business Planning Solutions LLC, forecasts demand for S/4HANA Cloud on a pretrained tabular model the listing names as TabPFN from Prior Labs, keeps planner changes apart from model output, and releases the final forecast as PIRs for MRP ([SAP Store listing](https://www.sap.com/cz/products/scm/partners/integrated-business-planning-solutions-demand-management-addon-for-sap-s4hana-cloud-integrated-demand-planning-solution-using-tabular-foundation-models.html)). It is sold as a private offer per productive tenant. Treat partner listings like any vendor: the listing is a claim, not a benchmark.

#### Assistants and agents

On 8 October 2026 SAP expanded six supply chain Joule Assistants: Product Design, Supply Chain Planning, Manufacturing, Logistics, Asset Operations and Business Network. The Supply Chain Planning Assistant is meant to help planners "sense, simulate, and resolve exceptions" in one workspace. SAP says general availability for the new capabilities "is planned for Q4 2026" and names no product per agent ([SAP News](https://news.sap.com/2026/10/joule-assistants-agents-advance-autonomous-scm/)).

Two customer quotes in that release show the gap between plan and practice. Takeda describes what the planning assistant "will provide". Doehler's CIO says the Logistics Issue Resolution Agent turns troubleshooting into "a one-click decision" and that the team recovered roughly a third of the time it lost to troubleshooting. That is a customer's own figure, without a published baseline.

SAP's [Logistics Assistant page](https://www.sap.com/use-cases/joule-assistant/logistics-ai) lists that agent beside others such as Transport Dispatching and Outbound Task Orchestration. It says the list mixes Joule Agents and custom agents, and gives no status. The [warehouse and transportation topic](https://erpfde.com/topics/warehouse-and-transportation-execution/) places it in Calder's logistics exceptions.

On the production side, the Q4 2025 highlights list a Production Planning and Operations Agent as a beta release: it checks material, capacity and scheduling before production orders are released, and a planner approves.

### Build it yourself: Calder's forecast check and MRP hand-off

You will write a short script that does what a demand planner does each month. It tests four classic forecast methods on Calder's ES-200 history, picks the best, compares the forecast with the planner's plan, and releases the plan as PIRs only when a named planner approves and explains any big override. No IBP tenant is needed: IBP has no free trial on SAP's supply chain trials page (see [Set up for Unit 14](https://erpfde.com/topics/set-up-for-unit-14/)), so the script stands in for the logic, not the product.

**Before you start:** complete [Set up your computer for this course](https://erpfde.com/topics/set-up-your-computer/) and [Set up for Unit 14](https://erpfde.com/topics/set-up-for-unit-14/). The second one writes the Calder suite pack this script reads. If you skipped it, the `--sample` option uses a built-in copy.

```mermaid
flowchart LR
  P[suite_pack/<br/>ibp_es200_demand.json] --> S[ibp_forecast_check.py]
  S --> B[Back-test:<br/>4 methods]
  B --> F[Forecast vs<br/>planner's plan]
  F --> G{Approver and<br/>reason given?}
  G -- No --> D[Draft only]
  G -- Yes --> R[ibp_release_es200.json<br/>PIRs for MRP]
```

> **Note** New words in this walkthrough:
> - **Back-test:** hide the last few months, forecast them from the earlier ones, and measure how far off each method was.
> - **MAPE (mean absolute percentage error):** the average size of the miss, as a percentage of what really sold. Lower is better.
> - **Bias:** the average miss with its sign. Positive means the method forecast too high.
> - **Exponential smoothing (SES):** a forecast that weights recent months more than older ones.
> - **Holt's method (HOLT):** exponential smoothing with a trend added.
> - **Command-line option:** extra text after the command, such as `--sample`, that changes what the script does.

#### What you need

- Your course folder with `.venv`, and ideally the Unit 14 suite pack.
- About 30 minutes.
- Cost: free. No account, no network, no model calls.

#### Step 1: Open your course folder and turn on the virtual environment

1. Open VS Code, choose **File > Open Folder**, and open `orchestrate-course`.
2. Open a terminal: **Terminal > New Terminal**.
3. If the prompt doesn't start with `(.venv)`, turn it on:

   - **Windows (PowerShell):**

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

   - **macOS / Linux:**

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

4. Check that the pack file exists. If the command prints an error, run `python unit14/make_suite_pack.py` from the Unit 14 setup topic, or use `--sample` in Step 3.

   - **Windows (PowerShell):**

     ```powershell
     Get-ChildItem unit14\suite_pack\ibp_es200_demand.json
     ```

   - **macOS / Linux:**

     ```bash
     ls unit14/suite_pack/ibp_es200_demand.json
     ```

#### Step 2: Create the script

1. In VS Code, create the file `unit14/ibp_forecast_check.py`, paste the code below, and save.

```python
"""Calder's ES-200 forecast check and MRP hand-off (Unit 14, IBP topic).

A small stand-in for what a demand planner does in a planning tool:
back-test a few classic forecast methods, pick the best fit, compare the
statistical forecast with the planner's plan, and release the agreed numbers
as planned independent requirements (PIRs) for MRP only after a named planner
approves. Built-in modules only, no randomness. All data is fictional.
"""
import argparse
import json
from pathlib import Path

HERE = Path(__file__).resolve().parent
PACK_DIR = HERE / "suite_pack"
RELEASE = HERE / "ibp_release_es200.json"

# Built-in copy of the suite pack's ES-200 file (Unit 14 setup), for --sample.
SAMPLE = {
    "plant": "CP11", "product": "ES-200",
    "sold": {"2025-11": 17, "2025-12": 15, "2026-01": 16, "2026-02": 18,
             "2026-03": 19, "2026-04": 21, "2026-05": 23, "2026-06": 24,
             "2026-07": 22, "2026-08": 21, "2026-09": 20, "2026-10": 19},
    "plan": {"2027-01": 20, "2027-02": 20, "2027-03": 24},
}
HOLDOUT = 4          # last 4 months are kept back to test each method
OVERRIDE_LIMIT = 0.15  # a plan more than 15% away from the forecast needs a reason
APPROVERS = {"00100298"}  # course rule: only the CP11 demand planner releases PIRs


# --- Forecast methods: each takes the history and returns `steps` future values ---
def naive(history, steps):
    return [history[-1]] * steps


def moving_average_3(history, steps):
    return [sum(history[-3:]) / 3] * steps


def exp_smoothing(history, steps, alpha=0.3):
    level = history[0]
    for value in history[1:]:
        level = alpha * value + (1 - alpha) * level
    return [level] * steps


def holt_trend(history, steps, alpha=0.5, beta=0.3):
    level, trend = history[0], history[1] - history[0]
    for value in history[1:]:
        previous = level
        level = alpha * value + (1 - alpha) * (level + trend)
        trend = beta * (level - previous) + (1 - beta) * trend
    return [level + (i + 1) * trend for i in range(steps)]


METHODS = {"NAIVE": naive, "MA3": moving_average_3,
           "SES": exp_smoothing, "HOLT": holt_trend}


def next_months(last, count):
    year, month = map(int, last.split("-"))
    out = []
    for _ in range(count):
        month += 1
        if month > 12:
            year, month = year + 1, 1
        out.append(f"{year:04d}-{month:02d}")
    return out


def backtest(values):
    """Fit on all but the last HOLDOUT months, score on those months."""
    train, test = values[:-HOLDOUT], values[-HOLDOUT:]
    scores = {}
    for name, method in METHODS.items():
        guess = method(train, HOLDOUT)
        mape = sum(abs(g - a) / a for g, a in zip(guess, test)) / HOLDOUT
        bias = sum(g - a for g, a in zip(guess, test)) / HOLDOUT
        scores[name] = (round(mape * 100, 1), round(bias, 1))
    return scores


def load(sample, name):
    if sample:
        return SAMPLE
    path = PACK_DIR / name
    if not path.exists():
        raise SystemExit(f"Suite pack file not found at {path}. Run unit14/make_suite_pack.py "
                         "first, or add --sample.")
    return json.loads(path.read_text(encoding="utf-8"))


def main():
    parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
    parser.add_argument("--sample", action="store_true",
                        help="use the built-in copy instead of the suite pack")
    parser.add_argument("--file", default="ibp_es200_demand.json",
                        help="which suite pack file to read")
    parser.add_argument("--release", action="store_true",
                        help="write the agreed plan as PIRs for MRP")
    parser.add_argument("--approver", default="",
                        help="personnel number of the planner who approves the release")
    parser.add_argument("--reason", default="",
                        help="why the plan differs from the forecast (needed above 15%%)")
    args = parser.parse_args()

    data = load(args.sample, args.file)
    months = list(data["sold"])
    values = list(data["sold"].values())
    print(f"{data['product']} at {data['plant']}: {len(values)} months of sales, "
          f"{months[0]} to {months[-1]}")

    scores = backtest(values)
    print(f"\nBack-test on the last {HOLDOUT} months (lower MAPE is better):")
    for name, (mape, bias) in scores.items():
        print(f"  {name:6} MAPE {mape:5.1f}%   bias {bias:+5.1f} units a month")
    best = min(scores, key=lambda n: scores[n][0])
    print(f"Best fit: {best}")

    plan = data.get("plan", {})
    future = next_months(months[-1], 5)
    forecast = dict(zip(future, METHODS[best](values, len(future))))
    print("\nMonth    forecast  plan  gap")
    overrides = []
    for month in future:
        f = round(forecast[month], 1)
        p = plan.get(month)
        if p is None:
            print(f"{month}  {f:8.1f}     -    -")
            continue
        gap = (p - f) / f
        flag = "  needs a reason" if abs(gap) > OVERRIDE_LIMIT else ""
        if flag:
            overrides.append(month)
        print(f"{month}  {f:8.1f}  {p:4d}  {gap:+.0%}{flag}")

    if not args.release:
        print("\nDraft only. Nothing released to MRP. Add --release --approver <number>.")
        return
    if args.approver not in APPROVERS:
        raise SystemExit(f"Release refused: approver '{args.approver}' may not release "
                         "PIRs for CP11.")
    if overrides and not args.reason:
        raise SystemExit("Release refused: months " + ", ".join(overrides) +
                         " differ from the forecast by more than 15%. Add --reason.")
    pirs = [{"plant": data["plant"], "product": data["product"], "month": m,
             "quantity": q, "statistical_forecast": round(forecast[m], 1)}
            for m, q in plan.items()]
    record = {"_note": "Course format, not an SAP interface. Fictional data.",
              "approved_by": args.approver, "best_fit": best,
              "override_reason": args.reason or None, "pirs": pirs}
    RELEASE.write_text(json.dumps(record, indent=2) + "\n", encoding="utf-8")
    print(f"\nReleased {sum(plan.values())} units as {len(pirs)} PIRs to {RELEASE.name}, "
          f"approved by {args.approver}.")


if __name__ == "__main__":
    main()
```

#### Step 3: Run the forecast check

1. Run it. The same command works in PowerShell and in macOS/Linux terminals while `.venv` is active:

   ```bash
   python unit14/ibp_forecast_check.py
   ```

   No suite pack? Run `python unit14/ibp_forecast_check.py --sample` instead. The output is the same.

**What success looks like:**

```text
ES-200 at CP11: 12 months of sales, 2025-11 to 2026-10

Back-test on the last 4 months (lower MAPE is better):
  NAIVE  MAPE  17.4%   bias  +3.5 units a month
  MA3    MAPE  10.9%   bias  +2.2 units a month
  SES    MAPE   5.3%   bias  +0.6 units a month
  HOLT   MAPE  29.6%   bias  +5.9 units a month
Best fit: SES

Month    forecast  plan  gap
2026-11      20.3     -    -
2026-12      20.3     -    -
2027-01      20.3    20  -1%
2027-02      20.3    20  -1%
2027-03      20.3    24  +18%  needs a reason

Draft only. Nothing released to MRP. Add --release --approver <number>.
```

The script has no randomness, so your numbers match these exactly.

> **Note** These results come from synthetic data: twelve months of fictional sales from the Orchestrate Lab. They show the method, not the accuracy of any SAP product or of a real forecast.

2. Read the result. HOLT did worst because sales peaked in June and fell after: a trend method extended the climb. Exponential smoothing did best and forecasts about 20 pumps a month. January and February match the planner. March is 18% above the forecast, because the planner added Brennock's lift-station replacements, which no history contains.

#### Step 4: Try to release without the right approver or reason

1. Try with the wrong person, the maintenance planner `00100153`:

   ```bash
   python unit14/ibp_forecast_check.py --release --approver 00100153
   ```

   ```text
   Release refused: approver '00100153' may not release PIRs for CP11.
   ```

2. Try with the demand planner `00100298` but no reason:

   ```bash
   python unit14/ibp_forecast_check.py --release --approver 00100298
   ```

   ```text
   Release refused: months 2027-03 differ from the forecast by more than 15%. Add --reason.
   ```

Both refusals are the point. A forecast reaches MRP only when the right person signs it, and a big override carries its reason.

#### Step 5: Release with approval and a reason

1. Run:

   ```bash
   python unit14/ibp_forecast_check.py --release --approver 00100298 --reason "Brennock replaces the pumps at two lift stations in spring"
   ```

   ```text
   Released 64 units as 3 PIRs to ibp_release_es200.json, approved by 00100298.
   ```

2. Open `unit14/ibp_release_es200.json`. Each PIR keeps both numbers: the released `quantity` and the `statistical_forecast` beside it. That pair is what your next forecast review compares.

> **Note** The release file is a course format. In a real landscape, released PIRs reach S/4HANA through SAP's integration between IBP and S/4HANA, which this script doesn't call.

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

```bash
git add unit14/ibp_forecast_check.py unit14/ibp_release_es200.json
git commit -m "Unit 14: ES-200 forecast check and PIR release"
```

#### What each part of the code does

| Part | What it does |
| --- | --- |
| `SAMPLE` | Built-in copy of the pack's ES-200 history and the planner's Q1 2027 plan |
| `naive`, `moving_average_3`, `exp_smoothing`, `holt_trend` | Four classic forecast methods with fixed parameters |
| `backtest()` | Hides the last four months, forecasts them, and scores MAPE and bias per method |
| Best fit | Picks the method with the lowest MAPE, as a planning tool's best-fit step would |
| Gap check | Compares the plan with the forecast and flags gaps above 15% |
| Release gate | Refuses unless the approver is allowed and every flagged month has a reason |
| Release file | Writes PIRs with both the released and the statistical number |

#### If something goes wrong

| What you see | What it means | What to do |
| --- | --- | --- |
| `python` is not recognized / `command not found` | Python isn't on your path, or `.venv` isn't active | Turn on `.venv` (Step 1). On macOS/Linux try `python3` |
| `Suite pack file not found at ...` | The Unit 14 pack wasn't written | Run `python unit14/make_suite_pack.py`, or add `--sample` |
| `IndexError: list index out of range` | The file has fewer months than the back-test needs | Use the ES-200 file; the Exercise adds a proper check |
| `KeyError: 'sold'` | The pack file was edited or is from another topic | Regenerate the pack with `make_suite_pack.py` |
| `ModuleNotFoundError` | The script was changed to import a library | This script needs built-in modules only; undo the import |
| Network or proxy errors | Not possible from this script | It makes no network calls; check you ran the right file |

### The SAP way

On a real project, the script's steps map to IBP features, and the gate maps to who may release a plan. Here's what SAP's pages give you as of 23 November 2026.

#### Forecasting

IBP forecasts with statistical algorithms combined with machine learning ([features](https://www.sap.com/hk/products/scm/integrated-business-planning/features.html)). AI-assisted forecasting adds relationships across data sources; SAP's page says no AI Units are needed at present ([SAP](https://www.sap.com/products/scm/integrated-business-planning-aiassisted-forecasting.html)). SAP-RPT-TS is announced for IBP with no date ([SAP News](https://news.sap.com/2026/10/sap-teched-ai-developers-build-what-matters-autonomous-execution/)).

Setup work for the consultant: which products get which methods, the back-test horizon, the error measure the business accepts, and when a new method replaces an old one.

#### Near-term demand

Demand sensing gives daily forecasts for the near term and needs Joule Base on top of IBP ([SAP](https://www.sap.com/finland/products/scm/integrated-business-planning-demand-sensing.html)). It suits products with many orders a week. Calder's pumps, at about 20 a month, have too few signals for daily sensing to add much.

#### Explanations

Forecast results analysis, supply optimization analysis and inventory optimization analysis are generally available per the [Q4 2025 highlights](https://news.sap.com/2026/01/sap-business-ai-release-highlights-q4-2025/); MRO inventory analysis and Excel formula help per the [Q1 2026 highlights](https://news.sap.com/2026/04/sap-business-ai-release-highlights-q1-2026/). Joule answers on the planner's data with the planner's rights, so check what each planning role may see before switching these on.

#### Assistants

The Supply Chain Planning Assistant's new capabilities are planned for Q4 2026 ([SAP News](https://news.sap.com/2026/10/joule-assistants-agents-advance-autonomous-scm/)). SAP's text names no product per agent and no commercial terms. For how SAP meters agents in general, see [pricing custom agents](https://erpfde.com/topics/pricing-custom-agents-after-the-free-runtime/); for how Joule Agents act on a user's behalf, see [Joule Agents and agent orchestration](https://erpfde.com/topics/joule-agents-and-agent-orchestration/).

#### Without IBP

A company that plans only in S/4HANA can still release PIRs from a forecast made elsewhere, as [plan-to-produce](https://erpfde.com/topics/plan-to-produce-end-to-end/) describes. Partner add-ons on the SAP Store forecast for S/4HANA Cloud and release PIRs; one listing names TabPFN from Prior Labs as its model ([SAP Store](https://www.sap.com/cz/products/scm/partners/integrated-business-planning-solutions-demand-management-addon-for-sap-s4hana-cloud-integrated-demand-planning-solution-using-tabular-foundation-models.html)).

### Build vs. SAP

| Situation | Choose | Why |
| --- | --- | --- |
| IBP already licensed for demand planning | IBP's methods and explanation features | Included or GA; no extra build to run |
| Short-term demand with many orders a week, IBP licensed | Demand sensing | Needs Joule Base, per SAP's page |
| Planning only in S/4HANA, steady products | A simple forecast, released as PIRs | Calder's sample shows a basic method lands close |
| Planning only in S/4HANA, many products, AI wanted | Evaluate a partner add-on against your own back-test | A listing is a claim; your history is the test |
| Network planning across plants | IBP for supply planning, its AI as a bonus | The product decision comes first |
| Lumpy spares with little history | Reorder point, no forecast | No model fixes too little data |
| Waiting for SAP-RPT-TS | Keep current methods; plan a side-by-side test | Announced, no date |

### Architecture view

**Where it sits.** Calder plans in S/4HANA `CP10` today, with `CP20` on ECC until the July 2027 rollout. If Calder adds IBP, it is a separate cloud tenant fed by S/4HANA's history and master data, returning released plans.

```mermaid
flowchart LR
  S4[S/4HANA CP10<br/>history, stock,<br/>BOMs, MRP] -->|actuals, master data| IBP[SAP IBP tenant<br/>if licensed]
  IBP -->|released PIRs| S4
  J[Joule<br/>explanations] --> IBP
  ECC[ECC CP20<br/>until July 2027] -.after rollout.-> S4
  P[Planner 00100298] -->|approves release| IBP
```

**Non-functional requirements that decide the design.**

| Requirement | Typical target | What breaks if missed |
| --- | --- | --- |
| Release control | Only named demand planners release PIRs per plant | Unreviewed forecasts drive purchase orders |
| Override record | Every change above a set tolerance has a reason | Next cycle repeats or undoes the change blindly |
| Data freshness | History loaded before the monthly planning run | The forecast misses last month's sales |
| Status certainty | Only GA-for-our-tenant features on the critical path | The planning calendar waits for an assistant |
| Cost | Joule Base and any AI Units known per feature | A "free" feature becomes a budget line later |

**Integration and identity.** Actuals and master data flow from S/4HANA to IBP, and released plans flow back as PIRs; this run didn't open SAP's integration guide, so confirm the integration path with SAP for your release. Joule's explanations run with the planner's own rights in IBP. A custom forecast like this topic's script writes nothing to S/4HANA directly; a planner releases.

**The decision to record.**

- **Context:** Calder plans ES-200 in S/4HANA. A basic method lands within about 5% on its synthetic sample history. IBP's newest AI is planned or announced. Augsburg joins S/4HANA in July 2027.
- **Options:** A license IBP now for its AI; B keep S/4HANA planning, add a forecast check with a release gate, and revisit IBP after the rollout; C buy a partner forecasting add-on for S/4HANA.
- **Decision:** B. Re-check IBP for network planning when `CP20` joins, and test SAP-RPT-TS once SAP states availability.
- **Consequences:** Calder owns a small forecast check and its release log. The log becomes the baseline any IBP or partner forecast must beat.

**What a design review will ask.**

1. Which products does each planning method cover, and who owns that list?
2. Who may release PIRs per plant, and how is that enforced?
3. What accuracy and bias do we measure, and on how many months held back?
4. Which AI features are on the critical path, and are they GA for our tenant?
5. How will we compare a new model against today's methods before switching?

### Production concerns

- **Authorizations.** Releasing a plan buys material. Restrict release to demand planners per plant, and keep it apart from purchasing approval. See [roles and authorization design](https://erpfde.com/topics/roles-and-authorization-design/).
- **Evaluation.** Back-test every method on held-back months before trusting it, and keep measuring after go-live. Track bias as well as error: a method that is always 5% high fills the warehouse slowly.
- **Overrides.** Log the released number, the statistical number and the reason. Review overrides monthly; many unexplained ones mean the method or the data is wrong.
- **Cost.** Confirm per feature whether it is included, needs Joule Base or needs AI Units. SAP's AI-assisted forecasting page says its terms are subject to change.
- **Operations.** Load history before the planning run, and freeze the plan after release so MRP sees one version.
- **Clean core.** Feed S/4HANA through released interfaces and PIRs, not direct table writes.

### Pitfalls

- **Buying a planning product for its AI.** The product decision comes first.
- **Trusting a vendor's accuracy figure.** Back-test on your own history.
- **Forecasting the unforecastable.** Lumpy spares and project demand need other tools.
- **Letting the model overwrite planner input.** Known events belong to people, with a reason.
- **Planning around announced features.** SAP-RPT-TS and the planning assistant have no confirmed date for your tenant.
- **Mixing up the agents.** The Logistics Issue Resolution Agent works on logistics exceptions, not on the forecast.

### Exercise

Run the forecast check on the seal-kit spares from the Unit 14 setup exercise, and teach the script to refuse a forecast when the history is too short.

1. If you haven't, do the [Unit 14 setup](https://erpfde.com/topics/set-up-for-unit-14/) exercise so the pack has `ibp_seal_kit_spares.json`.
2. Run:

   ```bash
   python unit14/ibp_forecast_check.py --file ibp_seal_kit_spares.json
   ```

   It stops with `IndexError: list index out of range`: three months can't fill a four-month back-test.
3. Open `unit14/ibp_forecast_check.py`. Below the `HOLDOUT` line, add:

   ```python
   MIN_MONTHS = 8       # course rule: 4 to fit, 4 to test
   ```

4. In `main()`, just above the line `months = list(data["sold"])`, add:

   ```python
       if len(data["sold"]) < MIN_MONTHS:
           raise SystemExit(f"Too little history for {data['product']}: {len(data['sold'])} "
                            f"months, at least {MIN_MONTHS} needed. Plan it with a reorder "
                            "point or a planner's estimate instead.")
   ```

5. Run step 2 again. Then run `python unit14/ibp_forecast_check.py` and check the ES-200 output is unchanged.
6. Commit with the message `Unit 14: refuse forecasts on short history`.

**Done when:** the seal-kit run prints `Too little history for CP-SK200: 3 months, at least 8 needed. Plan it with a reorder point or a planner's estimate instead.` and the ES-200 run still picks `SES` with MAPE 5.3%. The release log feeds the [demand-sensing planner](https://erpfde.com/topics/project-demand-sensing-planner/) in the portfolio projects, which starts from the same history.

### Check yourself

1. In the script's back-test, why did HOLT score worst on Calder's ES-200 history?
   - A. It needs more than twelve months before it can run at all
   - B. Its fixed parameters were tuned for weekly rather than monthly data
   - C. It extended the spring climb, but sales peaked in June and fell
   - D. It ignores the most recent months and weights the oldest ones

   Answer: C. Holt's method adds a trend to smoothing. Calder's sales rose to June and then fell, so the trend carried the forecast too high, which shows as the largest positive bias.

2. What does the release gate in the script enforce before PIRs are written?
   - A. A permitted approver, plus a reason for any gap above 15%
   - B. A MAPE below 10% for the best method in the back-test
   - C. A match between the forecast and the plan in every month
   - D. A second approval from the maintenance planner `00100153`

   Answer: A. The script refuses unless the approver is in `APPROVERS` and every flagged month has `--reason`. Accuracy thresholds aren't part of the gate; the planner can override the model as long as the reason is recorded.

3. Your project lead wants to put the Supply Chain Planning Assistant on the critical path for a February go-live. What do you do?
   - A. Accept it, since SAP's October release calls it generally available
   - B. Accept it, because Joule Base covers every planning assistant
   - C. Keep it off the critical path until SAP confirms it for your tenant
   - D. Replace it with SAP-RPT-TS, which SAP lists as available now

   Answer: C. SAP's 8 October release says general availability for the new capabilities is planned for Q4 2026, and names no product. A planned feature shouldn't carry a go-live; SAP-RPT-TS is only announced.

4. Which statement about demand sensing matches SAP's product page as read in this run?
   - A. It replaces the monthly plan for products with long lead times
   - B. It runs inside S/4HANA MRP without an IBP subscription
   - C. It needs AI Units for each daily forecast that it produces
   - D. It is included with Joule Base, which must be subscribed

   Answer: D. SAP's page says demand sensing is included with Joule Base at no additional cost and requires a Joule Base subscription, on top of IBP. It refines the near term rather than replacing the monthly plan.

5. Why does the release file keep both `quantity` and `statistical_forecast` for each PIR?
   - A. S/4HANA MRP needs both numbers to calculate safety stock
   - B. The next review compares the release with the model
   - C. IBP rejects a release that carries only the planner's number
   - D. The second number lets MRP undo the planner's change later

   Answer: B. The pair, with the reason, is the override record. It shows whether planner changes improved on the model, which is how the next cycle learns; MRP only uses the released quantity.

6. A partner listing says its foundation-model forecast beats statistics. Calder plans only in S/4HANA. What is the right first step?
   - A. Install it, because SAP Store listings are tested by SAP
   - B. Wait for SAP-RPT-TS, since partner models can't release PIRs
   - C. Switch to IBP first, because partners need an IBP tenant
   - D. Back-test it on Calder's history against the current method

   Answer: D. A listing is a vendor claim, not a benchmark. The same back-test the script runs, on held-back months of Calder's own sales, decides whether it beats the method in use.

7. Where does the Logistics Issue Resolution Agent belong in Calder's design?
   - A. In demand planning, to correct the ES-200 forecast each month
   - B. In logistics exceptions, not in the forecast
   - C. In the PIR release gate, as the approver for plant `CP11`
   - D. In IBP supply planning, as part of its optimizer runs

   Answer: B. SAP lists it under the Logistics Assistant, which covers warehousing, fulfillment and transport, and describes it as fixing issues that threaten customer promises. It doesn't forecast and shouldn't approve releases.

## Sources

- [SAP Empowers AI Developers to Build What Matters and Turn Intent into Autonomous Execution (SAP News, 27 October 2026)](https://news.sap.com/2026/10/sap-teched-ai-developers-build-what-matters-autonomous-execution/): Opened 2026-11-23. SAP TechEd release. 'a new SAP-RPT-TS model will help customers predict values across time-indexed business metrics for key forecasting use cases using the SAP Integrated Business Planning solution without requiring custom machine learning.' No status word, date or platform beyond IBP. SAP-RPT-2.0 announced ('will expand beyond classification and regression')
- [SAP Expands Joule Assistants and Agents to Advance Autonomous Supply Chain Management (SAP News, 8 October 2026)](https://news.sap.com/2026/10/joule-assistants-agents-advance-autonomous-scm/): Opened 2026-11-23. Six Joule Assistants (Product Design, Supply Chain Planning, Manufacturing, Logistics, Asset Operations, Business Network); Supply Chain Planning Assistant to help planners 'sense, simulate, and resolve exceptions in a single workspace'; 'General availability for these new capabilities is planned for Q4 2026.' Takeda quote in future tense; Doehler quote on the Logistics Issue Resolution Agent (roughly a third of troubleshooting time recovered). No product named per agent; no licensing wording
- [SAP Integrated Business Planning, AI-Assisted Forecasting (sap.com product page)](https://www.sap.com/products/scm/integrated-business-planning-aiassisted-forecasting.html): Opened 2026-11-23. No page date. Captures relationships across variables and data sources for more accurate forecasts than conventional calculations; type 'AI Feature'; 'AI Units are not currently required to use this AI offering in the underlying Cloud Service. This is subject to change.' Needs the IBP base product. Names no model
- [SAP Integrated Business Planning, Demand Sensing (sap.com product page)](https://www.sap.com/finland/products/scm/integrated-business-planning-demand-sensing.html): Opened 2026-11-23. No page date. Predicts near-future demand from short-term data; daily forecasts; 'This AI offering is included with Joule Base at no additional cost. A subscription to Joule Base is required to use it.' Needs the IBP base product
- [SAP Integrated Business Planning features (sap.com)](https://www.sap.com/hk/products/scm/integrated-business-planning/features.html): Opened 2026-11-23. Areas: sales and operations planning, forecasting and demand management (demand planning, advanced demand sensing, statistical models), inventory optimization, response and supply planning, supply chain visibility; forecasting algorithms combined with machine learning. No S/4HANA integration detail, no trial or pricing
- [SAP Business AI: Release Highlights Q4 2025 (SAP News, 14 January 2026)](https://news.sap.com/2026/01/sap-business-ai-release-highlights-q4-2025/): Opened 2026-11-23. General availability: IBP AI-assisted supply optimization analysis (Joule explains unmet demand and inventory targets from optimizer runs), AI-assisted analysis of inventory optimization results, AI-assisted forecast results analysis. Production Planning and Operations Agent: beta (checks material, capacity and scheduling before production orders are released; planner approves). Joule with SAP Logistics Management: SAP Early Adopter Care
- [SAP Business AI: Release Highlights Q1 2026 (SAP News, 14 April 2026)](https://news.sap.com/2026/04/sap-business-ai-release-highlights-q1-2026/): Opened 2026-11-23. General availability: IBP AI-assisted MRO inventory analysis (natural-language summaries of safety stock and reorder point drivers), IBP add-in for Microsoft Excel AI-assisted planning (formula generation from natural language), IBP AI-assisted system security check
- [Logistics Assistant (sap.com use case page)](https://www.sap.com/use-cases/joule-assistant/logistics-ai): Opened 2026-11-23. No page date. Lists agents used by the assistant, including the Logistics Issue Resolution Agent ('Detects and auto-fixes issues to keep customer promises'), Transport Dispatching, Outbound Task Orchestration and others; says the list mixes Joule Agents and custom agents; names no product and no status
- [Plan demand in SAP S/4HANA Cloud with AI forecasting and release planning requirements (SAP Store partner listing)](https://www.sap.com/cz/products/scm/partners/integrated-business-planning-solutions-demand-management-addon-for-sap-s4hana-cloud-integrated-demand-planning-solution-using-tabular-foundation-models.html): Opened 2026-11-23. Partner add-on by Integrated Business Planning Solutions LLC; forecasts on a pretrained tabular model the listing names as TabPFN from Prior Labs; planner adjustments kept apart from model output; releases the final forecast as planned independent requirements into S/4HANA Cloud for MRP; Private Offer Edition, one productive tenant
- [SAP Expands Tabular AI Lineup With RPT-2 and New Forecasting and Decision Models (The Letter Two, 27 October 2026)](https://thelettertwo.com/2026/10/27/sap-rpt-2-tabular-ai-models/): Opened 2026-11-23. Trade press, used only to show the status conflict: says SAP-RPT-TS is 'available now' in SAP HANA Cloud or SAP AI Core, citing secondary sources, while SAP's own release gives no status
