Demand Forecasting for Wave Planning

SKU-level daily demand forecasting aligned with SAP EWM wave planning logic. Forecast outputs exposed via OData services for SAP integration.

25% MAPE
4-Week Forecast Horizon
20 SKUs Modeled
Python Prophet SQL OData CDS Views SAP EWM

Overview

Problem Statement

Supply chain planners and EWM wave planners need reliable short-horizon demand signals to decide when to schedule inbound receipts and when to trigger outbound picking waves. Traditional approaches rely on static reorder points or manual estimates, leading to inefficient wave planning and capacity issues.

Solution Summary

Built a practical demand forecasting service that predicts SKU-level daily demand using Prophet time series forecasting. The system generates 4-week forecasts with confidence intervals and provides wave planning suggestions based on forecasted volume. Forecast outputs can be exposed via OData services for SAP EWM integration.

Business Impact

  • Enables proactive wave planning vs reactive order processing
  • Helps optimize warehouse capacity and labor allocation
  • Reduces peak-day bottlenecks through early identification
  • Improves inbound scheduling efficiency
  • Demonstrates operational relevance to SAP EWM processes

Technologies Used

  • Python 3.9+ - Core programming language
  • Prophet - Time series forecasting with seasonality
  • SQL - Extracting demand data from EWM transaction tables
  • OData - Exposing forecast outputs for SAP integration
  • CDS Views - Semantic data modeling of forecast outputs
  • Streamlit - Interactive dashboard

Detailed Case Study

Background & Context

Demand forecasting directly feeds wave management and inbound planning—core EWM functions. Supply/demand reconciliation logic demonstrates understanding of business operations, not just data science. This project shows how analytics translates into operational decisions.

Traditional SAP EWM wave creation relies on current order volume and static rules. This project adds predictive capability, allowing planners to anticipate future demand and optimize wave scheduling proactively.

Challenge Analysis

Key challenges addressed:

  • SKU-Level Forecasting: Need to forecast demand for individual SKUs, not just aggregate
  • Wave Planning Integration: Forecasts must translate into actionable wave planning suggestions
  • Seasonality Handling: Weekly patterns, monthly trends, and holiday effects
  • SAP Integration: Forecast outputs must be consumable by SAP EWM systems
  • Operational Relevance: Not just a forecast, but aligned with warehouse operations

Solution Architecture

The system follows a per-SKU forecasting approach:

┌─────────────────────┐
│ Historical Demand   │
│ (Daily, per SKU)    │
│ 6+ months history   │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ Prophet Model       │
│ Per SKU             │
│ - Trend             │
│ - Weekly Seasonality│
│ - Holiday Effects   │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ 4-Week Forecast     │
│ + Confidence        │
│   Intervals         │
└──────────┬──────────┘
           │
           ▼
┌─────────────────────┐
│ Wave Planning       │
│ Suggestions         │
│ - Expected lines    │
│ - Peak day flags    │
│ - Wave windows      │
└─────────────────────┘

Key Components:

  1. Data Preparation: Aggregates daily demand by SKU from EWM transaction data
  2. Forecasting Engine: Prophet model per SKU with seasonality and holidays
  3. Wave Planning Logic: Simple heuristics to suggest wave windows
  4. OData Service: Exposes forecasts for SAP EWM consumption

Implementation Details

Data Requirements

Single warehouse, top 20 SKUs with:

  • Minimum 6 months of daily history
  • Date, SKU, demand quantity fields
  • Optional holiday/promotion calendar

Forecasting Approach

Prophet was chosen for its strengths:

  • Handles seasonality and trends well
  • Built-in holiday support
  • Provides confidence intervals
  • Easy to interpret and explain to stakeholders

Code Example: Prophet Forecasting

from prophet import Prophet
import pandas as pd

def forecast_sku_demand(sku_data):
    """Forecast demand for a single SKU."""
    # Prepare data
    df = sku_data[['date', 'demand_qty']].rename(
        columns={'date': 'ds', 'demand_qty': 'y'}
    )
    
    # Initialize model with seasonality
    model = Prophet(
        yearly_seasonality=False,
        weekly_seasonality=True,
        daily_seasonality=False
    )
    
    # Add holidays if available
    if 'holidays' in sku_data.columns:
        model.add_country_holidays(country_name='US')
    
    # Fit and forecast
    model.fit(df)
    future = model.make_future_dataframe(periods=28)  # 4 weeks
    forecast = model.predict(future)
    
    return forecast

Wave Planning Logic

Simple heuristic-based wave suggestions:

  • Calculate expected lines to pick from forecasted demand
  • Identify peak days (exceeding 1.5x average)
  • Suggest wave windows: morning, afternoon, evening
  • Recommend 2-3 waves based on volume thresholds

Results & Metrics

The system delivers operational value:

Forecast Accuracy

MAPE < 25% on holdout period at aggregate level

Operational Impact

Enables proactive wave planning vs reactive processing

SAP Integration

Forecast outputs exposed via OData for EWM consumption

Business Value

Helps optimize warehouse capacity and labor allocation

Lessons Learned

  • Operational Alignment: Forecasts must connect to warehouse operations, not just be accurate
  • SQL Skills Transfer: SQL proficiency transfers to SAP Open SQL for extracting EWM transaction data
  • OData Integration: Understanding of modern SAP integration patterns
  • CDS Views: Demonstrates S/4HANA cloud-ready architecture thinking

Technical Deep Dive

Architecture Diagram

Demand Forecasting Architecture

Data Flow

The system processes data through:

  1. Data Extraction: SQL queries extract demand data from EWM transaction tables
  2. Preprocessing: Aggregate to daily level per SKU, handle missing values
  3. Modeling: Train Prophet model per SKU with seasonality
  4. Forecasting: Generate 4-week forecasts with confidence intervals
  5. Wave Planning: Derive planning metrics and wave suggestions
  6. Integration: Expose via OData service for SAP EWM

Tech Stack Breakdown

Technology Purpose SAP-EWM Relevance
Python Core programming language Complements ABAP for analytics
Prophet Time series forecasting Production-proven forecasting
SQL Data extraction Skills transfer to SAP Open SQL
OData API exposure Standard SAP integration protocol
CDS Views Semantic data modeling S/4HANA cloud-ready architecture

SAP-EWM Integration Points

  • Wave Creation Rules: Forecast outputs can inform SAP EWM wave creation logic
  • OData Services: Forecasts exposed via OData for Fiori app consumption
  • CDS Views: Understanding of semantic data modeling for S/4HANA
  • Operational Relevance: Demonstrates how forecasting connects to warehouse operations

Visual Assets

Screenshots

Live Demo

Resources