Complete source-to-target mapping from SAP S/4HANA source tables and fields to each entity in the ShaDey Inc. Physical Data Model (PDM). Highlights Business Partner, MATDOC, ACDOCA, and PRCD_ELEMENTS replacement patterns versus the ECC-based mapping.
Confidence:Explicit = source mapping declared in the data modeler's PDM attributes. Inferred = derived from S/4HANA simplification patterns and SAP standard practice. Source codes: SAP = SAP S/4HANA table.field, DWH = derived from other PDM entities, SEQ = system-generated sequence, CALC = calculated/derived, AGG = aggregation, ML = machine learning pipeline, SCD = slowly changing dimension logic, POS = POS system, ECOM = e-commerce platform, CRM = CRM system, TMS = transport management, WMS = warehouse management.
S/4HANA Simplification Impact
This mapping reflects the seven major simplifications in S/4HANA. Where a table is replaced (e.g., KNA1 → BUT000), the new S/4HANA source is shown. Where a table is retained (e.g., MARA, VBAK, T001W), the mapping is identical to the ECC version. Changed fields are highlighted with S/4 CHANGE badges.
dim_dateReference
Calendar dimension generated from a date spine script. No direct SAP source extraction. Fiscal calendar attributes aligned to ShaDey Inc.'s fiscal year (February start). Identical to ECC mapping.
PDM Attribute
Type
SAP S/4HANA Source
Transformation
Confidence
PK date_sk
INT
--
Generated YYYYMMDD integer key from calendar script
Explicit
full_date
DATE
--
Calendar generation script (date spine from start to end)
One row per calendar date. No SAP extraction required. Fiscal periods should align with SAP fiscal year variant (e.g., V3 for Feb-start). No change from ECC mapping.
dim_customerCore Dimension
Customer dimension with SCD Type 2 history tracking. In S/4HANA, the customer master migrates from KNA1 to the Business Partner model (BUT000) with customer role FLCU01. CVI compatibility views may still expose KNA1-like structures during transition.
PDM Attribute
Type
SAP S/4HANA Source
Transformation / Join Logic
Confidence
PK customer_sk
BIGINT
--
DWH surrogate key sequence
Explicit
customer_id
UUID
BUT000.PARTNERS/4 CHANGE
Cast Business Partner number to UUID. Filter: BUT000.BU_GROUP = customer group. CVI: CVIS_CUST_LINK maps PARTNER → KUNNR for backward compat. Secondary: ECOM users.user_id
JOIN BUT000.PARTNER = BUT020.PARTNER → BUT020.ADDRNUMBER = ADR6.ADDRNUMBER. In S/4HANA, e-mail is natively linked through BP address relations. Secondary: CRM/ECOM email
Inferred
customer_type
VARCHAR(20)
BUT000.BU_GROUPS/4 CHANGE
Map BP grouping to type: BP01=B2C, BP02=B2B, etc. Replaces KNA1.KTOKD account group logic.
Inferred
loyalty_tier
VARCHAR(20)
CRM
CRM: loyalty_program.current_tier. Not in S/4HANA core. SAP Customer Activity Repository (CAR) may provide loyalty data in cloud setups.
Explicit
is_active_flag
BOOLEAN
--
CALC: EXISTS fact_sales WHERE date > DATEADD(month, -12, GETDATE())
Explicit
registration_date
DATE
BUT000.CRDATS/4 CHANGE
Business Partner creation date. Replaces KNA1.ERDAT. Secondary: ECOM users.created_at
Inferred
effective_from
TIMESTAMP
--
SCD Type 2 row start timestamp (ETL-managed)
Explicit
effective_to
TIMESTAMP
--
SCD Type 2 row end (NULL = current row)
Explicit
is_current
BOOLEAN
--
SCD Type 2 current row flag
Explicit
S/4HANA Business Partner Migration
In S/4HANA, all customers and vendors are Business Partners. Customer-specific data lives in role assignment FLCU01 and the CVI compatibility layer (tables CVIS_CUST_LINK, CVI_CUST_LINK). During migration, the Customer-Vendor Integration (CVI) framework synchronises BUT000 with legacy KNA1 views. Extract from BUT000 directly for greenfield; use CVI views during brownfield transition. BUT000.TYPE distinguishes organisations (1) from natural persons (2).
Grain & Business Rules
One row per customer per SCD Type 2 version. Active customers determined by sales activity within 12 months. Customer matching across SAP BP, CRM, and e-commerce requires golden record strategy. BUT000.PARTNER is the primary business key in S/4HANA.
dim_productCore Dimension
Product/article dimension with SCD Type 2 history. Material master tables (MARA, MAKT, MARC, MBEW) are retained in S/4HANA with minor enhancements. Pricing master conditions (KONH/KONP) also retained.
PDM Attribute
Type
SAP S/4HANA Source
Transformation / Join Logic
Confidence
PK product_sk
BIGINT
--
DWH surrogate key sequence
Explicit
product_id
UUID
MARA.MATNR
Cast MATNR to UUID. S/4HANA supports 40-char material numbers (vs. 18 in ECC).
Explicit
sku
VARCHAR(30)
MARA.MATNR
Formatted as [DEPT]-[CAT]-[SEQ] pattern
Explicit
product_name
VARCHAR(200)
MAKT.MAKTX
WHERE SPRAS = 'EN' (English language key)
Explicit
category
VARCHAR(100)
T023.WGBEZ
JOIN MARA.MATKL = T023.MATKL for material group text
Explicit
department
VARCHAR(100)
T023.WGBEZ
Parent group lookup from material group hierarchy
Explicit
brand
VARCHAR(100)
MARA.BRAND_ID
JOIN to brand_master reference table
Explicit
FK supplier_sk
BIGINT
EORD
Lookup dim_supplier.supplier_sk via EORD source list (primary vendor). Vendor key now references BUT000.PARTNER via CVI.
Explicit
unit_cost
DECIMAL(10,2)
MBEW.STPRS
Standard price from material valuation
Explicit
unit_price
DECIMAL(10,2)
KONP.KBETR
WHERE KSCHL = 'PR00' (list price condition type)
Explicit
is_current
BOOLEAN
--
SCD Type 2 current flag
Explicit
effective_from
TIMESTAMP
--
SCD Type 2 row start
Explicit
effective_to
TIMESTAMP
--
SCD Type 2 row end
Explicit
Key Joins
MARA.MATNR → MAKT.MATNR (WHERE SPRAS='EN') for name. MARA.MATKL → T023.MATKL for category. MARA.MATNR → EORD.MATNR (WHERE fixed vendor) for supplier. MARA.MATNR → MBEW.MATNR for cost. KONP joined via KONH access sequence for list price. All joins identical to ECC; material master is retained in S/4HANA.
S/4HANA Enhancement
S/4HANA extends MATNR to 40 characters (from 18 in ECC). Ensure UUID casting and SKU formatting accommodate the wider field. CDS view I_Product provides a consumption-ready analytical view over the material master that can supplement or replace direct MARA extraction.
dim_supplierCore Dimension
Supplier/vendor dimension with SCD Type 2 history. In S/4HANA, the vendor master migrates from LFA1 to the Business Partner model (BUT000) with vendor role FLVN01. CVI compatibility views bridge the transition.
PDM Attribute
Type
SAP S/4HANA Source
Transformation / Join Logic
Confidence
PK supplier_sk
BIGINT
--
DWH surrogate key sequence
Explicit
supplier_id
UUID
BUT000.PARTNERS/4 CHANGE
Cast BP number to UUID. Filter: role = FLVN01 (vendor). CVI: CVIS_VEND_LINK maps PARTNER → LIFNR for backward compat.
Map BP grouping to vendor type. Replaces LFA1.KTOKK account group.
Inferred
country_code
CHAR(3)
BUT000.PARTNER → BUT020 → ADRC.COUNTRYS/4 CHANGE
Via BP address relation: BUT020.ADDRNUMBER → ADRC.COUNTRY. Replaces LFA1.LAND1.
Inferred
lead_time_days
INT
EINA.APLFZ
Planned delivery time from purchasing info record (retained)
Explicit
quality_rating
DECIMAL(3,2)
DWH aggregation
AVG(fact_quality_inspection.score) over last 4 quarters
Explicit
is_certified
BOOLEAN
QMEL
Quality notification status check (no open critical notifications). QMEL retained.
Explicit
is_current
BOOLEAN
--
SCD Type 2 current flag
Explicit
S/4HANA Vendor-to-BP Migration
LFA1 is replaced by BUT000 with role FLVN01. Address data moves from LFA1 direct fields to the central address model (BUT020 → ADRC). The CVI framework table CVIS_VEND_LINK provides the PARTNER → LIFNR cross-reference for systems migrating from ECC. In greenfield S/4HANA, LIFNR may not exist; use PARTNER as the canonical vendor key.
dim_storeCore Dimension
Store/channel dimension sourced from SAP plant master (T001W). Retained in S/4HANA with no structural changes. Each retail store and distribution centre is modelled as an SAP plant.
PDM Attribute
Type
SAP S/4HANA Source
Transformation / Join Logic
Confidence
PK store_sk
BIGINT
--
DWH surrogate key sequence
Explicit
store_id
UUID
T001W.WERKS
Cast WERKS to UUID
Explicit
store_name
VARCHAR(200)
T001W.NAME1
Direct mapping
Explicit
store_type
VARCHAR(20)
T001W.FABKL
Map factory calendar via ref_plant_type lookup
Explicit
region
VARCHAR(100)
T001W.REGIO
JOIN T005S for region text: T001W.LAND1 + T001W.REGIO = T005S key
Explicit
city
VARCHAR(100)
T001W.ORT01
Direct mapping
Explicit
country_code
CHAR(3)
T001W.LAND1
Direct mapping
Explicit
open_date
DATE
T001W.ZOPNDT
Custom field (Z-field) for store opening date
Explicit
is_current
BOOLEAN
--
SCD Type 2 current flag
Explicit
Assumption
T001W is retained in S/4HANA without structural changes. The custom Z-field (ZOPNDT) for store opening date is ShaDey Inc.-specific. Mapping is identical to the ECC version.
dim_promotionCore Dimension
Promotion dimension sourced from SAP pricing master condition records (KONH/KONP), which are retained in S/4HANA. Document-level pricing conditions migrate to PRCD_ELEMENTS (affects fact_sales linkage, not this dimension).
PDM Attribute
Type
SAP S/4HANA Source
Transformation / Join Logic
Confidence
PK promotion_sk
BIGINT
--
DWH surrogate key sequence
Explicit
promotion_id
UUID
KONP.KNUMH + KOPOS
Composite key from condition record number + position. KONP retained in S/4HANA.
Explicit
promotion_name
VARCHAR(200)
KONH.VTEXT
Condition record description text. KONH retained.
Explicit
type
VARCHAR(30)
KONP.KSCHL
Map condition type: ZP01=Discount, ZP02=BOGO, etc. (ABC-specific Z-conditions)
Explicit
start_date
DATE
KONP.DATAB
Condition validity start date
Explicit
end_date
DATE
KONP.DATBI
Condition validity end date
Explicit
discount_pct
DECIMAL(5,2)
KONP.KBETR
KBETR / 10 (SAP stores percentage conditions scaled by 10)
Explicit
is_current
BOOLEAN
--
SCD Type 2 current flag
Explicit
Data Quality Note
SAP stores percentage condition values scaled by 10 (e.g., 15% = 150 in KBETR). The transformation must divide by 10. KONH/KONP master condition records are retained in S/4HANA. Only document-level condition records migrate from KONV to PRCD_ELEMENTS (see fact_sales).
fact_orderFact Table
Sales order fact sourced from SAP sales document header (VBAK) and status (VBUK). Retained in S/4HANA. Customer FK now resolves through Business Partner. Grain: order level.
VBAK still stores KUNNR. Resolve to BUT000.PARTNER via CVIS_CUST_LINK, then lookup dim_customer.customer_sk.
Inferred
FK order_date_sk
INT
VBAK.AUDAT
Lookup dim_date.date_sk from AUDAT (document date)
Explicit
FK store_sk
BIGINT
VBAK.WERKS
Lookup dim_store.store_sk from WERKS (delivering plant)
Explicit
status
VARCHAR(20)
VBUK.GBSTK
Map: A=Pending, B=Partial, C=Complete. VBUK retained in S/4HANA.
Explicit
channel
VARCHAR(20)
VBAK.AUGRU
Map order reason to channel. Secondary: ECOM orders.channel
Explicit
total_amount
DECIMAL(12,2)
VBAK.NETWR
Net value of the order. Secondary: ECOM orders.total
Explicit
S/4HANA Note
VBAK/VBUK are retained. The customer number field (KUNNR) still exists on the sales document for backward compatibility, but canonical customer identity is now the Business Partner number. Use CVIS_CUST_LINK to bridge KUNNR → PARTNER during the ETL customer lookup.
fact_inventory_snapshotFact Table
Periodic inventory snapshot. In S/4HANA, MARD becomes an aggregate CDS view over MATDOC (the merged material document journal). Stock quantities are derived in real time from MATDOC postings rather than stored as running totals.
PDM Attribute
Type
SAP S/4HANA Source
Transformation / Join Logic
Confidence
PK inventory_sk
BIGINT
--
DWH surrogate key sequence
Explicit
FK product_sk
BIGINT
MATDOC.MATNRS/4 CHANGE
Lookup dim_product.product_sk via MATNR. Alternatively use CDS view I_MaterialStock.
Inferred
FK store_sk
BIGINT
MATDOC.WERKSS/4 CHANGE
Lookup dim_store.store_sk via plant. MATDOC contains WERKS at document level.
Inferred
FK date_sk
INT
--
dim_date.date_sk from snapshot run date (ETL schedule)
Explicit
quantity_on_hand
INT
MATDOC (aggregated) S/4 CHANGE
SUM(MATDOC.MENGE) WHERE stock_type = unrestricted. Or use CDS view I_MaterialStockTimeSeries. Replaces MARD.LABST.
Inferred
quantity_reserved
INT
MATDOC (aggregated) S/4 CHANGE
SUM(MATDOC.MENGE) WHERE stock_type = reserved. Or use RESB (reservation table, retained). Replaces MARD.RESBE.
Inferred
quantity_in_transit
INT
MATDOC (aggregated) S/4 CHANGE
SUM(MATDOC.MENGE) WHERE movement_type IN (301,302 transit). Replaces MARD.UMLME.
Inferred
MATDOC Replaces MKPF/MSEG and Redefines MARD
In S/4HANA, MATDOC merges the material document header (MKPF) and items (MSEG) into a single journal. MARD is no longer a physically stored table with running stock balances; it becomes a CDS compatibility view that aggregates MATDOC postings in real time. For ETL, prefer the CDS view I_MaterialStockTimeSeries or aggregate MATDOC directly. Daily snapshot ETL remains valid but now reads from MATDOC-derived views rather than static MARD balances.
Snapshot Strategy
Because MARD is now an aggregate view, the DWH ETL captures daily snapshots at a fixed time. For movement-level detail (goods receipts, issues, transfers), extract directly from MATDOC with BUDAT (posting date) and BWART (movement type) filters.
fact_salesFact Table
Sales transaction fact sourced from SAP billing documents (VBRK/VBRP, retained) and POS transactions. Promotion linkage changes from KONV to PRCD_ELEMENTS. Grain: billing document item level.
PDM Attribute
Type
SAP S/4HANA Source
Transformation / Join Logic
Confidence
PK sales_sk
BIGINT
--
DWH surrogate key sequence
Explicit
FK customer_sk
BIGINT
VBRK.KUNAG → BUT000.PARTNERS/4 CHANGE
Resolve KUNAG via CVIS_CUST_LINK to PARTNER, then lookup dim_customer.customer_sk.
Inferred
FK product_sk
BIGINT
VBRP.MATNR
Lookup dim_product.product_sk via material number
Explicit
FK store_sk
BIGINT
VBRP.WERKS
Lookup dim_store.store_sk via plant
Explicit
FK promotion_sk
BIGINT
PRCD_ELEMENTSS/4 CHANGE
Lookup dim_promotion.promotion_sk via PRCD_ELEMENTS condition records on billing doc. Replaces KONV. JOIN on KNUMV (pricing doc number).
Inferred
FK order_date_sk
INT
VBRK.FKDAT
Lookup dim_date.date_sk from billing date
Explicit
quantity
DECIMAL(10,3)
VBRP.FKIMG
Billed quantity. Secondary: POS txn_line.qty
Explicit
unit_price
DECIMAL(10,2)
VBRP.NETPR
Net price per unit. Secondary: POS txn_line.unit_price
Explicit
line_total
DECIMAL(12,2)
VBRP.NETWR
Net value of line item. Secondary: POS txn_line.ext_price
Document-level pricing conditions migrate from KONV to PRCD_ELEMENTS in S/4HANA. The join key (KNUMV - pricing document number) remains the same; field names within the condition record are largely compatible. PRCD_ELEMENTS also supports new pricing capabilities (e.g., multi-currency, enhanced condition exclusion). The promotion_sk lookup joins PRCD_ELEMENTS.KSCHL to dim_promotion.type for promotional condition types.
Alternative: ACDOCA for Financial Sales Analysis
For financial reporting use cases, fact_sales data can alternatively be sourced from ACDOCA (Universal Journal) which provides a single source of truth for FI/CO/CO-PA postings. ACDOCA contains MATNR, KUNNR, WERKS, and revenue amounts in a single row, eliminating the VBRK/VBRP join. However, VBRK/VBRP remains the preferred source for operational sales analytics as it preserves billing document granularity.
fact_shipmentFact Table
Shipment/delivery fact sourced from SAP delivery documents (LIKP, retained) and external TMS. In S/4HANA with Embedded EWM, warehouse-level execution data is available natively. Grain: delivery document level.
PDM Attribute
Type
SAP S/4HANA Source
Transformation / Join Logic
Confidence
PK shipment_sk
BIGINT
--
DWH surrogate key sequence
Explicit
FK order_sk
BIGINT
LIKP.VBELN
Lookup fact_order.order_sk via delivery-to-order document flow. LIKP retained.
Explicit
FK store_sk
BIGINT
LIKP.WERKS
Lookup dim_store.store_sk via shipping plant
Explicit
FK ship_date_sk
INT
LIKP.WADAT_IST
Lookup dim_date.date_sk from actual goods issue date
S/4HANA Embedded EWM replaces the decentralised WM (LQUA, LTBK, LTBP). Warehouse execution data (pick, pack, ship) is available in /SCWM/* tables within the same system instance. For enhanced shipment tracking, the ETL can optionally join /SCWM/DLVH (delivery header) and /SCWM/DLVI (delivery item) for warehouse-specific timestamps and handling unit details. This is not required for the current PDM grain but enables future enrichment.
fact_returnFact Table
Returns fact sourced from SAP return orders (VBAK doc type RE) and credit memos (VBRK billing type G2). Both retained in S/4HANA. Material movements for returns now recorded in MATDOC. Grain: return order level.
PDM Attribute
Type
SAP S/4HANA Source
Transformation / Join Logic
Confidence
PK return_sk
BIGINT
--
DWH surrogate key sequence
Explicit
FK original_order_sk
BIGINT
VBAK.AUGRU
Lookup fact_order.order_sk via reference document (return-to-original link)
Explicit
FK product_sk
BIGINT
VBAP.MATNR
Lookup dim_product.product_sk via return order item material
Explicit
FK customer_sk
BIGINT
VBAK.KUNNR → BUT000.PARTNERS/4 CHANGE
Resolve KUNNR via CVIS_CUST_LINK to PARTNER, then lookup dim_customer.customer_sk.
Inferred
FK return_date_sk
INT
VBAK.AUDAT
dim_date.date_sk from return order document date (RE type)
Credit memo net value (billing type G2). Secondary: ECOM refunds.amount
Explicit
S/4HANA Returns Processing
VBAK (RE type) and VBRK (G2 credit memo) are retained. The goods receipt for returned materials is recorded in MATDOC (replacing MKPF/MSEG) with movement type 651/652. Customer resolution follows the same KUNNR → BUT000.PARTNER path as other SD documents.
Data Products
Data products are derived from core DWH entities (dimensions and facts) rather than sourced directly from SAP S/4HANA. Their S/4HANA lineage flows through the core entities above. The mappings below show the DWH-level derivation; for the ultimate SAP source, trace through the parent entity mappings. Where the upstream dimension or fact changed for S/4HANA, the ultimate SAP source column reflects the new table.
RANK() OVER (ORDER BY SUM(quantity) DESC) last 30d
VBRP.FKIMG
avg_rating
DECIMAL(3,2)
ECOM product_reviews
AVG(rating) by product_id
External
review_count
INT
ECOM product_reviews
COUNT(*) by product_id
External
dp_net_sales_dailyData Product
Daily net sales metric aggregated by store. Grain: date + store. Promotion discount now resolves through PRCD_ELEMENTS. Ultimate S/4HANA lineage: VBRK/VBRP → fact_sales/fact_return → dp_net_sales_daily.
PDM Attribute
Type
DWH Source
Transformation
Ultimate SAP S/4HANA Source
PK date_sk
INT
fact_sales.order_date_sk
Group by date
VBRK.FKDAT
PK store_sk
BIGINT
fact_sales.store_sk
Group by store
VBRP.WERKS
gross_sales
DECIMAL(14,2)
fact_sales
SUM(line_total) GROUP BY date_sk, store_sk
VBRP.NETWR
return_amount
DECIMAL(14,2)
fact_return
SUM(refund_amount) GROUP BY date_sk, store_sk
VBRK.NETWR (G2)
discount_amount
DECIMAL(14,2)
fact_sales + dim_promotion
SUM(line_total * discount_pct / 100)
PRCD_ELEMENTS.KBETR S/4
tax_amount
DECIMAL(14,2)
Calculated
gross_sales * ref_tax_rate.rate by store jurisdiction
Daily sales performance by date + store + product. Grain: date + store + product. Aggregated from fact_sales. No S/4HANA-specific changes at this derivation layer.
PDM Attribute
Type
DWH Source
Transformation
Ultimate SAP S/4HANA Source
PK date_sk
INT
fact_sales.order_date_sk
Group by date
VBRK.FKDAT
PK store_sk
BIGINT
fact_sales.store_sk
Group by store
VBRP.WERKS
PK product_sk
BIGINT
fact_sales.product_sk
Group by product
VBRP.MATNR
total_qty
DECIMAL(12,3)
fact_sales
SUM(quantity)
VBRP.FKIMG
gross_amount
DECIMAL(14,2)
fact_sales
SUM(line_total)
VBRP.NETWR
transaction_count
INT
fact_sales
COUNT(sales_sk)
VBRK count
avg_unit_price
DECIMAL(10,2)
Calculated
gross_amount / NULLIF(total_qty, 0)
--
avg_basket_size
DECIMAL(10,2)
fact_order
AVG(total_amount) by store, date
VBAK.NETWR
dp_inventory_positionData Product
Current inventory position with days-of-supply and reorder signals. Grain: product + store (latest snapshot). Ultimate S/4HANA lineage: MATDOC (aggregate) → fact_inventory_snapshot → dp_inventory_position.
PDM Attribute
Type
DWH Source
Transformation
Ultimate SAP S/4HANA Source
PK product_sk
BIGINT
fact_inventory_snapshot
Latest date_sk
MATDOC.MATNR S/4
PK store_sk
BIGINT
fact_inventory_snapshot
Latest date_sk
MATDOC.WERKS S/4
on_hand
INT
fact_inventory_snapshot.quantity_on_hand
Latest snapshot
MATDOC aggregate S/4
reserved
INT
fact_inventory_snapshot.quantity_reserved
Latest snapshot
MATDOC aggregate S/4
in_transit
INT
fact_inventory_snapshot.quantity_in_transit
Latest snapshot
MATDOC aggregate S/4
available
INT
Calculated
on_hand - reserved
--
avg_daily_sales_30d
DECIMAL(8,2)
dp_sales_daily
SUM(total_qty) / 30 over last 30 days
VBRP.FKIMG
days_of_supply
DECIMAL(6,1)
Calculated
available / NULLIF(avg_daily_sales_30d, 0)
--
reorder_flag
BOOLEAN
Calculated
days_of_supply < safety_stock_days_threshold
MARC.MINBE (reorder point)
MRP Live / DDMRP Alternative
In S/4HANA, MRP Live (transaction MD01N) and Demand-Driven MRP (DDMRP) can provide system-calculated reorder signals and net flow positions. These can supplement or replace the manual reorder_flag calculation. CDS view I_MRPMaterial provides real-time MRP results. Consider enriching dp_inventory_position with MRP Live outputs for more accurate replenishment signals.
dp_supplier_scorecardData Product
Supplier performance scorecard by fiscal period. Grain: supplier + period. Supplier identity resolves through BUT000.
PDM Attribute
Type
DWH Source
Transformation
Ultimate SAP S/4HANA Source
PK supplier_sk
BIGINT
dim_supplier
WHERE is_current = TRUE
BUT000.PARTNER (FLVN01) S/4
PK period
VARCHAR(10)
dim_date
fiscal_year + fiscal_period
--
on_time_delivery_pct
DECIMAL(5,2)
fact_shipment
COUNT(WHERE delivery ≤ promise) / COUNT(*) * 100
LIKP.LFDAT vs VBEP.EDATU
quality_defect_rate
DECIMAL(5,4)
fact_return + fact_sales
COUNT(returns WHERE reason = quality) / COUNT(sales) * 100
Daily store performance analytics. Grain: store + date. No S/4HANA-specific changes at this derivation layer. Combines DWH sales data with POS footfall and WMS shrinkage.
PDM Attribute
Type
DWH Source
Transformation
Ultimate SAP S/4HANA Source
PK store_sk
BIGINT
dim_store
Direct
T001W.WERKS
PK date_sk
INT
dim_date
Direct
--
revenue
DECIMAL(14,2)
dp_net_sales_daily
SUM(net_sales)
VBRP.NETWR
footfall
INT
POS store_traffic
visitor_count daily total
External (POS)
transactions
INT
dp_net_sales_daily
SUM(transaction_count)
VBRK count
conversion_rate
DECIMAL(5,2)
Calculated
transactions / NULLIF(footfall, 0) * 100
--
avg_basket
DECIMAL(10,2)
Calculated
revenue / NULLIF(transactions, 0)
--
sales_per_sqft
DECIMAL(10,2)
Calculated
revenue / dim_store.square_footage
T001W custom field
shrinkage_pct
DECIMAL(5,2)
WMS shrinkage_report
loss_value / revenue * 100
External (WMS)
dp_promotion_effectivenessData Product
Promotion lift analysis comparing pre-promotion baseline with promotional period sales. Grain: promotion + product. Discount cost lineage traces through PRCD_ELEMENTS in S/4HANA.
Order fulfillment tracking: order-to-ship and order-to-deliver metrics with on-time flags. Grain: one row per order. No S/4HANA-specific changes at this derivation layer.
PDM Attribute
Type
DWH Source
Transformation
Ultimate SAP S/4HANA Source
PK order_sk
BIGINT
fact_order
Direct
VBAK.VBELN
promise_date
DATE
SAP direct
VBEP.EDATU (schedule line confirmed date)
VBEP.EDATU
days_to_ship
INT
Calculated
DATEDIFF(day, order_date, ship_date)
--
days_to_deliver
INT
Calculated
DATEDIFF(day, order_date, delivery_date)
--
on_time_flag
BOOLEAN
Calculated
delivery_date ≤ promise_date
--
complete_flag
BOOLEAN
Calculated
ALL line items shipped
--
return_flag
BOOLEAN
fact_return
EXISTS WHERE original_order_sk = order_sk
VBAK (RE type)
ML / AI Data Products
Machine learning data products are derived from DWH entities and ML pipeline outputs. They have no direct SAP S/4HANA source tables; their SAP lineage is indirect through the core dimensions and facts. No S/4HANA-specific changes at this layer.
dp_customer_segmentationML/AI
RFM-based customer segmentation with ML-derived cluster assignments and propensity scores. Trained quarterly via k-means clustering.
PDM Attribute
Type
Source
Notes
PK customer_sk
BIGINT
dp_customer_360.customer_sk
Current customers only
segment_id
INT
ML: k-means cluster_id
k=6, trained quarterly
segment_name
VARCHAR(50)
ML: cluster label mapping
Champions, Loyal, At Risk, Lost, etc.
rfm_recency
INT
dp_customer_360.days_since_last_purchase
Recency score
rfm_frequency
INT
dp_customer_360.total_orders
Frequency score
rfm_monetary
DECIMAL(14,2)
dp_customer_360.total_spend
Monetary value
propensity_score
DECIMAL(5,4)
ml_feature_store
WHERE feature_name = 'purchase_propensity'
model_version
VARCHAR(20)
ML: model registry
Version tag (e.g., v2.3.1)
dp_demand_forecastML/AI
ML-driven demand forecast at product + store + day grain with 90-day horizon. Prophet/LightGBM ensemble model. Can be validated against S/4HANA MRP Live / SAP IBP forecasts.
PDM Attribute
Type
Source
Notes
PK product_sk
BIGINT
dim_product
All active products
PK store_sk
BIGINT
dim_store
All active stores
PK forecast_date_sk
INT
dim_date (future)
Future dates, 90-day horizon
forecast_qty
DECIMAL(10,2)
ML pipeline output
Prophet/LightGBM ensemble, daily grain
confidence_low
DECIMAL(10,2)
ML pipeline output
80% prediction interval lower bound
confidence_high
DECIMAL(10,2)
ML pipeline output
80% prediction interval upper bound
model_version
VARCHAR(20)
ML: model registry
Version tag for reproducibility
SAP IBP Integration Opportunity
In S/4HANA environments with SAP Integrated Business Planning (IBP), demand forecasts from IBP can be compared with the ML pipeline outputs for ensemble forecasting. IBP forecasts are available via CPI/OData APIs and can be loaded into dp_demand_forecast as an additional model_version for benchmarking.
ml_feature_storeML/AI
Centralised feature store for all ML features. Entity-key-value structure supporting point-in-time feature retrieval. No direct SAP source.
PDM Attribute
Type
Source
Notes
PK feature_sk
BIGINT
SEQ
DWH surrogate key
feature_name
VARCHAR(100)
ML: Feature registry
e.g., churn_risk_90d, ltv_next_12m
feature_value
DECIMAL(18,6)
ML pipeline output
Computed feature value
entity_key
VARCHAR(100)
DWH entity PK
customer_id, product_id, etc.
entity_type
VARCHAR(50)
ML: entity enum
customer, product, store, order
event_timestamp
TIMESTAMP
Calculated
Point-in-time for feature correctness
version
INT
ML: Feature registry
Auto-incremented feature version
ml_training_snapshotML/AI
Immutable snapshots of ML training datasets for reproducibility and audit. No direct SAP source.
PDM Attribute
Type
Source
Notes
PK dataset_sk
BIGINT
SEQ
DWH surrogate key
model_name
VARCHAR(100)
ML: model registry
Model identifier
created_at
TIMESTAMP
Calculated
Snapshot creation timestamp (immutable)
feature_version
INT
ml_feature_store.version
Feature version at time of snapshot
row_count
INT
Calculated
COUNT(*) of snapshotted rows
label_column
VARCHAR(50)
ML: model config
Target variable definition
train_split_pct
DECIMAL(3,2)
ML: model config
Train/test split ratio
source_query_hash
VARCHAR(64)
Calculated
SHA256 of the SQL that generated the dataset
is_pii_free
BOOLEAN
Calculated
Automated PII scan result (must be TRUE)
S/4HANA Simplification Summary
Summary of all S/4HANA table replacements that affect the PDM source-to-target mapping, with the specific PDM entities impacted.
Customer ID field changes from KUNNR to PARTNER. Name fields change from NAME1/NAME2 to NAME_ORG1/NAME_ORG2 or NAME_FIRST/NAME_LAST. Address via BUT020 → ADRC.