C_TimeVarianceQuery
Time Variance
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 43 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), ....
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 (43)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| resultElementDateFunctionStartDate | ||||
| resultElementDateFunctionEndDate | ||||
| P_StartDate | ||||
| KEY | ScheduleLine | ScheduleLine | ||
| DeliveryDate | DeliveryDate | |||
| SchedLineStscDeliveryDate | SchedLineStscDeliveryDate | |||
| OriglPOSchdLnDelivDte | OriglPOSchdLnDelivDte | |||
| OriglPOSchedLineStstclDelivDte | OriglPOSchedLineStstclDelivDte | |||
| PurOrdItmFinalGRPostingDate | PurOrdItmFinalGRPostingDate | |||
| PurOrdItmFirstGRPostingDate | PurOrdItmFirstGRPostingDate | |||
| OriglPurOrdItm1stGRPostgDte | OriglPurOrdItm1stGRPostgDte | |||
| OriglPurOrdItmFnlGRPostgDte | OriglPurOrdItmFnlGRPostgDte | |||
| CalendarYear | CalendarYear | |||
| CalendarQuarter | CalendarQuarter | |||
| CalendarMonth | CalendarMonth | |||
| CalendarWeek | CalendarWeek | |||
| PurchasingOrganization | PurchasingOrganization | |||
| PurchasingGroup | PurchasingGroup | |||
| CompanyCode | CompanyCode | |||
| PurgDocMigrtnIsCmpltdForAnlyts | PurgDocMigrtnIsCmpltdForAnlyts | |||
| SuplrEvalRelevantDocCategory | SuplrEvalRelevantDocCategory | |||
| Supplier | Supplier | |||
| SupplierCountry | SupplierCountry | |||
| Region | Region | |||
| Material | Material | |||
| MaterialGroup | MaterialGroup | |||
| Plant | Plant | |||
| PurchasingCategory | PurchasingCategory | |||
| PurchasingDocumentCategory | PurchasingDocumentCategory | |||
| PurgCatName | PurgCatName | Purchasing Category Name (Deprecated) | ||
| TimeVarianceInDays | TimeVarianceInDays | |||
| TimeVarianceInPct | TimeVarianceInPct | |||
| TimeVarianceInPctByDelivDate | TimeVarianceInPctByDelivDate | |||
| TimeVarianceScore | TimeVarianceScore | |||
| TimeVarianceScoreByDelivDate | TimeVarianceScoreByDelivDate | |||
| NumberOfScheduleLines | NumberOfScheduleLines | |||
| SuplrEvalTimeVarianceInDays | ||||
| SuplrEvalTimeVarianceInPct | ||||
| SuplrEvalTmeVarcByDelivDtePct | ||||
| SuplrEvalTimeVarianceScoreVal | ||||
| SuplrEvalTmeVarcDelivDteScrVal | ||||
| NumberOfPurchaseOrders | NumberOfPurchaseOrders | |||
| NumberOfPurchaseOrderItems | NumberOfPurchaseOrderItems |
@EndUserText.label: 'Time Variance'
@AbapCatalog.sqlViewName: 'CMMTIMEVARQUERY'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@VDM.viewType: #CONSUMPTION
@Analytics.query: true
@OData.publish: true
@ClientHandling.algorithm: #SESSION_VARIABLE //Inserted by VDM CDS Suite Plugin
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@AbapCatalog.preserveKey:true
@Metadata.ignorePropagatedAnnotations:true
@ObjectModel.supportedCapabilities: [ #ANALYTICAL_QUERY ]
@ObjectModel.modelingPattern: #ANALYTICAL_QUERY
@Metadata.allowExtensions:true
define view C_TimeVarianceQuery
with parameters
@Consumption.derivation: { lookupEntity: 'I_SglGregorianCalDateFunction',
resultElement: 'DateFunctionStartDate', binding: [ {
targetParameter: 'P_DateFunction', type: #PARAMETER, value : 'P_DateFunction' } ]
}
@Consumption.hidden: true
P_StartDate : badat,
@Consumption.derivation: { lookupEntity: 'I_SglGregorianCalDateFunction',
resultElement: 'DateFunctionEndDate', binding: [ {
targetParameter: 'P_DateFunction', type: #PARAMETER, value : 'P_DateFunction' } ]
}
@Consumption.hidden: true
P_EndDate : badat,
@Consumption.defaultValue: 'PREVIOUSYEARTODATE'
@Consumption.valueHelpDefinition: [{
entity: {
name:'C_GregorianCalDateFuncVH',
element:'DateFunction'
}
}]
P_DateFunction : datefunctionid
as select from C_TimeVarianceCube( P_StartDate: $parameters.P_StartDate , P_EndDate: $parameters.P_EndDate )
{
/* Keys */
@EndUserText.label: 'Purchasing Document' -- Label added as key field cannot be deprecated in a released CDS
@EndUserText.quickInfo: 'Purchasing Document'
key PurchaseOrder,
@EndUserText.label: 'Purchasing Document Item' -- Label added as key field cannot be deprecated in a released CDS
@EndUserText.quickInfo: 'Purchasing Document Item'
key PurchaseOrderItem,
key ScheduleLine,
/* @UI.hidden: true
@Consumption.hidden: true
PurchaseOrderItemUniqueID, */
/* Order Date */
@Consumption.filter : {selectionType:#INTERVAL,multipleSelections: false} //3351863
DeliveryDate,
@Consumption.filter : {selectionType:#INTERVAL,multipleSelections: false} //3351863
SchedLineStscDeliveryDate,
OriglPOSchdLnDelivDte,
OriglPOSchedLineStstclDelivDte,
@Consumption.filter : {selectionType:#INTERVAL,multipleSelections: false} //3351863
PurOrdItmFinalGRPostingDate,
@Consumption.filter : {selectionType:#INTERVAL,multipleSelections: false} //3351863
PurOrdItmFirstGRPostingDate,
OriglPurOrdItm1stGRPostgDte,
OriglPurOrdItmFnlGRPostgDte,
/*@Consumption.hidden: true
@UI.hidden: true
PurchaseOrderDate, */
// _Calendar.CalendarYear,
// _Calendar.CalendarQuarter,
// _Calendar.CalendarMonth,
// _Calendar.CalendarWeek,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
CalendarYear,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
CalendarQuarter,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
CalendarMonth,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
CalendarWeek,
/* Org Data*/
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
PurchasingOrganization,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
PurchasingGroup,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
CompanyCode,
@Consumption: {
filter: { -- Usage of derviation.lookupEntity requires a filter definition too!
mandatory: false,
hidden: true,
selectionType: #SINGLE,
multipleSelections: false
},
// hidden: true,
derivation: {
lookupEntity: 'F_ProcmtAnalyticsDataSelMeth',
resultElement: 'PurgDocMigrtnIsCmpltdForAnlyts'
}
}
@Environment.sql.passValue: true
@UI.hidden: true
PurgDocMigrtnIsCmpltdForAnlyts,
@Consumption: {
filter: {
mandatory: false,
hidden: true,
selectionType: #SINGLE,
multipleSelections: false
},
derivation: {
lookupEntity: 'F_SuplrEvalDocCatConfign',
resultElement: 'SuplrEvalRelevantDocCategory'
}
}
@Environment.sql.passValue: true
@UI.hidden: true
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
SuplrEvalRelevantDocCategory,
/* Supplier */
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
@Environment.sql.passValue: true
Supplier,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
SupplierCountry,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
Region,
/* Item Data */
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
Material,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
MaterialGroup,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
Plant,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
PurchasingCategory,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
@Analytics.internalName:#LOCAL
PurchasingDocumentCategory,
@VDM.lifecycle.status:#DEPRECATED //3351863
@EndUserText.label: 'Purchasing Category Name (Deprecated)'
PurgCatName,
@Consumption.hidden: true
TimeVarianceInDays,
@Consumption.hidden: true
TimeVarianceInPct,
@Consumption.hidden: true
TimeVarianceInPctByDelivDate,
@Consumption.hidden: true
TimeVarianceScore,
@Consumption.hidden: true
TimeVarianceScoreByDelivDate,
@Consumption.hidden: true
NumberOfScheduleLines,
/* Measures */
@DefaultAggregation: #FORMULA
@AnalyticsDetails.query.formula: 'CASE WHEN $projection.NumberOfScheduleLines > 0 THEN $projection.TimeVarianceInDays / $projection.NumberOfScheduleLines ELSE 0 END'
cast( 1 as mm_a_overdue_days ) as SuplrEvalTimeVarianceInDays,
@DefaultAggregation: #FORMULA
@AnalyticsDetails.query.formula: 'CASE WHEN $projection.NumberOfScheduleLines > 0 THEN $projection.TimeVarianceInPct / $projection.NumberOfScheduleLines ELSE 0 END'
cast( 1 as mmpur_ana_timevar_statdelivpct ) as SuplrEvalTimeVarianceInPct, // changed the DE to avoid numeric overflow error , as this filed holds the variance and not percentage mm_a_timevar_statdeliv_pct
@DefaultAggregation: #FORMULA
@AnalyticsDetails.query.formula: 'CASE WHEN $projection.NumberOfScheduleLines > 0 THEN $projection.TimeVarianceInPctByDelivDate / $projection.NumberOfScheduleLines ELSE 0 END'
cast( 1 as mm_a_variance_delivery_pct ) as SuplrEvalTmeVarcByDelivDtePct,
@DefaultAggregation: #FORMULA
@AnalyticsDetails.query.formula: 'CASE WHEN $projection.NumberOfScheduleLines > 0 THEN $projection.TimeVarianceScore / $projection.NumberOfScheduleLines ELSE 0 END'
cast( 1 as mm_a_timevar_score_statdeliv ) as SuplrEvalTimeVarianceScoreVal,
@DefaultAggregation: #FORMULA
@AnalyticsDetails.query.formula: 'CASE WHEN $projection.NumberOfScheduleLines > 0 THEN $projection.TimeVarianceScoreByDelivDate / $projection.NumberOfScheduleLines ELSE 0 END'
cast( 1 as mm_a_timevarc_score_deliv_date ) as SuplrEvalTmeVarcDelivDteScrVal,
NumberOfPurchaseOrders,
NumberOfPurchaseOrderItems
//
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_TIMEVARIANCECUBE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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