Document Links
ERP-1041 - Getting issue details... STATUS
Introduction
This Data Flow Specification (DFS) defines the end-to-end data flow required to meet the following requirements:
- Total stock balances (value and quantity) by Posting Date for every Material/Plant/Storage Location/Stock Type.
- Freight KPI scores (Freight Unit Compliance, FSD Timing, Freight Agreement Usage, Overall Compliance) tracked weekly and by business entity.
- Freight Cost analysis – breakdown of transportation charges by type, carrier, company code, purchasing organisation, plant, document and posting status.
- Carrier Performance – confirmed pick-up vs. actual, confirmed ETA vs. actual arrival, Proof-of-Delivery rate, and event-reporting rate.
- Freight Cost Allocation – breakdown of settled freight costs by company code, sales/purchase organisation, plant, order, material and G/L account.
KPI | Analytical Model |
Stock Balances | 4MA_P2FINV_MaterialStock |
Freight KPI Report (ERP-1795) | xxxxxxxxxx |
Freight Cost Report (ERP-1792) | xxxxxxxxxx |
Carrier Performance (ERP-1782) | xxxxxxxxxx |
Freight Cost Allocation (ERP-2359) | 4MA_P2FTMS_FrtCstAlloc |
Stock Balances
The objective of the Stock Balances Analytical Model is to provide a comprehensive view of Material/Plant/Storage Location/Stock Type values and quantities at a given date, which reconciles to MB52.
Quantities and values are obtained from a combination of Goods Movement (MM) documents and Fi adjustment postings.
Snapshots of monthly and weekly inventories will be created and partitioned (how so it makes sense?)
A persisted/portioned flow, containing aggregated data will also be created. This aggregated view will carry the stock balances for a month by Material/Plant/Storage Location/Stock Type. The current month stock movements will be union-ed to it to get to the current month ending balance.
EWM Managed Plants:
No differentiation in the handling of EWM managed plants is required. EWM handles the process, but each movement is reflected as a GoodsMovementDocument in table MSEG. This allows for a single process to calculate Closing Inventory.
The standard CDS views for physical stock and plant stock for EWM managed plants will be extracted and made available for reporting (if required for cross-instance reporting).
Physical Inventory
Physical inventory adjustments are processed in SAP as material documents with movement types 701/702 (inventory difference posting). These postings are captured in MSEG and will flow through the standard I_GoodsMovementDocument CDS view. No separate extraction path is required; physical inventory adjustments are included in the GoodsMovementDocumentDEX flow and will be unioned with the period opening balance to produce the closing balance.
Source System Extractors
`
| Extractor Name | Build Jira Ref For Extension Information |
|---|---|
Z_I_TranspRoot (XE_TransRoot) | |
Z_I_TranspChargesRoot (XE_TransChRoot) | |
Z_I_TranspChargesItem (XE_TransChitem) | |
Z_I_TranspChargesItemElement (XE_TransChItemE) | |
Z_I_TranspExecData (XE_TransExec) | |
Z_I_TranspRootNode (XE_TransRootN) | |
Z_I_TranspRootNode (XE_TransRootN) |
Inbound Layer
Extension of the cds views SCTMS_D required to include the expected extensions mentioned in ERP-1792 'Manual updated charges vs Freight Agreement calculated amount'
TMS KPI to source mapping
Jira | KPI | Source Views (Harmonisation Layer 2VR_*) | |||||||||
2VR_TransRoot | 2VR_TransChRoot | 2VR_TransChitem | 2VR_TransChItemE | 2VR_TransExec | 2VR_TransRootN | 2VR_Outbound | 2VR_CustSettlmt | 2VR_GL_Acc_Line | |||
Z_I_TranspRoot /SCMTMS/D_TORROT | Z_I_TranspChargesRoot /SCMTMS/D_TCHRGR | Z_I_TranspChargesItem /SCMTMS/D_TCHRGI | Z_I_TranspChargesItemElement /SCMTMS/D_TCHRGE | Z_I_TranspExecData /SCMTMS/D_TOREXE | Z_I_TranspRootNode /SCMTMS/D_SF_ROT | I_OutboundDelivery (LIKP/LIPS) | C_CustSettlmtDEX (WBRK/WBRP) | I_GLAccountLineItemRAW (ACDOCA) | Notes | ||
ERP-1795 | Freight Unit Compliance Score | ✓ | ✓ | FUs with planning status at time of PGI. Delivery goods movement date as base. | |||||||
ERP-1795 | FSD Timing Compliance Score | ✓ | ✓ | ✓ | FSD CREATED_ON vs ActualDeparture (PlannedDeparture as fallback). | ||||||
ERP-1795 | Freight Agreement Usage Score | ✓ | ✓ | ✓ | ✓ | FAGRMNTID044 presence on charge items; MANUALLY_CHANGED on charge elements. | |||||
ERP-1795 | Overall Compliance Score | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Weighted average of the three scores above. | ||
ERP-1792 | Manual Charges vs FA Calculated | ✓ | ✓ | ✓ | ✓ | CALC_AMOUNT vs AMOUNT where MANUALLY_CHANGED = X on charge elements. | |||||
ERP-1792 | 3rd Party Charges Overview | ✓ | ✓ | ✓ | ✓ | Charges assigned to 3rd party; filtered by charge type on element. | |||||
ERP-1792 | Freight Agreement Utilisation | ✓ | ✓ | ✓ | ✓ | All freight orders linked to a freight agreement including costs. | |||||
ERP-1792 | Freight Charge Breakdown | ✓ | ✓ | ✓ | ✓ | Breakdown by charge type, carrier, posting/doc status, timeline. | |||||
ERP-1782 | Confirmed Pick-up vs Actual | ✓ | ✓ | Earliest pick-up event vs confirmed pick-up date on freight order. | |||||||
ERP-1782 | Confirmed ETA vs Actual Arrival | ✓ | ✓ | Earliest arrival event vs confirmed ETA on freight order. | |||||||
ERP-1782 | Proof of Delivery Rate | ✓ | ✓ | POD event reported (PROCESSING_STATUS = Confirmed) as % of total FOs. | |||||||
ERP-1782 | Event Reporting Rate | ✓ | ✓ | Critical event compliance per defined rules; split Outbound / Inbound. | |||||||
ERP-2359 | Freight Cost to Cost Account/Material Account | ✓ | ✓ | Amount posted to material/expense/P&L G/L accounts after settlement. | |||||||
ERP-2359 | Cost Allocation Breakdown | ✓ | ✓ | ✓ | Breakdown by CompanyCode, PurchOrg, Plant, Material, SalesOrder/PO, G/L. | ||||||
Source View / Extractor | Key Relationships |
Freight Order /SCMTMS/D_TORROT (XE_TransRoot = Z_I_TranspRoot) | DB_KEY = TOR_ID |
Freight Order /SCMTMS/D_TORITE | NEW |
Charges Root /SCMTMS/D_TCHRGR (XE_TransChRoot = Z_I_TranspChargesRoot) | DB_KEY = HOST_KEY (DB_KEY freight order) |
Charges Item /SCMTMS/D_TCHRGI (XE_TransChitem = Z_I_TranspChargesItem) | DB_KEY = PARENT_KEY (DB_KEY charges root) |
Charges Elem /SCMTMS/D_TCHRGE (XE_TransChItemE = Z_I_TranspChargesItemElement) | DB_KEY = ROOT_KEY (charges root) or PARENT_KEY (charges item) |
Execution Events /SCMTMS/D_TOREXE (XE_TransExec = Z_I_TranspExecData) | Linked via TORITMUID to freight order item |
Freight Settl. Doc /SCMTMS/D_SF_ROT (XE_TransRootN = Z_I_TranspRootNode) | SFIR_ID; linked to freight order via REF_KEY |
Customer Settlement (XE_CustSettlmt = C_CustSettlmtDEX) | WBRP/WBRK; joined to GL via CompanyCode + FiscalYear + ReferenceDocument |
Harmonisation Layer
2TL_S2HARM_GoodsMovementDocumentDEX
Purpose:
- Delta load of Material Documents
- Set keys
- Filled by Transformation Flow 2TF_S4HARM_I_GoodsMovementDocumentDEX
2TF_S4HARM_I_GoodsMovementDocumentDEX
Source: 1TL_S4Hx_I_GOODSMOVEMENTDOCUMENTDEX
Projection:
| Project Details |
|---|
Add as Key: MaterialDocumentYear |
Add as Key: MaterialDocument |
Add as Key: MaterialDocumentItem |
Note, keep keys MaterialDocumentKey1 - 6 for Delta Capture.
2VR_S2HARM_GoodsMovementDocumentDEX
Projection:
| Projection Details |
|---|
Exclude Column: MaterialDocumentKey1 |
Exclude Column: MaterialDocumentKey2 |
Exclude Column: MaterialDocumentKey3 |
Exclude Column: MaterialDocumentKey4 |
Exclude Column: MaterialDocumentKey5 |
Exclude Column: MaterialDocumentKey6 |
2TL_S4HARM_C_TranspOrdItemAnlytsSDEX
Source: 1TL_S4Hx_I_GOODSMOVEMENTDOCUMENTDEX
Purpose:
- Delta load of Transportation Order Items
- Filled by Transformation Flow 2TF_S4HARM_C_TranspOrdItemAnlytsSDEX
2TF_S4HARM_C_TranspOrdItemAnlytsSDEX
Source: 1TL_S4HR_C_TranspOrdItemAnlytsSDEX
- No transformations
2VR_S4HARM_C_TranspOrdItemAnlytsSDEX
Filter:
(TransportationOrder <> '' OR TransportationOrder IS NOT NULL) |
|---|
Formula:
| Field | Formula |
|---|---|
| TransportationOrderItemUUID | BINTOHEX(TransportationOrderItemUUID) |
| TransportationOrderUUID | BINTOHEX(TransportationOrderUUID) |
| TranspOrdItemParentItemUUID | BINTOHEX(TranspOrdItemParentItemUUID) |
| SourceStopUUID: | BINTOHEX(SourceStopUUID) |
| DestinationStopUUID | BINTOHEX(DestinationStopUUID) |
| CarrierUUID | BINTOHEX(CarrierUUID) |
| ShipperUUID | BINTOHEX(ShipperUUID |
| ConsigneeUUID | BINTOHEX(ConsigneeUUID) |
| TranspOrdNetDuration | to_double(TranspOrdNetDuration) |
| TranspOrdItemShipperUUI | BINTOHEX(TranspOrdItemShipperUUID) |
| ProductUUID | BINTOHEX(ProductUUID) |
| NetDurationInHours | to_decimal((to_integer("TranspOrdNetDuration" / 10000)) + (to_integer((MOD("TranspOrdNetDuration", 10000)) / 100) / 60 ),5,2) |
2TF_S4HARM_I_TranspOrdStageAnalytics
Source: 1TL_S4Hx_I_TRANSPORDSTAGEANALYTICS
- No transformations
2TL_S4HARM_I_TranspOrdStageAnalytics
Purpose:
- Delta load of Transportation Order Items
- Filled by Transformation Flow 2TF_S4HARM_I_TranspOrdStageAnalytics
2VR_S4HARM_I_TranspOrdStageAnalytics
Filter:
| TranspOrdStageDestStopCategory = 'L' |
Projection: Exclude ALL, except:
| Projection Details |
|---|
Include Column: TransportationOrderUUID |
Include Column: TranspOrdStageDistance |
Include Column: TranspOrdStageDistanceUnit |
Include Column: TranspOrdStageNetDuration |
Formula:
| Field | Formula |
|---|---|
| TransportationOrderStageUUID | BINTOHEX(TransportationOrderStageUUID) |
| TransportationOrderUUID | BINTOHEX(TransportationOrderUUID) |
| TranspOrdStageSrceStopUUID | BINTOHEX(TranspOrdStageSrceStopUUID) |
| TranspOrdStageDestStopUUID | BINTOHEX(TranspOrdStageDestStopUUID) |
| CarrierUUID | BINTOHEX(CarrierUUID) |
| NumberOfStages | 1 |
Aggregation
| Field | Aggregation |
|---|---|
| NumberOfStages | SUM |
| TranspOrdStageDistance | SUM |
| TranspOrdStageNetDuration | SUM |
2TL_S4HARM_I_TranspChargesRoot (2TL_TransChRoot)
Purpose:
- Delta load of Freight Order Charge Root records (/SCMTMS/D_TCHRGR)
- Filled by Transformation Flow 2TF_S4HARM_I_TranspChargesRoot
2TF_S4HARM_I_TranspChargesRoot
Source: 1TL_S4Hx_I_TranspChargesRoot (1TL_TransChRoot)
- No transformations
2VR_S4HARM_I_TranspChargesRoot (2VR_TransChRoot)
Filter:
CALC_STATUS <> ''
Formula:
Field | Formula |
HOST_KEY | BINTOHEX(HOST_KEY) |
HOST_BO_KEY | BINTOHEX(HOST_BO_KEY) |
HOST_NODE_KEY | BINTOHEX(HOST_NODE_KEY) |
2TL_S4HARM_I_TranspChargesItem (2TL_TransChitem)
Purpose:
- Delta load of Freight Order Charge Item records (/SCMTMS/D_TCHRGI)
- Filled by Transformation Flow 2TF_S4HARM_I_TranspChargesItem
2TF_S4HARM_I_TranspChargesItem
Source: 1TL_S4Hx_I_TranspChargesItem (1TL_TransChitem)
- No transformations
2VR_S4HARM_I_TranspChargesItem (2VR_TransChitem)
Filter:
HOST_KEY IS NOT NULL
Formula:
Field | Formula |
HOST_KEY | BINTOHEX(HOST_KEY) |
HOST_BO_KEY | BINTOHEX(HOST_BO_KEY) |
HOST_NODE_KEY | BINTOHEX(HOST_NODE_KEY) |
HOST_ROOT_KEY | BINTOHEX(HOST_ROOT_KEY) |
PARENT_KEY | BINTOHEX(PARENT_KEY) |
PARENT_ITEM_KEY | BINTOHEX(PARENT_ITEM_KEY) |
EXECUTING_DOC_KEY | BINTOHEX(EXECUTING_DOC_KEY) |
DESTLOC_UUID | BINTOHEX(DESTLOC_UUID) |
SOURCELOC_UUID | BINTOHEX(SOURCELOC_UUID) |
CONTEXT_KEY | BINTOHEX(CONTEXT_KEY) |
ORIG_OP_UUID | BINTOHEX(ORIG_OP_UUID) |
PARTY_UUID | BINTOHEX(PARTY_UUID) |
REF_KEY | BINTOHEX(REF_KEY) |
REF_ROOT_KEY | BINTOHEX(REF_ROOT_KEY) |
UUID020 | BINTOHEX(UUID020) |
UUID057 | BINTOHEX(UUID057) |
2TL_S4HARM_I_TranspChargesItemElement (2TL_TransChItemE)
Purpose:
- Delta load of Freight Order Charge Element records (/SCMTMS/D_TCHRGE)
- Filled by Transformation Flow 2TF_S4HARM_I_TranspChargesItemElement
2TF_S4HARM_I_TranspChargesItemElement
Source: 1TL_S4Hx_I_TranspChargesItemElement (1TL_TransChItemE)
- No transformations
2VR_S4HARM_I_TranspChargesItemElement (2VR_TransChItemE)
Filter:
ROOT_KEY IS NOT NULL AND INVOICING <> ''
Formula:
Field | Formula |
ROOT_KEY | BINTOHEX(ROOT_KEY) |
PARENT_KEY | BINTOHEX(PARENT_KEY) |
PARENT_TCE | BINTOHEX(PARENT_TCE) |
DESTLOC_UUID | BINTOHEX(DESTLOC_UUID) |
SOURCELOC_UUID | BINTOHEX(SOURCELOC_UUID) |
DIST_ELEM_KEY | BINTOHEX(DIST_ELEM_KEY) |
REF_ELEM_KEY | BINTOHEX(REF_ELEM_KEY) |
RATE_RECORD_KEY | BINTOHEX(RATE_RECORD_KEY) |
CALCBASELINE_KEY | BINTOHEX(CALCBASELINE_KEY) |
UUID026 | BINTOHEX(UUID026) |
SPLIT_PARENT_KEY | BINTOHEX(SPLIT_PARENT_KEY) |
TARGET_ITEM_KEY | BINTOHEX(TARGET_ITEM_KEY) |
SRV_NODE | BINTOHEX(SRV_NODE) |
UUID_INDEX_RATE | BINTOHEX(UUID_INDEX_RATE) |
2TL_S4HARM_I_TranspExecData (2TL_TransExec)
Purpose:
- Delta load of Transportation Order Execution events (/SCMTMS/D_TOREXE)
- Provides event codes, actual dates/times, and discrepancy indicators for carrier performance KPIs (ERP-1782)
- Filled by Transformation Flow 2TF_S4HARM_I_TranspExecData
2TF_S4HARM_I_TranspExecData
Source: 1TL_S4Hx_I_TranspExecData (1TL_TransExec)
- No transformations
2VR_S4HARM_I_TranspExecData (2VR_TransExec)
Filter:
EVENT_REVOKED <> 'X' AND EVENT_STATUS <> ''
Formula:
Field | Formula |
TORITMUID | BINTOHEX(TORITMUID) |
TORSTOPUUID | BINTOHEX(TORSTOPUUID) |
TORSTSUID | BINTOHEX(TORSTSUID) |
PARENT_KEY | BINTOHEX(PARENT_KEY) |
EXT_LOC_UUID | BINTOHEX(EXT_LOC_UUID) |
ORIG_EXEC_KEY | BINTOHEX(ORIG_EXEC_KEY) |
ORIG_NODE_KEY | BINTOHEX(ORIG_NODE_KEY) |
REF_EXEC_KEY | BINTOHEX(REF_EXEC_KEY) |
ACTUAL_DATE | to_date(to_varchar(ACTUAL_DATE, 'YYYYMMDD'), 'YYYY-MM-DD') |
2TL_S4HARM_I_TranspRootNode (2TL_TransRootN)
Purpose:
- Delta load of Freight Settlement Documents (/SCMTMS/D_SF_ROT)
- Used to determine FSD creation timing relative to actual/planned departure for FSD Timing Compliance KPI (ERP-1795)
- Provides settlement document header data for joining with Customer Settlement (ERP-2359)
- Filled by Transformation Flow 2TF_S4HARM_I_TranspRootNode
2TF_S4HARM_I_TranspRootNode
Source: 1TL_S4Hx_I_TranspRootNode (1TL_TransRootN)
- No transformations
2VR_S4HARM_I_TranspRootNode (2VR_TransRootN)
Filter:
SFIR_TYPE <> '' AND LIFECYCLE <> 'X'
Formula:
Field | Formula |
TSP_UUID | BINTOHEX(TSP_UUID) |
REF_BO_KEY | BINTOHEX(REF_BO_KEY) |
REF_KEY | BINTOHEX(REF_KEY) |
BILL_FROM_PARTY | BINTOHEX(BILL_FROM_PARTY) |
PAYEE_ID | BINTOHEX(PAYEE_ID) |
CARRIER_INVOICE_KEY | BINTOHEX(CARRIER_INVOICE_KEY) |
CREATED_ON | to_date(to_varchar(CREATED_ON, 'YYYYMMDD'), 'YYYY-MM-DD') |
CREATION_DATE_EXT | to_date(to_varchar(CREATION_DATE_EXT, 'YYYYMMDD'), 'YYYY-MM-DD') |
2TL_S4HARM_C_CustSettlmtDEX (2TL_CustSettlmt)
Purpose:
- Delta load of Customer/Freight Settlement documents (C_CustSettlmtDEX – sourced from WBRP/WBRK)
- Provides settlement item data required for Freight Cost Allocation report (ERP-2359)
- Filled by Transformation Flow 2TF_S4HARM_C_CustSettlmtDEX
2TF_S4HARM_C_CustSettlmtDEX
Source: 1TL_S4Hx_C_CustSettlmtDEX (1TL_CustSettlmt)
- No transformations
2VR_S4HARM_C_CustSettlmtDEX (2VR_CustSettlmt)
Filter:
CustSettlmt IS NOT NULL
Projection:
Projection Details |
Include Column: CustSettlmt |
Include Column: CustSettlmtItem |
Include Column: CompanyCode |
Include Column: SettlementFiscalYear |
Include Column: ControllingArea |
Include Column: CostCenter |
Include Column: BusinessArea |
Include Column: PurchasingOrganization |
Include Column: Plant |
Include Column: Material |
Include Column: CndnContrType |
Include Column: ActualSettlmtDate |
Include Column: CreationDate |
Include Column: CreatedByUser |
Propagation Layer
3VR_P2FINC_MaterialStock
Source: 2VR_S2HARM_GoodsMovementDocumentDEX & 2VR_S4HARM_I_GLAccountLineItemRAW
Filters:
| Flow | Filter Values |
|---|---|
| 2VR_S4HARM_I_GLAccountLineItemRAW | "ReferenceDocumentType" = 'PRCHG' AND |
| 2VR_S4HARM_I_GoodsMovementDocumentDEX | Material" != '' AND "InventoryStockType" != '' |
Projection:
- 2VR_S4HARM_I_GLAccountLineItemRAW
- Only for join
- 2VR_S4HARM_I_GoodsMovementDocumentDEX
- Only for join
Union:
Accept default union mappings
3VF_P2FINV_MaterialStock
Source: 3VR_P2FINC_MaterialStock
Calculation:
| Name | Description | Data Type | Expression | Notes |
|---|---|---|---|---|
| RecordType | Used for Non-Cumulative Key Figures to track inventory balance over time. | Integer | case when 'PostingDate' < '20251231' then 2 when 'PostingDate' = '20251231' then 1 else 0 end | The dates must be parameterised to set the marker based on an input table. |
3VR_P2FTMS_TransportationOrderSql (3VR_TranOrdSql)
Source: 2VR_S4HARM_C_TranspOrdItemAnlytsDEX (2VR_TrItemDex)
Purpose:
- SQL-level aggregation and pre-join of Transportation Order items with Charges Root, Item, and Element data.
- Receives 2VR_S4HARM_I_TranspChargesRoot (2VR_TransChRoot), 2VR_S4HARM_I_TranspChargesItem (2VR_TransChitem), 2VR_S4HARM_I_TranspChargesItemElement (2VR_TransChItemE), and 2VR_S4HARM_I_TranspExecData (2VR_TransExec) via join.
- Filters and projects fields required downstream for 3VR_P2FTMS_TransportationOrder and the KPI analytical models.
3VR_P2FTMS_TransportationOrder (3VR_TranOrd)
Source: 3VR_P2FTMS_TransportationOrderSql (3VR_TranOrdSql) left join 2VR_S4HARM_C_TranspOrdStageAnalytics (2VR_TrStg)
Join Condition:
TransportationOrderSql.TransportationOrderUUID = TrStg.TransportationOrderUUID
Filter:
TransportationOrder <> '' AND TranspOrdLifeCycleStatus NOT IN ('X', 'Z')
Projection – include:
Projection Details |
Include Column: TransportationOrder |
Include Column: TransportationOrderUUID |
Include Column: TransportationOrderType |
Include Column: TransportationMode |
Include Column: CarrierUUID |
Include Column: ShipperUUID |
Include Column: ConsigneeUUID |
Include Column: FreightAgreement |
Include Column: PlannedDepartureDateTime |
Include Column: ActualDepartureDateTime |
Include Column: PlannedArrivalDateTime |
Include Column: ActualArrivalDateTime |
Include Column: TranspOrdLifeCycleStatus |
Include Column: TranspOrdPlanningStatus |
Include Column: ShippingCondition |
Include Column: TransportationOrderItemUUID |
Include Column: Product / ShipFromParty / ShipToParty |
Include Column: NetDurationInHours (stage) |
Include Column: NumberOfStages (stage) |
Include Column: TranspOrdStageDistance / DistanceUnit (stage) |
Include Charge fields: FAGRMNTID044, HOST_KEY, CALC_AMOUNT, AMOUNT, INVOICED_AMT, ANALYTICRELEV, CCOD, MANUALLY_CHANGED (from charges SQL join) |
Include Execution fields: EVENT_CODE, ACTUAL_DATE, DISCREPANCY, DISCR_TYPE, PROCESSING_STATUS (from exec join) |
3VF_P2FTMS_TransportationOrder (3VF_TranOrd)
Source: 3VR_P2FTMS_TransportationOrder (3VR_TranOrd)
- Formula / Calculation view applying any final field-level derivations and unit conversions before exposure to the analytical model.
3VR_P2FTMS_FrtCstAlloc (3VR_FrtCstAlloc)
Source: 2VR_S4HARM_I_TranspRootNode (2VR_TransRootN) JOIN 2VR_S4HARM_C_CustSettlmtDEX (2VR_CustSettlmt) JOIN 2VR_S4HARM_I_GLAccountLineItemRAW (2VR_GL_Acc_Line_Itm)
Join Condition (ERP-2359 specification):
G.CompanyCode = S.CompanyCode AND G.FiscalYear = S.SettlementFiscalYear AND G.ReferenceDocument = S.CustSettlmt AND G.ReferenceDocumentItem = S.CustSettlmtItem AND G.ReferenceDocumentContext = 'WB' AND N.REF_KEY = S.SettlmtRefDoc (link FSD to Settlement Doc)
Filter:
ReferenceDocumentContext = 'WB' AND S.CustSettlmt IS NOT NULL AND N.LIFECYCLE <> 'X'
Projection – from Customer Settlement (2VR_CustSettlmt):
Projection Details |
CustSettlmt, CustSettlmtItem |
CompanyCode, SettlementFiscalYear |
PurchasingOrganization, Plant, Material |
CndnContrType, ActualSettlmtDate |
Projection – from GL Account Line Item (2VR_GL_Acc_Line_Itm):
Projection Details |
GLAccount, DebitCreditCode |
AmountInCompanyCodeCurrency, CompanyCodeCurrency |
AmountInTransactionCurrency, TransactionCurrency |
CostCenter, ControllingArea, ProfitCenter, BusinessArea |
SalesOrder / PurchaseOrder |
Projection – from TranspRootNode (2VR_TransRootN):
Projection Details |
SFIR_ID (FSD document number) |
CREATED_ON (FSD creation timestamp) |
TSP_ID, PURCH_COMPANY_CODE, PURCH_ORG_ID |
LIFECYCLE, BLOCK, BLOCK_REASON |
3VF_P2FTMS_FrtCstAlloc (3VF_FrtCstAlloc)
Source: 3VR_P2FTMS_FrtCstAlloc (3VR_FrtCstAlloc)
- Formula / Calculation view. Applies any final derivations (e.g. account type classification Cost vs. Material) before exposure to the analytical model.
Reporting Layer
4MA_P2FINV_DowntimeFact
Supports:
Includes technical details for:
Calculated Measures (Post Aggregation Calculations / exception aggregation etc)
| Report Field Description | SAP Table-Field Name / process | Comments / Calculation / Formula / Restriction dimensions and values | Aggregation of data | Example SAP field data |
| CurrentStock | MatlStkChangeQtyInBaseUnit | Non-Cumulative Record Type Field: RecordType TimeDimension: PostingDate Earliest Reporting Start Date: TBD LatestReportingEndDate: TBD Set Unbooked Values to 0: X | LAST | 1,000 |
CurrentStockValue | InventoryValuationAmtInCoCodeCrcy | Non-Cumulative – same parameters as CurrentStock | SUM |
4MA_P2FTMS_TransportationOrder (4MA_TranOrd)
Source: 3VF_P2FTMS_TransportationOrder (3VF_TranOrd)
- Supports: Transportation order and freight charge analysis.
- This model provides the base analytical structure from which the Freight KPI Report (ERP-1795), Freight Cost Report (ERP-1792) and Carrier Performance Report (ERP-1782) SAC stories will be built.
Calculated Measures:
Detailed calculated measure specifications for 4MA_P2FTMS_TransportationOrder are pending story design for ERP-1795, ERP-1792, and ERP-1782.
xxxxxxxxxxxxxx – Freight KPI Report (ERP-1795)
Intended KPI measures (draft – subject to model naming decision):
Measure | Logic / Source |
FreightUnitComplianceScore | Ratio of Freight Units planned prior to PGI. Source: 2VR_S4HARM_I_OutboundDelivery + 2VR_S4HARM_I_TranspRoot. Hierarchy: Syensqo → Country → CompanyCode → Plant. |
FSDTimingComplianceScore | Ratio of FSDs where CREATED_ON <= ActualDepartureDateTime (PlannedDeparture as fallback). Source: 2VR_S4HARM_I_TranspRootNode. |
FreightAgreementUsageScore | Ratio of FSD items where FAGRMNTID044 IS NOT NULL. Manual updates counted: MANUALLY_CHANGED = 'X' on charges element. Excludes non-FA charge types (configurable list). |
OverallComplianceScore | Weighted average of the three scores. Weighting factors TBD per project requirements. |
xxxxxxxxxxxxx– Freight Cost Report (ERP-1792)
Intended measures (draft):
Measure | Logic / Source |
TotalChargeAmount | Sum of AMOUNT from Charges Element, restricted to INVOICING <> '' and ANALYTICRELEV = 'X'. |
ManualChargeVariance | CALC_AMOUNT vs AMOUNT on elements where MANUALLY_CHANGED = 'X'. Supports ERP-1792 KPI: Manual Updated Charges vs FA Calculated Amount. |
InvoicedAmount | INVOICED_AMT at Charges Root (total) and Element (detail) level. |
WeightedAvgFreightRate | TotalChargeAmount / TotalWeight (CHRG_WEI_VAL). Post-aggregation in SAC. |
[Not yet defined] – Carrier Performance Report (ERP-1782)
The analytical model for the Carrier Performance Report has not yet been assigned a name in the data flow diagram. This section is reserved once the model name is confirmed.
Intended measures (draft):
Measure | Logic / Source |
PickupOnTimeRate | Earliest actual pick-up event (EVENT_CODE = pick-up) vs PlannedDepartureDateTime +/- threshold. Source: 2VR_S4HARM_I_TranspExecData. |
ETAOnTimeRate | Earliest arrival event vs PlannedArrivalDateTime +/- threshold. Uses confirmed ETA from Transportation Order extension field. |
ProofOfDeliveryRate | Ratio of FOs with POD event reported (EVENT_CODE = POD, PROCESSING_STATUS = Confirmed). |
EventReportingRate | Compliance per defined event rules (ERP-1782). Separate rate for Outbound / Inbound FOs. |
Note: Event code mappings (pick-up, arrival, POD) must be configured as input parameters or a reference table in DSP, as they are client-specific customising values in /SCMTMS/D_TOREXE.
4MA_P2FTMS_FrtCstAlloc (4MA_FrtCstAlloc)
Source: 3VF_P2FTMS_FrtCstAlloc (3VF_FrtCstAlloc)
- Supports: ERP-2359 – Freight Cost Allocation Report.
Calculated Measures:
Measure | Base Fields | Calculation / Logic | Aggregation |
FreightCostToCostAccount | AmountInCompanyCodeCurrency | Sum of amounts where GLAccount is classified as an expense/cost account. | SUM |
FreightCostToMaterialAccount | AmountInCompanyCodeCurrency | Sum of amounts where GLAccount is classified as a material/stock account. | SUM |
CostVsMaterialSplit | FreightCostToCostAccount / TotalFreightCost | Ratio split between cost and material account postings. Expressed as %. | PERCENTAGE |
Dimensions:
- Company Code, Purchasing Organisation, Sales Organisation (where populated)
- Plant, Material, Sales Order / Purchase Order
- G/L Account, Cost Center, Controlling Area, Business Area
- Period (ActualSettlmtDate)
Out of Scope:
Breakdown by charge type or carrier – refer to Freight Cost Report (ERP-1792) for that analysis.
Restricted Measures
tbd
Currency Conversions
tbd



