C_TimeVarianceCube

DDL: C_TIMEVARIANCECUBE SQL: CMMTIMEVARCUBE Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

Time Variance

C_TimeVarianceCube (Consumption)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Public Edition with built-in and side-by-side extension capabilities.

Sourcing & Procurement

C_TimeVarianceCube is a Consumption CDS View (Cube) that provides data about "Time Variance" in SAP S/4HANA. It reads from 1 data source (P_TimeVariance1) and exposes 52 fields with key fields PurchaseOrder, PurchaseOrderItem, ScheduleLine. It has 13 associations to related views. Part of development package ODATA_MM_ANALYTICS.

SAP API Hub

CategoryConsumption
StateC1
Line of BusinessSourcing & Procurement
Application ComponentMM-PUR-ANA-2CL
CapabilitiesData Provider for Analytical Queries
Extensible (Key User)No
Extensible (Developer)No
Release State (Key User)Released
Release State (Developer)Released
PackageSourcing and Procurement for SAP S/4HANA Cloud Public Edition

Documentation

Data Sources (1)

SourceAliasJoin Type
P_TimeVariance1 P_TimeVariance1 from

Parameters (2)

NameTypeDefault
P_StartDate budat
P_EndDate budat

Associations (13)

CardinalityTargetAliasCondition
[1..1] I_CalendarDate _Calendar $projection.PurchaseOrderDate = _Calendar.CalendarDate
[1..1] I_ProductGroup_2 _MaterialGroup $projection.MaterialGroup = _MaterialGroup.ProductGroup
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[1..1] I_Product _Material $projection.Material = _Material.Product
[0..1] I_PurchasingGroup _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[0..1] I_PurchasingOrganization _PurchasingOrganization $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
[1..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[1..1] I_PurgCatMaterialGroupAPI01 _PurchasingCategoryMatlGroup $projection.MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup
[1..1] I_PurchasingDocumentCategory _PurchasingDocumentCategory $projection.PurchasingDocumentCategory = _PurchasingDocumentCategory.PurchasingDocumentCategory
[1..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[1..1] I_Country _Country $projection.SupplierCountry = _Country.Country
[1..1] I_PurchasingCategoryValueHelp _PurchasingCategory $projection.PurchasingCategory = _PurchasingCategory.PurchasingCategory
[1..1] I_Region _Region $projection.Region = _Region.Region and _Region.Country = $projection.SupplierCountry

Annotations (17)

NameValueLevelField
AbapCatalog.sqlViewName CMMTIMEVARCUBE view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Time Variance view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
OData.publish true view
Analytics.dataCategory #CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
Metadata.ignorePropagatedAnnotations true view
Analytics.internalName #LOCAL view
Metadata.allowExtensions true view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view
AbapCatalog.preserveKey true view

Fields (52)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder Purchase Order Number
KEY PurchaseOrderItem Item Number of Purchase Order
KEY ScheduleLine ScheduleLine Schedule Line Number
DeliveryDate Delivery Date
SchedLineStscDeliveryDate Statistics-Relevant Delivery Date
OriglPOSchdLnDelivDte OriglPOSchdLnDelivDte Original Delivery Date
OriglPOSchedLineStstclDelivDte OriglPOSchedLineStstclDelivDte Original Statistical Delivery Date
PurOrdItmFinalGRPostingDate PurOrdItmFinalGRPostingDate Final Goods Receipt Date
PurOrdItmFirstGRPostingDate PurOrdItmFirstGRPostingDate First Goods Receipt Date
OriglPurOrdItm1stGRPostgDte OriglPurOrdItm1stGRPostgDte Original First Good Receipt Posting Date
OriglPurOrdItmFnlGRPostgDte OriglPurOrdItmFnlGRPostgDte Original Final Goods Receipt Posting Date
PurchaseOrderDate PurchaseOrderDate Purchasing Document Date
CalendarYear _Calendar CalendarYear Calendar Year
CalendarQuarter _Calendar CalendarQuarter Calendar Quarter
CalendarMonth _Calendar CalendarMonth Calendar Month
CalendarWeek _Calendar CalendarWeek Calendar Week
PurgDocMigrtnIsCmpltdForAnlyts PurgDocMigrtnIsCmpltdForAnlyts Single-Character Flag
SuplrEvalRelevantDocCategory SuplrEvalRelevantDocCategory Supplier Evaluation Configuration for Document Category type
PurchasingOrganization SupplierEvalByTime PurchasingOrganization Purchasing Organization
PurchasingGroup PurchasingGroup Purchasing Group
CompanyCode CompanyCode Receiver Company Code
Supplier Supplier Account Number of Supplier
Region _Supplier Region Region (State, Province, County)
SupplierCountry Supplier Country/Region
Material Material Material Number
MaterialGroup SupplierEvalByTime MaterialGroup Material Group
Plant SupplierEvalByTime Plant Valuation Area
PurchasingCategory Purchasing Category ID
PurgCatName Name of Purchasing Category
PurchasingDocumentCategory PurchasingDocumentCategory Purchasing Document Category
TimeVarianceInDays Overdue Days
TimeVarianceInPct Variance % for Statistical Delivery Date
TimeVarianceInPctByDelivDate Variance for Delivery Date
dec30asTimeVarianceScore
TimeVarianceScoreByDelivDate Delivery Date Score
TmeVarcScrByDelivDateValue Time variance by statistical delivery date
PurchaseOrderItemUniqueID Concatenation of EBELN and EBELP
NumberOfPurchaseOrders Number of Purchase Orders
NumberOfPurchaseOrderItems Number of Purchase Order Items
NumberOfScheduleLines Number of Purchase Order Items
_Calendar _Calendar
_MaterialGroup _MaterialGroup
_Supplier _Supplier
_Material _Material
_PurchasingGroup _PurchasingGroup
_PurchasingOrganization _PurchasingOrganization
_Plant _Plant
_PurchasingDocumentCategory _PurchasingDocumentCategory
_CompanyCode _CompanyCode
_Country _Country
_Region _Region
_PurchasingCategory _PurchasingCategory

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view C_TimeVarianceCube.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: CMMTIMEVARCUBE
-- Parameters: P_StartDate : budat, P_EndDate : budat

CREATE VIEW C_TimeVarianceCube AS
SELECT
  cast( SupplierEvalByTime.PurchaseOrder as vdm_purchaseorder ) AS PurchaseOrder,
  cast(SupplierEvalByTime.PurchaseOrderItem as vdm_purchaseorderitem) AS PurchaseOrderItem,
  ScheduleLine,
  cast( ScheduleLineDeliveryDate as fieu_deliverydate) AS DeliveryDate,
  cast( SchedLineStscDeliveryDate as slfdt) AS SchedLineStscDeliveryDate,
  OriglPOSchdLnDelivDte,
  OriglPOSchedLineStstclDelivDte,
  PurOrdItmFinalGRPostingDate,
  PurOrdItmFirstGRPostingDate,
  OriglPurOrdItm1stGRPostgDte,
  OriglPurOrdItmFnlGRPostgDte,
  PurchaseOrderDate,
  _Calendar.CalendarYear AS CalendarYear,
  _Calendar.CalendarQuarter AS CalendarQuarter,
  _Calendar.CalendarMonth AS CalendarMonth,
  _Calendar.CalendarWeek AS CalendarWeek,
  PurgDocMigrtnIsCmpltdForAnlyts,
  SuplrEvalRelevantDocCategory,
  SupplierEvalByTime.PurchasingOrganization AS PurchasingOrganization,
  PurchasingGroup,
  CompanyCode,
  Supplier,
  _Supplier.Region AS Region,
  cast( _Supplier.Country as mm_a_supplier_country ) AS SupplierCountry,
  Material,
  SupplierEvalByTime.MaterialGroup AS MaterialGroup,
  SupplierEvalByTime.Plant AS Plant,
  _PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory AS PurchasingCategory,
  _PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName AS PurgCatName,
  PurchasingDocumentCategory,
  cast ( TimeVarianceInDays as mm_a_overdue_days ) AS TimeVarianceInDays,
  cast ( TimeVarianceInPct as mmpur_ana_timevar_statdelivpct ) AS TimeVarianceInPct,
  cast( TimeVarianceInPctByDelivDate as mm_a_variance_delivery_pct ) AS TimeVarianceInPctByDelivDate,
  cast( case when UpdatedScore.IsScoreChanged = 'X' then UpdatedScore.TimeVarianceScore else SupplierEvalByTime.TimeVarianceScore end as abap.dec(3,0) ) as TimeVarianceScore AS dec30asTimeVarianceScore,
  cast ( TimeVarianceScoreByDelivDate as abap.dec(3,0)) AS TimeVarianceScoreByDelivDate,
  cast ( TimeVarianceScoreByDelivDate as mm_pur_ana_stat_timevar_score) AS TmeVarcScrByDelivDateValue,
  cast( PurchaseOrderItemUniqueID as purchasingdocumentitemuniqueid ) AS PurchaseOrderItemUniqueID,
  cast( 1 as mm_pur_ana_numbrofpurords ) AS NumberOfPurchaseOrders,
  cast( 1 as mm_pur_ana_numbrofpurorditms ) AS NumberOfPurchaseOrderItems,
  cast( 1 as mm_pur_ana_numbrofpurorditms ) AS NumberOfScheduleLines
FROM P_TimeVariance1
LEFT OUTER JOIN I_CalendarDate AS _Calendar ON PurchaseOrderDate = _Calendar.CalendarDate  -- association [1..1]
LEFT OUTER JOIN I_ProductGroup_2 AS _MaterialGroup ON MaterialGroup = _MaterialGroup.ProductGroup  -- association [1..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Product AS _Material ON Material = _Material.Product  -- association [1..1]
LEFT OUTER JOIN I_PurchasingGroup AS _PurchasingGroup ON PurchasingGroup = _PurchasingGroup.PurchasingGroup  -- association [0..1]
LEFT OUTER JOIN I_PurchasingOrganization AS _PurchasingOrganization ON PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant  -- association [1..1]
LEFT OUTER JOIN I_PurgCatMaterialGroupAPI01 AS _PurchasingCategoryMatlGroup ON MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup  -- association [1..1]
LEFT OUTER JOIN I_PurchasingDocumentCategory AS _PurchasingDocumentCategory ON PurchasingDocumentCategory = _PurchasingDocumentCategory.PurchasingDocumentCategory  -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [1..1]
LEFT OUTER JOIN I_Country AS _Country ON SupplierCountry = _Country.Country  -- association [1..1]
LEFT OUTER JOIN I_PurchasingCategoryValueHelp AS _PurchasingCategory ON PurchasingCategory = _PurchasingCategory.PurchasingCategory  -- association [1..1]
LEFT OUTER JOIN I_Region AS _Region ON Region = _Region.Region AND _Region.Country = SupplierCountry  -- association [1..1]
;