SAP S/4HANA to PDM Source-to-Target Mapping

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.

PDM Entities: 24
Source System: SAP S/4HANA 2023+
Companion: ECC Mapping
Last Updated: April 2026
5Dimension Tables
1Reference Table
5Fact Tables
9Data Products
4ML/AI Products
Mapping Conventions
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_date Reference
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 AttributeTypeSAP S/4HANA SourceTransformationConfidence
PK date_skINT--Generated YYYYMMDD integer key from calendar scriptExplicit
full_dateDATE--Calendar generation script (date spine from start to end)Explicit
day_of_weekVARCHAR(10)--DAYNAME(full_date)Explicit
month_nameVARCHAR(10)--MONTHNAME(full_date)Explicit
quarterCHAR(2)--Q + QUARTER(full_date)Explicit
yearINT--YEAR(full_date)Explicit
fiscal_yearINT--ABC fiscal calendar (February start). Custom logic.Explicit
fiscal_periodVARCHAR(10)--ABC fiscal P01-P13 mappingExplicit
is_holidayBOOLEANDWH ref_holiday_calendarLookup against reference holiday calendar tableExplicit
is_weekendBOOLEAN--DAYOFWEEK(full_date) IN (1,7)Explicit
Grain & Cardinality
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_customer Core 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 AttributeTypeSAP S/4HANA SourceTransformation / Join LogicConfidence
PK customer_skBIGINT--DWH surrogate key sequenceExplicit
customer_idUUIDBUT000.PARTNER S/4 CHANGECast 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_idInferred
full_nameVARCHAR(200)BUT000.NAME_ORG1 + NAME_ORG2 S/4 CHANGEOrganisations: CONCAT(NAME_ORG1, ' ', NAME_ORG2). Persons: CONCAT(NAME_FIRST, ' ', NAME_LAST). Controlled by BUT000.TYPE (1=Org, 2=Person). Secondary: CRM contacts.full_nameInferred
emailVARCHAR(255)ADR6.SMTP_ADDR S/4 CHANGEJOIN BUT000.PARTNER = BUT020.PARTNER → BUT020.ADDRNUMBER = ADR6.ADDRNUMBER. In S/4HANA, e-mail is natively linked through BP address relations. Secondary: CRM/ECOM emailInferred
customer_typeVARCHAR(20)BUT000.BU_GROUP S/4 CHANGEMap BP grouping to type: BP01=B2C, BP02=B2B, etc. Replaces KNA1.KTOKD account group logic.Inferred
loyalty_tierVARCHAR(20)CRMCRM: loyalty_program.current_tier. Not in S/4HANA core. SAP Customer Activity Repository (CAR) may provide loyalty data in cloud setups.Explicit
is_active_flagBOOLEAN--CALC: EXISTS fact_sales WHERE date > DATEADD(month, -12, GETDATE())Explicit
registration_dateDATEBUT000.CRDAT S/4 CHANGEBusiness Partner creation date. Replaces KNA1.ERDAT. Secondary: ECOM users.created_atInferred
effective_fromTIMESTAMP--SCD Type 2 row start timestamp (ETL-managed)Explicit
effective_toTIMESTAMP--SCD Type 2 row end (NULL = current row)Explicit
is_currentBOOLEAN--SCD Type 2 current row flagExplicit
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_product Core 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 AttributeTypeSAP S/4HANA SourceTransformation / Join LogicConfidence
PK product_skBIGINT--DWH surrogate key sequenceExplicit
product_idUUIDMARA.MATNRCast MATNR to UUID. S/4HANA supports 40-char material numbers (vs. 18 in ECC).Explicit
skuVARCHAR(30)MARA.MATNRFormatted as [DEPT]-[CAT]-[SEQ] patternExplicit
product_nameVARCHAR(200)MAKT.MAKTXWHERE SPRAS = 'EN' (English language key)Explicit
categoryVARCHAR(100)T023.WGBEZJOIN MARA.MATKL = T023.MATKL for material group textExplicit
departmentVARCHAR(100)T023.WGBEZParent group lookup from material group hierarchyExplicit
brandVARCHAR(100)MARA.BRAND_IDJOIN to brand_master reference tableExplicit
FK supplier_skBIGINTEORDLookup dim_supplier.supplier_sk via EORD source list (primary vendor). Vendor key now references BUT000.PARTNER via CVI.Explicit
unit_costDECIMAL(10,2)MBEW.STPRSStandard price from material valuationExplicit
unit_priceDECIMAL(10,2)KONP.KBETRWHERE KSCHL = 'PR00' (list price condition type)Explicit
is_currentBOOLEAN--SCD Type 2 current flagExplicit
effective_fromTIMESTAMP--SCD Type 2 row startExplicit
effective_toTIMESTAMP--SCD Type 2 row endExplicit
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_supplier Core 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 AttributeTypeSAP S/4HANA SourceTransformation / Join LogicConfidence
PK supplier_skBIGINT--DWH surrogate key sequenceExplicit
supplier_idUUIDBUT000.PARTNER S/4 CHANGECast BP number to UUID. Filter: role = FLVN01 (vendor). CVI: CVIS_VEND_LINK maps PARTNER → LIFNR for backward compat.Inferred
supplier_nameVARCHAR(200)BUT000.NAME_ORG1 + NAME_ORG2 S/4 CHANGECONCAT(NAME_ORG1, ' ', NAME_ORG2). Replaces LFA1.NAME1/NAME2.Inferred
supplier_typeVARCHAR(20)BUT000.BU_GROUP S/4 CHANGEMap BP grouping to vendor type. Replaces LFA1.KTOKK account group.Inferred
country_codeCHAR(3)BUT000.PARTNER → BUT020 → ADRC.COUNTRY S/4 CHANGEVia BP address relation: BUT020.ADDRNUMBER → ADRC.COUNTRY. Replaces LFA1.LAND1.Inferred
lead_time_daysINTEINA.APLFZPlanned delivery time from purchasing info record (retained)Explicit
quality_ratingDECIMAL(3,2)DWH aggregationAVG(fact_quality_inspection.score) over last 4 quartersExplicit
is_certifiedBOOLEANQMELQuality notification status check (no open critical notifications). QMEL retained.Explicit
is_currentBOOLEAN--SCD Type 2 current flagExplicit
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_store Core 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 AttributeTypeSAP S/4HANA SourceTransformation / Join LogicConfidence
PK store_skBIGINT--DWH surrogate key sequenceExplicit
store_idUUIDT001W.WERKSCast WERKS to UUIDExplicit
store_nameVARCHAR(200)T001W.NAME1Direct mappingExplicit
store_typeVARCHAR(20)T001W.FABKLMap factory calendar via ref_plant_type lookupExplicit
regionVARCHAR(100)T001W.REGIOJOIN T005S for region text: T001W.LAND1 + T001W.REGIO = T005S keyExplicit
cityVARCHAR(100)T001W.ORT01Direct mappingExplicit
country_codeCHAR(3)T001W.LAND1Direct mappingExplicit
open_dateDATET001W.ZOPNDTCustom field (Z-field) for store opening dateExplicit
is_currentBOOLEAN--SCD Type 2 current flagExplicit
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_promotion Core 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 AttributeTypeSAP S/4HANA SourceTransformation / Join LogicConfidence
PK promotion_skBIGINT--DWH surrogate key sequenceExplicit
promotion_idUUIDKONP.KNUMH + KOPOSComposite key from condition record number + position. KONP retained in S/4HANA.Explicit
promotion_nameVARCHAR(200)KONH.VTEXTCondition record description text. KONH retained.Explicit
typeVARCHAR(30)KONP.KSCHLMap condition type: ZP01=Discount, ZP02=BOGO, etc. (ABC-specific Z-conditions)Explicit
start_dateDATEKONP.DATABCondition validity start dateExplicit
end_dateDATEKONP.DATBICondition validity end dateExplicit
discount_pctDECIMAL(5,2)KONP.KBETRKBETR / 10 (SAP stores percentage conditions scaled by 10)Explicit
is_currentBOOLEAN--SCD Type 2 current flagExplicit
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_order Fact 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.
PDM AttributeTypeSAP S/4HANA SourceTransformation / Join LogicConfidence
PK order_skBIGINT--DWH surrogate key sequenceExplicit
FK customer_skBIGINTVBAK.KUNNR → CVIS_CUST_LINK → BUT000.PARTNER S/4 CHANGEVBAK still stores KUNNR. Resolve to BUT000.PARTNER via CVIS_CUST_LINK, then lookup dim_customer.customer_sk.Inferred
FK order_date_skINTVBAK.AUDATLookup dim_date.date_sk from AUDAT (document date)Explicit
FK store_skBIGINTVBAK.WERKSLookup dim_store.store_sk from WERKS (delivering plant)Explicit
statusVARCHAR(20)VBUK.GBSTKMap: A=Pending, B=Partial, C=Complete. VBUK retained in S/4HANA.Explicit
channelVARCHAR(20)VBAK.AUGRUMap order reason to channel. Secondary: ECOM orders.channelExplicit
total_amountDECIMAL(12,2)VBAK.NETWRNet value of the order. Secondary: ECOM orders.totalExplicit
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_snapshot Fact 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 AttributeTypeSAP S/4HANA SourceTransformation / Join LogicConfidence
PK inventory_skBIGINT--DWH surrogate key sequenceExplicit
FK product_skBIGINTMATDOC.MATNR S/4 CHANGELookup dim_product.product_sk via MATNR. Alternatively use CDS view I_MaterialStock.Inferred
FK store_skBIGINTMATDOC.WERKS S/4 CHANGELookup dim_store.store_sk via plant. MATDOC contains WERKS at document level.Inferred
FK date_skINT--dim_date.date_sk from snapshot run date (ETL schedule)Explicit
quantity_on_handINTMATDOC (aggregated) S/4 CHANGESUM(MATDOC.MENGE) WHERE stock_type = unrestricted. Or use CDS view I_MaterialStockTimeSeries. Replaces MARD.LABST.Inferred
quantity_reservedINTMATDOC (aggregated) S/4 CHANGESUM(MATDOC.MENGE) WHERE stock_type = reserved. Or use RESB (reservation table, retained). Replaces MARD.RESBE.Inferred
quantity_in_transitINTMATDOC (aggregated) S/4 CHANGESUM(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_sales Fact 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 AttributeTypeSAP S/4HANA SourceTransformation / Join LogicConfidence
PK sales_skBIGINT--DWH surrogate key sequenceExplicit
FK customer_skBIGINTVBRK.KUNAG → BUT000.PARTNER S/4 CHANGEResolve KUNAG via CVIS_CUST_LINK to PARTNER, then lookup dim_customer.customer_sk.Inferred
FK product_skBIGINTVBRP.MATNRLookup dim_product.product_sk via material numberExplicit
FK store_skBIGINTVBRP.WERKSLookup dim_store.store_sk via plantExplicit
FK promotion_skBIGINTPRCD_ELEMENTS S/4 CHANGELookup dim_promotion.promotion_sk via PRCD_ELEMENTS condition records on billing doc. Replaces KONV. JOIN on KNUMV (pricing doc number).Inferred
FK order_date_skINTVBRK.FKDATLookup dim_date.date_sk from billing dateExplicit
quantityDECIMAL(10,3)VBRP.FKIMGBilled quantity. Secondary: POS txn_line.qtyExplicit
unit_priceDECIMAL(10,2)VBRP.NETPRNet price per unit. Secondary: POS txn_line.unit_priceExplicit
line_totalDECIMAL(12,2)VBRP.NETWRNet value of line item. Secondary: POS txn_line.ext_priceExplicit
currency_codeCHAR(3)VBRK.WAERKDocument currency. Secondary: POS txn_header.currencyExplicit
PRCD_ELEMENTS Replaces KONV
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_shipment Fact 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 AttributeTypeSAP S/4HANA SourceTransformation / Join LogicConfidence
PK shipment_skBIGINT--DWH surrogate key sequenceExplicit
FK order_skBIGINTLIKP.VBELNLookup fact_order.order_sk via delivery-to-order document flow. LIKP retained.Explicit
FK store_skBIGINTLIKP.WERKSLookup dim_store.store_sk via shipping plantExplicit
FK ship_date_skINTLIKP.WADAT_ISTLookup dim_date.date_sk from actual goods issue dateExplicit
carrier_codeVARCHAR(20)LIKP.ROUTERoute code. Secondary: TMS shipment.carrier_scac. Embedded EWM: /SCWM/DLVH for warehouse-level carrier.Explicit
tracking_numberVARCHAR(50)TMS / 3PLExternal tracking from TMS shipment.tracking_id or 3PL APIExplicit
delivery_dateDATELIKP.LFDATPlanned delivery date. Secondary: TMS shipment.pod_dateExplicit
Embedded EWM Enhancement
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_return Fact 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 AttributeTypeSAP S/4HANA SourceTransformation / Join LogicConfidence
PK return_skBIGINT--DWH surrogate key sequenceExplicit
FK original_order_skBIGINTVBAK.AUGRULookup fact_order.order_sk via reference document (return-to-original link)Explicit
FK product_skBIGINTVBAP.MATNRLookup dim_product.product_sk via return order item materialExplicit
FK customer_skBIGINTVBAK.KUNNR → BUT000.PARTNER S/4 CHANGEResolve KUNNR via CVIS_CUST_LINK to PARTNER, then lookup dim_customer.customer_sk.Inferred
FK return_date_skINTVBAK.AUDATdim_date.date_sk from return order document date (RE type)Explicit
reason_codeVARCHAR(20)VBAK.AUGRUReturn reason code. Secondary: ECOM returns.reasonExplicit
refund_amountDECIMAL(12,2)VBRK.NETWRCredit memo net value (billing type G2). Secondary: ECOM refunds.amountExplicit
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.

dp_customer_360 Data Product
Unified customer profile combining transactional metrics, behavioural signals, and ML-derived scores. Daily refresh. Ultimate S/4HANA lineage: BUT000 → dim_customer → fact_sales → dp_customer_360.
PDM AttributeTypeDWH SourceTransformationUltimate SAP S/4HANA Source
PK customer_skBIGINTdim_customer.customer_skWHERE is_current = TRUEBUT000.PARTNER S/4
total_ordersINTfact_orderCOUNT(DISTINCT order_sk) WHERE status <> 'Cancelled'VBAK
total_spendDECIMAL(14,2)fact_salesSUM(line_total) all-timeVBRP.NETWR
avg_order_valueDECIMAL(10,2)Calculatedtotal_spend / NULLIF(total_orders, 0)--
first_purchase_dateDATEfact_sales + dim_dateMIN(dim_date.full_date) via order_date_skVBRK.FKDAT
last_purchase_dateDATEfact_sales + dim_dateMAX(dim_date.full_date) via order_date_skVBRK.FKDAT
preferred_categoryVARCHAR(100)fact_sales + dim_productMODE(dim_product.category) by frequencyT023.WGBEZ via MARA.MATKL
churn_risk_scoreDECIMAL(5,4)ml_feature_storeWHERE feature_name = 'churn_risk_90d'ML pipeline
ltv_predicted_12mDECIMAL(12,2)ml_feature_storeWHERE feature_name = 'ltv_next_12m'ML pipeline
customer_segmentVARCHAR(50)dp_customer_segmentationsegment_nameML pipeline
snapshot_dateDATECalculatedETL run date (daily refresh)--
dp_product_catalog Data Product
Enriched product catalog combining master data with sales velocity, pricing, and customer ratings. Ultimate S/4HANA lineage: MARA/MAKT/MBEW → dim_product → dp_product_catalog. Supplier name resolves through BUT000.
PDM AttributeTypeDWH SourceTransformationUltimate SAP S/4HANA Source
PK product_skBIGINTdim_product.product_skWHERE is_current = TRUEMARA.MATNR
skuVARCHAR(30)dim_product.skuDirectMARA.MATNR
product_nameVARCHAR(200)dim_product.product_nameDirectMAKT.MAKTX
category_l1VARCHAR(100)dim_product.departmentTop level (department)T023 hierarchy
category_l2VARCHAR(100)dim_product.categoryMid level (category)T023.WGBEZ
brandVARCHAR(100)dim_product.brandDirectMARA.BRAND_ID
supplier_nameVARCHAR(200)dim_supplier.supplier_nameJOIN via dim_product.supplier_skBUT000.NAME_ORG1 S/4
current_priceDECIMAL(10,2)dim_product.unit_priceWHERE is_current = TRUEKONP.KBETR (PR00)
costDECIMAL(10,2)dim_product.unit_costWHERE is_current = TRUEMBEW.STPRS
margin_pctDECIMAL(5,2)Calculated(current_price - cost) / NULLIF(current_price, 0) * 100--
velocity_rankINTfact_salesRANK() OVER (ORDER BY SUM(quantity) DESC) last 30dVBRP.FKIMG
avg_ratingDECIMAL(3,2)ECOM product_reviewsAVG(rating) by product_idExternal
review_countINTECOM product_reviewsCOUNT(*) by product_idExternal
dp_net_sales_daily Data 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 AttributeTypeDWH SourceTransformationUltimate SAP S/4HANA Source
PK date_skINTfact_sales.order_date_skGroup by dateVBRK.FKDAT
PK store_skBIGINTfact_sales.store_skGroup by storeVBRP.WERKS
gross_salesDECIMAL(14,2)fact_salesSUM(line_total) GROUP BY date_sk, store_skVBRP.NETWR
return_amountDECIMAL(14,2)fact_returnSUM(refund_amount) GROUP BY date_sk, store_skVBRK.NETWR (G2)
discount_amountDECIMAL(14,2)fact_sales + dim_promotionSUM(line_total * discount_pct / 100)PRCD_ELEMENTS.KBETR S/4
tax_amountDECIMAL(14,2)Calculatedgross_sales * ref_tax_rate.rate by store jurisdictionMLAN tax class
net_salesDECIMAL(14,2)Calculatedgross_sales - return_amount - discount_amount - tax_amount--
transaction_countINTfact_salesCOUNT(DISTINCT sales_sk)VBRK count
dp_sales_dailyData Product
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 AttributeTypeDWH SourceTransformationUltimate SAP S/4HANA Source
PK date_skINTfact_sales.order_date_skGroup by dateVBRK.FKDAT
PK store_skBIGINTfact_sales.store_skGroup by storeVBRP.WERKS
PK product_skBIGINTfact_sales.product_skGroup by productVBRP.MATNR
total_qtyDECIMAL(12,3)fact_salesSUM(quantity)VBRP.FKIMG
gross_amountDECIMAL(14,2)fact_salesSUM(line_total)VBRP.NETWR
transaction_countINTfact_salesCOUNT(sales_sk)VBRK count
avg_unit_priceDECIMAL(10,2)Calculatedgross_amount / NULLIF(total_qty, 0)--
avg_basket_sizeDECIMAL(10,2)fact_orderAVG(total_amount) by store, dateVBAK.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 AttributeTypeDWH SourceTransformationUltimate SAP S/4HANA Source
PK product_skBIGINTfact_inventory_snapshotLatest date_skMATDOC.MATNR S/4
PK store_skBIGINTfact_inventory_snapshotLatest date_skMATDOC.WERKS S/4
on_handINTfact_inventory_snapshot.quantity_on_handLatest snapshotMATDOC aggregate S/4
reservedINTfact_inventory_snapshot.quantity_reservedLatest snapshotMATDOC aggregate S/4
in_transitINTfact_inventory_snapshot.quantity_in_transitLatest snapshotMATDOC aggregate S/4
availableINTCalculatedon_hand - reserved--
avg_daily_sales_30dDECIMAL(8,2)dp_sales_dailySUM(total_qty) / 30 over last 30 daysVBRP.FKIMG
days_of_supplyDECIMAL(6,1)Calculatedavailable / NULLIF(avg_daily_sales_30d, 0)--
reorder_flagBOOLEANCalculateddays_of_supply < safety_stock_days_thresholdMARC.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 AttributeTypeDWH SourceTransformationUltimate SAP S/4HANA Source
PK supplier_skBIGINTdim_supplierWHERE is_current = TRUEBUT000.PARTNER (FLVN01) S/4
PK periodVARCHAR(10)dim_datefiscal_year + fiscal_period--
on_time_delivery_pctDECIMAL(5,2)fact_shipmentCOUNT(WHERE delivery ≤ promise) / COUNT(*) * 100LIKP.LFDAT vs VBEP.EDATU
quality_defect_rateDECIMAL(5,4)fact_return + fact_salesCOUNT(returns WHERE reason = quality) / COUNT(sales) * 100VBAK.AUGRU + VBRP
lead_time_avg_daysDECIMAL(5,1)fact_shipment + fact_orderAVG(DATEDIFF(delivery - order_date))LIKP + VBAK dates
cost_variance_pctDECIMAL(5,2)Calculated(actual_cost - contracted_cost) / contracted_cost * 100EKPO prices
fill_rate_pctDECIMAL(5,2)fact_order + fact_shipmentSUM(delivered_qty) / SUM(ordered_qty) * 100LIPS + VBAP qtys
overall_scoreDECIMAL(3,2)CalculatedWeighted avg (OTD*0.3 + Quality*0.25 + Lead*0.2 + Cost*0.15 + Fill*0.1)--
dp_store_analyticsData Product
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 AttributeTypeDWH SourceTransformationUltimate SAP S/4HANA Source
PK store_skBIGINTdim_storeDirectT001W.WERKS
PK date_skINTdim_dateDirect--
revenueDECIMAL(14,2)dp_net_sales_dailySUM(net_sales)VBRP.NETWR
footfallINTPOS store_trafficvisitor_count daily totalExternal (POS)
transactionsINTdp_net_sales_dailySUM(transaction_count)VBRK count
conversion_rateDECIMAL(5,2)Calculatedtransactions / NULLIF(footfall, 0) * 100--
avg_basketDECIMAL(10,2)Calculatedrevenue / NULLIF(transactions, 0)--
sales_per_sqftDECIMAL(10,2)Calculatedrevenue / dim_store.square_footageT001W custom field
shrinkage_pctDECIMAL(5,2)WMS shrinkage_reportloss_value / revenue * 100External (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.
PDM AttributeTypeDWH SourceTransformationUltimate SAP S/4HANA Source
PK promotion_skBIGINTdim_promotionDirectKONP.KNUMH
PK product_skBIGINTdim_productDirectMARA.MATNR
baseline_qtyDECIMAL(10,2)dp_sales_dailyAVG(total_qty) 4 weeks pre-promoVBRP.FKIMG
promo_qtyDECIMAL(10,2)dp_sales_dailyAVG(total_qty) during promo periodVBRP.FKIMG
lift_pctDECIMAL(5,2)Calculated(promo_qty - baseline_qty) / NULLIF(baseline_qty, 0) * 100--
discount_costDECIMAL(12,2)fact_sales + dim_promotionSUM(line_total * discount_pct / 100) during promoPRCD_ELEMENTS.KBETR S/4
incremental_revenueDECIMAL(12,2)Calculated(promo_qty - baseline_qty) * avg_unit_price * promo_days--
roiDECIMAL(8,2)Calculated(incremental_revenue - discount_cost) / NULLIF(discount_cost, 0) * 100--
dp_order_fulfillmentData Product
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 AttributeTypeDWH SourceTransformationUltimate SAP S/4HANA Source
PK order_skBIGINTfact_orderDirectVBAK.VBELN
promise_dateDATESAP directVBEP.EDATU (schedule line confirmed date)VBEP.EDATU
days_to_shipINTCalculatedDATEDIFF(day, order_date, ship_date)--
days_to_deliverINTCalculatedDATEDIFF(day, order_date, delivery_date)--
on_time_flagBOOLEANCalculateddelivery_date ≤ promise_date--
complete_flagBOOLEANCalculatedALL line items shipped--
return_flagBOOLEANfact_returnEXISTS WHERE original_order_sk = order_skVBAK (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 AttributeTypeSourceNotes
PK customer_skBIGINTdp_customer_360.customer_skCurrent customers only
segment_idINTML: k-means cluster_idk=6, trained quarterly
segment_nameVARCHAR(50)ML: cluster label mappingChampions, Loyal, At Risk, Lost, etc.
rfm_recencyINTdp_customer_360.days_since_last_purchaseRecency score
rfm_frequencyINTdp_customer_360.total_ordersFrequency score
rfm_monetaryDECIMAL(14,2)dp_customer_360.total_spendMonetary value
propensity_scoreDECIMAL(5,4)ml_feature_storeWHERE feature_name = 'purchase_propensity'
model_versionVARCHAR(20)ML: model registryVersion 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 AttributeTypeSourceNotes
PK product_skBIGINTdim_productAll active products
PK store_skBIGINTdim_storeAll active stores
PK forecast_date_skINTdim_date (future)Future dates, 90-day horizon
forecast_qtyDECIMAL(10,2)ML pipeline outputProphet/LightGBM ensemble, daily grain
confidence_lowDECIMAL(10,2)ML pipeline output80% prediction interval lower bound
confidence_highDECIMAL(10,2)ML pipeline output80% prediction interval upper bound
model_versionVARCHAR(20)ML: model registryVersion 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 AttributeTypeSourceNotes
PK feature_skBIGINTSEQDWH surrogate key
feature_nameVARCHAR(100)ML: Feature registrye.g., churn_risk_90d, ltv_next_12m
feature_valueDECIMAL(18,6)ML pipeline outputComputed feature value
entity_keyVARCHAR(100)DWH entity PKcustomer_id, product_id, etc.
entity_typeVARCHAR(50)ML: entity enumcustomer, product, store, order
event_timestampTIMESTAMPCalculatedPoint-in-time for feature correctness
versionINTML: Feature registryAuto-incremented feature version
ml_training_snapshotML/AI
Immutable snapshots of ML training datasets for reproducibility and audit. No direct SAP source.
PDM AttributeTypeSourceNotes
PK dataset_skBIGINTSEQDWH surrogate key
model_nameVARCHAR(100)ML: model registryModel identifier
created_atTIMESTAMPCalculatedSnapshot creation timestamp (immutable)
feature_versionINTml_feature_store.versionFeature version at time of snapshot
row_countINTCalculatedCOUNT(*) of snapshotted rows
label_columnVARCHAR(50)ML: model configTarget variable definition
train_split_pctDECIMAL(3,2)ML: model configTrain/test split ratio
source_query_hashVARCHAR(64)CalculatedSHA256 of the SQL that generated the dataset
is_pii_freeBOOLEANCalculatedAutomated 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.

ECC SourceS/4HANA ReplacementAffected PDM EntitiesMapping Impact
KNA1 BUT000 (role FLCU01) dim_customer, fact_order (FK), fact_sales (FK), fact_return (FK), dp_customer_360, dp_customer_segmentation 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.
LFA1 BUT000 (role FLVN01) dim_supplier, dp_product_catalog (supplier_name), dp_supplier_scorecard Vendor ID changes from LIFNR to PARTNER. CVI bridge: CVIS_VEND_LINK. Address via BUT020 → ADRC.
MKPF + MSEG MATDOC fact_inventory_snapshot, dp_inventory_position, fact_return (goods movement) Header/item merged. MARD becomes CDS aggregate view. Stock quantities derived from MATDOC postings rather than stored running totals.
MARD (stock) MATDOC aggregate / CDS I_MaterialStock fact_inventory_snapshot LABST, RESBE, UMLME no longer physically stored; computed on-the-fly from MATDOC. ETL reads CDS view or aggregates MATDOC.
KONV PRCD_ELEMENTS fact_sales (promotion_sk FK), dp_net_sales_daily (discount), dp_promotion_effectiveness (discount_cost) Document pricing conditions. Join key KNUMV unchanged. Master conditions (KONH/KONP) retained; only document-level conditions affected.
BSEG / CO-PA ACDOCA Not directly mapped in current PDM (available as alternative source for fact_sales financial analysis) Universal Journal consolidates FI/CO/CO-PA. Provides single-row revenue/cost posting. Optional supplementary source.
WM (LQUA, LTBK) Embedded EWM (/SCWM/*) fact_shipment (optional warehouse enrichment) Warehouse execution data available in-system. Not required for current PDM grain but enables future enrichment.