C_TimeVarianceQuery
Time Variance
C_TimeVarianceQuery (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_TimeVarianceQuery is a Consumption CDS View that provides data about "Time Variance" in SAP S/4HANA. It reads from 1 data source (C_TimeVarianceCube) and exposes 47 fields with key field ScheduleLine. It is used in 5 Fiori applications: Supplier Evaluation by Quantity (Version 2), Supplier Evaluation by Price (Version 2), Supplier Evaluation by Time (Version 2), .... Part of development package ODATA_MM_ANALYTICS.
SAP API Hub
| Category | Consumption |
|---|---|
| State | C1 |
| Line of Business | Sourcing & Procurement |
| Application Component | MM-PUR-ANA-2CL |
| Capabilities | Analytical Query |
| Extensible (Key User) | No |
| Extensible (Developer) | No |
| Release State (Key User) | Released |
| Release State (Developer) | Not Released |
| Package | Sourcing and Procurement for SAP S/4HANA Cloud Public Edition |
Documentation
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Public Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Public Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Public Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Custom Communication Scenarios — Create custom communication scenarios to configure custom communication arrangement
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Public Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| C_TimeVarianceCube | C_TimeVarianceCube | from |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_StartDate | badat | |
| P_EndDate | badat | |
| P_DateFunction | datefunctionid |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | Time Variance | view | |
| AbapCatalog.sqlViewName | CMMTIMEVARQUERY | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| VDM.viewType | #CONSUMPTION | view | |
| Analytics.query | true | view | |
| OData.publish | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| AbapCatalog.preserveKey | true | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_QUERY | view | |
| Metadata.allowExtensions | true | view |
Fiori Apps (5)
| App ID | App Name | Type | Description |
|---|---|---|---|
| F1661A | Supplier Evaluation by Quantity (Version 2) | Analytical | With the Supplier Evaluation by Quantity app, you can determine the quantity variance, which is based on the variance between the ordered quantity and delivered quantity of items. Both the excess and less delivered quantities are considered. |
| F1663A | Supplier Evaluation by Price (Version 2) | Analytical | With the Supplier Evaluation by Price app, you can determine the score of a given supplier in an organization based on the variance in the price of ordered items and delivered items. The score is calculated over a period of one year and is based on the difference in the purchase order amount and invoice amount. Both the excess and less price are considered as variance. |
| F1664A | Supplier Evaluation by Time (Version 2) | Analytical | You can use this app to determine the score of a given supplier in an organisation based on the difference in time between the ordered date of items and delivered date of items. The score is calculated over a period of 365 days. Both the late and earlier deliveries of items are considered as variance. |
| F2309A | Supplier Evaluation by Quality (Version 2) | Analytical | With the Supplier Evaluation by Quality app, you can determine the scores for given suppliers based on the inspection lot. |
| F3295A | Supplier Evaluation By Quality (for Quality Notification) (Version 2) | Analytical |
Supplier Evaluation by Quantity (Version 2)
Business Role: Strategic Buyer
With the Supplier Evaluation by Quantity app, you can determine the quantity variance, which is based on the variance between the ordered quantity and delivered quantity of items. Both the excess and less delivered quantities are considered. The role Strategic Buyer (SAP_BR_BUYER) is required to access the app. The score is determined over a period of 365 days. The KPI is displayed in the following views: •By Supplier•By Purchasing Group•By Purchasing Organization•By Material Group•Document•Trend
Supplier Evaluation by Price (Version 2)
Business Role: Strategic Buyer
This new app is a replacement for the app , which is planned to be deprecated with SAP S/4HANA Cloud 2102. We recommend that you start using this new app instead of the old app Supplier Evaluation by Quality (Deprecated). SAP Fiori ID for this app is F3295A. You can now view number of purchase orders and number of purchase order items with this app.
Supplier Evaluation by Time (Version 2)
Business Role: Strategic Buyer
You can use this app to determine the score of a given supplier in an organization based on the difference in time between the ordered date of items and delivered date of items. The score is calculated over a period of 365 days. Both the late and earlier deliveries of items are considered as variance. The role Strategic Buyer (SAP_BR_BUYER) is required to access the role. The KPI is displayed in the following views: •By Supplier•By Purchasing Group•By Purchasing Organization•By Material Group•Document•Trend
Supplier Evaluation by Quality (Version 2)
Business Role: Strategic Buyer
This app determines the score of a supplier in an organization based on the weighted average of the quantity, price, and time variances. The score is calculated over a period of 365 days. It combines scores from the weighted hard facts available from the different criteria (price, time, and quantity), and the soft facts available from questionnaire results. The role Strategic Buyer (SAP_BR_BUYER) is required to access the app.
Supplier Evaluation By Quality (for Quality Notification) (Version 2)
Business Role: Strategic Buyer
With this app you can evaluate suppliers based on score that is calculated on the basis of quality complaints received. You can identify the suppliers with less received complaint notifications and thus with higher quality evaluation score. This helps you to determine the suppliers with the best performance and reliability. This app can also help you to decide which supplier to select if the purchasing conditions such as quality and price of material, quotation and delivery time are the same.
Fields (47)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| resultElementDateFunctionStartDate | ||||
| resultElementDateFunctionEndDate | ||||
| P_StartDate | ||||
| KEY | ScheduleLine | ScheduleLine | Schedule Line Number | |
| DeliveryDate | DeliveryDate | Delivery Date | ||
| SchedLineStscDeliveryDate | 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 | ||
| CalendarYear | CalendarYear | Calendar Year | ||
| CalendarQuarter | CalendarQuarter | Calendar Quarter | ||
| CalendarMonth | CalendarMonth | Calendar Month | ||
| CalendarWeek | CalendarWeek | Calendar Week | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| PurgDocMigrtnIsCmpltdForAnlyts | PurgDocMigrtnIsCmpltdForAnlyts | Single-Character Flag | ||
| SuplrEvalRelevantDocCategory | SuplrEvalRelevantDocCategory | Supplier Evaluation Configuration for Document Category type | ||
| Supplier | Supplier | Account Number of Supplier | ||
| SupplierCountry | SupplierCountry | Supplier Country/Region | ||
| Region | Region | Region (State, Province, County) | ||
| Material | Material | Material Number | ||
| MaterialGroup | MaterialGroup | Material Group | ||
| Plant | Plant | Valuation Area | ||
| PurchasingCategory | PurchasingCategory | Purchasing Category ID | ||
| PurchasingDocumentCategory | PurchasingDocumentCategory | Purchasing Document Category | ||
| PurgCatName | PurgCatName | Name of Purchasing Category | ||
| TimeVarianceInDays | TimeVarianceInDays | Overdue Days | ||
| TimeVarianceInPct | TimeVarianceInPct | Variance % for Statistical Delivery Date | ||
| TimeVarianceInPctByDelivDate | TimeVarianceInPctByDelivDate | Variance for Delivery Date | ||
| TimeVarianceScore | TimeVarianceScore | Time Variance Score | ||
| TimeVarianceScoreByDelivDate | TimeVarianceScoreByDelivDate | Delivery Date Score | ||
| NumberOfScheduleLines | NumberOfScheduleLines | Number of Purchase Order Items | ||
| SuplrEvalTimeVarianceInDays | Overdue days | |||
| SuplrEvalTimeVarianceInPct | Variance % for Statistical Delivery Date | |||
| SuplrEvalTmeVarcByDelivDtePct | Variance for Delivery Date | |||
| SuplrEvalTimeVarianceScoreVal | ||||
| SuplrEvalTmeVarcDelivDteScrVal | ||||
| NumberOfPurchaseOrders | NumberOfPurchaseOrders | Number of Purchase Orders | ||
| NumberOfPurchaseOrderItems | NumberOfPurchaseOrderItems | Number of Purchase Order Items | ||
| TimeVarianceScoreValue | TimeVarianceScoreValue | Time Variance Score | ||
| TmeVarcScrByDelivDateValue | TmeVarcScrByDelivDateValue | Time variance by statistical delivery date | ||
| SuplrEvalTmeVarcScoreValue | Time Variance Score | |||
| SuplrEvalTmeVarcScrDelivDteVal | Time variance by statistical delivery date |
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_TimeVarianceQuery.
-- 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: CMMTIMEVARQUERY
-- Parameters: P_StartDate : badat, P_EndDate : badat, P_DateFunction : datefunctionid
CREATE VIEW C_TimeVarianceQuery AS
SELECT
resultElement: 'DateFunctionStartDate' AS resultElementDateFunctionStartDate,
resultElement: 'DateFunctionEndDate' AS resultElementDateFunctionEndDate,
binding: [ { targetParameter: 'P_DateFunction', type: #PARAMETER, value : 'P_DateFunction' AS P_StartDate,
ScheduleLine,
DeliveryDate,
SchedLineStscDeliveryDate,
OriglPOSchdLnDelivDte,
OriglPOSchedLineStstclDelivDte,
PurOrdItmFinalGRPostingDate,
PurOrdItmFirstGRPostingDate,
OriglPurOrdItm1stGRPostgDte,
OriglPurOrdItmFnlGRPostgDte,
CalendarYear,
CalendarQuarter,
CalendarMonth,
CalendarWeek,
PurchasingOrganization,
PurchasingGroup,
CompanyCode,
PurgDocMigrtnIsCmpltdForAnlyts,
SuplrEvalRelevantDocCategory,
Supplier,
SupplierCountry,
Region,
Material,
MaterialGroup,
Plant,
PurchasingCategory,
PurchasingDocumentCategory,
PurgCatName,
TimeVarianceInDays,
TimeVarianceInPct,
TimeVarianceInPctByDelivDate,
TimeVarianceScore,
TimeVarianceScoreByDelivDate,
NumberOfScheduleLines,
cast( 1 as mm_a_overdue_days ) AS SuplrEvalTimeVarianceInDays,
cast( 1 as mmpur_ana_timevar_statdelivpct ) AS SuplrEvalTimeVarianceInPct,
cast( 1 as mm_a_variance_delivery_pct ) AS SuplrEvalTmeVarcByDelivDtePct,
cast( 1 as abap.dec(3,0) ) AS SuplrEvalTimeVarianceScoreVal,
cast( 1 as abap.dec(3,0) ) AS SuplrEvalTmeVarcDelivDteScrVal,
NumberOfPurchaseOrders,
NumberOfPurchaseOrderItems,
TimeVarianceScoreValue,
TmeVarcScrByDelivDateValue,
cast( 1 as mm_pur_ana_time_variance_score ) AS SuplrEvalTmeVarcScoreValue,
cast( 1 as mm_pur_ana_stat_timevar_score ) AS SuplrEvalTmeVarcScrDelivDteVal
FROM C_TimeVarianceCube
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Fiori Apps Architecture — How Fiori Apps Connect to Data
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA