C_TimeVarianceCube

DDL: C_TIMEVARIANCECUBE SQL: CMMTIMEVARCUBE Type: view CONSUMPTION

Time Variance

C_TimeVarianceCube (Consumption)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private 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 50 fields with key fields PurchaseOrder, PurchaseOrderItem, ScheduleLine. It has 8 associations to related views.

SAP API Hub

StateC1
Line of BusinessSourcing & Procurement
Application ComponentMM-PUR-ANA
CapabilitiesData Provider for Analytical Queries
PackageSourcing & Procurement for SAP S/4HANA Cloud Private Edition

Documentation

Data Sources (1)

SourceAliasJoin Type
P_TimeVariance1 P_TimeVariance1 from

Parameters (2)

NameTypeDefault
P_StartDate budat
P_EndDate budat

Associations (8)

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 association[1..1] to I_PurgCatMaterialGroupAPI01 as _PurchasingCategoryMatlGroup on $projection.MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup association[1..1] to I_PurchasingDocumentCategory as _PurchasingDocumentCategory on $projection.PurchasingDocumentCategory = _PurchasingDocumentCategory.PurchasingDocumentCategory
[1..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode association[1..1] to I_Country as _Country on $projection.SupplierCountry = _Country.Country association[1..1] to I_PurchasingCategoryValueHelp as _PurchasingCategory on $projection.PurchasingCategory = _PurchasingCategory.PurchasingCategory association[1..1] to I_Region as _Region on $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 (50)

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
TimeVarianceScoreByDelivDate MM_A_TIMEVARC_SCORE_DELIV_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 ( TimeVarianceScoreByDelivDate as mm_a_timevarc_score_deliv_date) AS TimeVarianceScoreByDelivDate,
  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] to I_PurgCatMaterialGroupAPI01 as _PurchasingCategoryMatlGroup on MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup association[1..1] to 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] to I_Country as _Country on SupplierCountry = _Country.Country association[1..1] to I_PurchasingCategoryValueHelp as _PurchasingCategory on PurchasingCategory = _PurchasingCategory.PurchasingCategory association[1..1] to I_Region as _Region on Region = _Region.Region AND _Region.Country = SupplierCountry  -- association [1..1]
;