C_TimeVariance

DDL: C_TIMEVARIANCE SQL: CMMTIMEVARIANCE Type: view CONSUMPTION

Time Variance

C_TimeVariance is a Consumption CDS View that provides data about "Time Variance" in SAP S/4HANA. It reads from 2 data sources (P_TimeVariance1, P_TimeVarianceUpdatedScore) and exposes 41 fields. It has 7 associations to related views. It is used in 10 Fiori applications: Supplier Evaluation by Quantity, Supplier Evaluation by Quantity (Version 2), Operational Supplier Evaluation, ....

Data Sources (2)

SourceAliasJoin Type
P_TimeVariance1 P_TimeVariance1 from
P_TimeVarianceUpdatedScore UpdatedScore left_outer

Parameters (3)

NameTypeDefault
P_StartDate bedat
P_EndDate bedat
P_DateFunction datefunctionid

Associations (7)

CardinalityTargetAliasCondition
[1..1] I_CalendarDate _Calendar PurchaseOrderDate = _Calendar.CalendarDate
[1..1] C_MM_MaterialGroupValueHelp _MaterialGroup $projection.MaterialGroup = _MaterialGroup.MaterialGroup
[0..1] C_MM_SupplierValueHelp _Supplier $projection.Supplier = _Supplier.Supplier and $projection.CompanyCode = _Supplier.CompanyCode
[1..1] C_MM_MaterialValueHelp _Material $projection.Material = _Material.Material and $projection.Plant = _Material.Plant
[0..1] C_PurchasingGroupValueHelp _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[0..1] C_PurchasingOrgValueHelp _PurchasingOrganization $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
[1..1] I_Plant _Plant $projection.Plant = _Plant.Plant association[1..1] to I_PurchasingCategoryMatlGroup as _PurchasingCategoryMatlGroup on $projection.MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup association[1..1] to I_PurchasingDocumentCategory as _PurchasingDocumentCategory on $projection.PurchasingDocumentCategory = _PurchasingDocumentCategory.PurchasingDocumentCategory

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CMMTIMEVARIANCE 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
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view

Fiori Apps (10)

App IDApp NameTypeDescription
F1661 Supplier Evaluation by Quantity 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.
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.
F1662 Operational Supplier Evaluation Analytical This app determines the score of a supplier in an organization based on the weighted average of the quantity variance, price variance, and time variance. The score is calculated over a period of 365 days. The overall score is calculated from the variance available from the different criteria, price, time, quantity or soft score after applying the weightage. Both early and late deliveries of items are considered variance.
F1663 Supplier Evaluation by Price 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.
F1664 Supplier Evaluation by Time Analytical ou 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.
F2019 Overall Supplier Evaluation Analytical This app determines the score of a supplier in an organization based on the operational and questionnaire scores. 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.
F2234 Supplier Evaluation by Questionnaire Analytical
F2234A Supplier Evaluation by Questionnaire (Version 2) Analytical
F2309 Supplier Evaluation by Quality 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

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 the delivered quantity of items. Both the excess and the lower delivered quantities are considered as variances. The score is determined over the previous year to date. The catalog role Materials Management - Purchasing Strategy (SAP_BCR_MM_PUR_STRATEGY) is required to access the app. Note that this catalog role is included in the business role Strategic Buyer (SAP_BR_BUYER). The following authorization objects must be maintained in SU22: F_BKPF_BUK M_BEST_WRK M_BEST_EKG M_BEST_EKO The KPI is displayed in the following views: By Supplier By Purchasing Group By Purchasing Organization By Purchasing Category By Material Group By Plant Document Trend by Supplier Trend by Purchasing Category

Key Features: You can perform the following tasks: Apply filters to display views. You can set default values for these filters: Purchasing Organization, Material Group, Plant, and Purchasing Group. To do this, go to User Actions Menu Settings Default Values. For more information, see Maintaining Your Default User Values. Apply filter to display views. Display views as chart and in tabular format. Send the app link as email or export as an excel Personalize tiles: Filter views Click the arrow icon on the screen Choose the Save as Tile option Enter relevant details and saveThe newly created tile displays on the launchpad. Navigate to the following apps: Create Activity Manage Activities Manage Purchase Order Manage Purchasing Category Purchasing Category Factsheet My Purchasing Document Items Supplier Factsheet

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

Operational Supplier Evaluation

Business Role: Strategic Buyer

This app determines the score of a supplier in an organization based on the weighted average of the quantity variance, price variance, and time variance. The score is calculated over the previous year to date. The overall score is calculated from the variance available from the different criteria, and then the weighting is applied. For example, price is weighted more than quantity. The catalog role Materials Management - Purchasing Strategy (SAP_BCR_MM_PUR_STRATEGY) is required to access the app. Note that this catalog role is included in the business role Strategic Buyer (SAP_BR_BUYER). The following authorization objects must be maintained in SU22: F_BKPF_BUK M_BEST_WRK M_BEST_EKG M_BEST_EKO The KPI is displayed in the following views: By Supplier By Purchasing Group By Purchasing Organization By Purchasing Category By Material Group By Plant Document Trend Trend by Supplier Trend by Purchasing Category By Top 10 Suppliers By Bottom 10 Suppliers

Key Features: Using this app, you can do the following: Apply filters to display views. You can set default values for these filters: Purchasing Organization, Material Group, Plant, and Purchasing Group. To do this, go to User Actions Menu Settings Default Values. For more information, see Maintaining Your Default User Values. Analyze data in the form of chart and in tabular format. Share the analysis results via an email or export as an excel. Save the analyzed filters for later reference as a new tile: Filter views Click the arrow icon on the screen Choose the Save as Tile option Enter relevant details and saveThe newly created tile displays on the launchpad. Navigate to the following apps: Manage Purchasing Category Purchasing Category Factsheet My Purchasing Document Items Supplier Factsheet The views are grouped according to the supplier, purchasing group, purchasing organization, purchasing category, material group, document, and trend.

Supplier Evaluation by Price

Business Role: Strategic Buyer

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 the previous year to date and is based on the difference in the purchase order amount and invoice amount. Both the excess price and the lower price are considered as variances. The catalog role Materials Management - Purchasing Strategy (SAP_BCR_MM_PUR_STRATEGY) is required to access the app. Note that this catalog role is included in the business role Strategic Buyer (SAP_BR_BUYER). The following authorization objects must be maintained in SU22: F_BKPF_BUK M_BEST_WRK M_BEST_EKG M_BEST_EKO The KPI is displayed in the following views: By Supplier By Purchasing Group By Purchasing Organization By Purchasing Category By Material Group By Plant Document Trend by Supplier Trend by Purchasing Category

Key Features: You can perform the following tasks: Apply filters to display views. You can set default values for these filters: Purchasing Organization, Material Group, Plant, and Purchasing Group. To do this, go to User Actions Menu Settings Default Values. For more information, see Maintaining Your Default User Values. Apply filter to display views. Display every view as chart and in tabular format. Personalize tiles: Filter views Click the arrow icon on the screen Choose the Save as Tile option Enter relevant details and saveThe newly created tile displays on the launchpad. Navigate to the following apps: Create Activity Manage Activities Manage Purchase Order Manage Purchasing Category Purchasing Category Factsheet My Purchasing Document Items

Supplier Evaluation by Time

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 the previous year to date. Both the late and early deliveries of items are considered as variance. You can also see the time variance by delivery date. The catalog role Materials Management - Purchasing Strategy (SAP_BCR_MM_PUR_STRATEGY) is required to access the app. Note that this catalog role is included in the business role Strategic Buyer (SAP_BR_BUYER). The following authorization objects must be maintained in SU22: F_BKPF_BUK M_BEST_WRK M_BEST_EKG M_BEST_EKO The KPI is displayed in the following views: By Supplier By Purchasing Group By Purchasing Organization By Purchasing Category By Material Group By Plant Document Trend by Supplier Trend by Purchasing Organization

Key Features: Using this app, you can do the following: Apply filters to display views. You can set default values for these filters: Purchasing Organization, Material Group, Plant, and Purchasing Group. To do this, go to User Actions Menu Settings Default Values. For more information, see Maintaining Your Default User Values. Apply filter to display views. Analyze data in the form of chart and in tabular format. Share the analysis results via an email or export as an excel. Personalize tiles: Filter views Click the arrow icon on the screen Choose the Save as Tile option Enter relevant details and saveThe newly created tile displays on the launchpad. Navigate to the following apps: Create Activity Manage Activities Manage Purchase Order Manage Purchasing Category Purchasing Category Factsheet My Purchasing Document Items Supplier Factsheet

Fields (41)

KeyFieldSource TableSource FieldDescription
resultElementDateFunctionStartDate
resultElementDateFunctionEndDate
P_StartDate
PurchaseOrderItem
ScheduleLine ScheduleLine
DeliveryDate
SchedLineStscDeliveryDate
PurgDocMigrtnIsCmpltdForAnlyts PurgDocMigrtnIsCmpltdForAnlyts
SuplrEvalRelevantDocCategory SuplrEvalRelevantDocCategory
PurOrdItmFinalGRPostingDate PurOrdItmFinalGRPostingDate
PurOrdItmFirstGRPostingDate PurOrdItmFirstGRPostingDate
CalendarYear _Calendar CalendarYear
CalendarQuarter _Calendar CalendarQuarter
CalendarMonth _Calendar CalendarMonth
CalendarWeek _Calendar CalendarWeek
PurchasingOrganization SupplierEvalByTime PurchasingOrganization
PurchasingOrganizationName
PurchasingGroup PurchasingGroup
PurchasingGroupName
CompanyCode CompanyCode
Supplier Supplier
SupplierName
SupplierCountry
CountryName
Material Material
MaterialName _Material MaterialName
MaterialGroup SupplierEvalByTime MaterialGroup
MaterialGroupName _MaterialGroup MaterialGroupName
Plant SupplierEvalByTime Plant
PlantName _Plant PlantName
PurchasingCategory
PurgCatName
PurchasingDocumentCategory PurchasingDocumentCategory Purchasing Document Category
PurchasingDocumentCategoryName
TimeVarianceInDays
TimeVarianceInPct
TimeVarianceInPctByDelivDate
TimeVarianceScoreByDelivDate
PurchaseOrderItemUniqueID PurchaseOrderItemUniqueID
NumberOfPurchaseOrders
NumberOfPurchaseOrderItems
@AbapCatalog.sqlViewName: 'CMMTIMEVARIANCE'
//@ClientDependent: true

@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Time Variance'
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@OData.publish: true
@ClientHandling.algorithm: #SESSION_VARIABLE //Inserted by VDM CDS Suite Plugin

@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory:  #XL
define view C_TimeVariance

  with parameters
    @Consumption.derivation: { lookupEntity: 'C_SglGregorianCalDateFunction', 
    resultElement: 'DateFunctionStartDate', binding: [ {
      targetParameter: 'P_DateFunction', type: #PARAMETER, value : 'P_DateFunction' },
       { targetParameter : 'P_Language' , type : #SYSTEM_FIELD, value : '#SYSTEM_LANGUAGE'  } ] 
    } 
    @Consumption.hidden: true
    P_StartDate: bedat,
    
    @Consumption.derivation: { lookupEntity: 'C_SglGregorianCalDateFunction', 
    resultElement: 'DateFunctionEndDate', binding: [ {
      targetParameter: 'P_DateFunction', type: #PARAMETER, value : 'P_DateFunction' },
       { targetParameter : 'P_Language' , type : #SYSTEM_FIELD, value : '#SYSTEM_LANGUAGE'  } ] 
    } 
    @Consumption.hidden: true
    P_EndDate: bedat,
    @Consumption.defaultValue: 'PREVIOUSYEARTODATE'
    @Consumption.valueHelpDefinition: [{
      entity: {
        name:'C_GregorianCalDateFuncVH',
        element:'DateFunction'
      }
    }]
    P_DateFunction              : datefunctionid 

  as select from  P_TimeVariance1( P_StartDate: $parameters.P_StartDate , P_EndDate: $parameters.P_EndDate )         as SupplierEvalByTime

    
    left outer join P_TimeVarianceUpdatedScore as UpdatedScore     on  SupplierEvalByTime.PurchaseOrder     = UpdatedScore.PurchaseOrder
                                                                                  and SupplierEvalByTime.PurchaseOrderItem = UpdatedScore.PurchaseOrderItem
  association [1..1] to I_CalendarDate as _Calendar     on PurchaseOrderDate = _Calendar.CalendarDate
  
  association [1..1] to C_MM_MaterialGroupValueHelp as _MaterialGroup on $projection.MaterialGroup = _MaterialGroup.MaterialGroup

  association [0..1] to C_MM_SupplierValueHelp      as _Supplier               on  $projection.Supplier     = _Supplier.Supplier
                                                                               and $projection.CompanyCode  = _Supplier.CompanyCode

  association [1..1] to C_MM_MaterialValueHelp      as _Material               on  $projection.Material = _Material.Material
                                                                               and $projection.Plant    = _Material.Plant
  association [0..1] to C_PurchasingGroupValueHelp  as _PurchasingGroup        on  $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
  association [0..1] to C_PurchasingOrgValueHelp    as _PurchasingOrganization on  $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization //and

  association [1..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant  
  association[1..1] to I_PurchasingCategoryMatlGroup as _PurchasingCategoryMatlGroup on $projection.MaterialGroup = _PurchasingCategoryMatlGroup.MaterialGroup
  association[1..1] to I_PurchasingDocumentCategory as _PurchasingDocumentCategory 
    on $projection.PurchasingDocumentCategory = _PurchasingDocumentCategory.PurchasingDocumentCategory
    //  association[1..1] to I_PurchasingCategoryValueHelp as _PurchasingCategory on $projection.PurchasingCategory = _PurchasingCategory.PurchasingCategory

    
{
      /* Keys */
   cast( SupplierEvalByTime.PurchaseOrder as vdm_purchaseorder )                                        as  PurchaseOrder,      
       
   cast(SupplierEvalByTime.PurchaseOrderItem as vdm_purchaseorderitem)                                  as  PurchaseOrderItem,
   ScheduleLine,

      /* Order Date */
      cast( ScheduleLineDeliveryDate as fieu_deliverydate)                              as  DeliveryDate,
      cast( SchedLineStscDeliveryDate as slfdt)                                         as  SchedLineStscDeliveryDate,
//      cast ( PostingDate as mm_a_goods_receipt_date )                                   as  PostingDate,



  @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'
                                  }
                    }        
  @UI.hidden: true
  @Environment.sql.passValue: 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
      SuplrEvalRelevantDocCategory,
      PurOrdItmFinalGRPostingDate,
      PurOrdItmFirstGRPostingDate,
      //    PurchaseOrderDate,

      @Semantics.calendar.year: true
      _Calendar.CalendarYear,
      _Calendar.CalendarQuarter,
      _Calendar.CalendarMonth,
      _Calendar.CalendarWeek,

      /* Org Data*/
      @Consumption.labelElement: 'PurchasingOrganizationName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'C_PurchasingOrgValueHelp', element : 'PurchasingOrganization' } }]
      SupplierEvalByTime.PurchasingOrganization,
      @Semantics.text: true
      cast ( _PurchasingOrganization.PurchasingOrganizationName as mm_a_purg_org_name ) as  PurchasingOrganizationName,
      @Consumption.labelElement: 'PurchasingGroupName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'C_PurchasingGroupValueHelp', element : 'PurchasingGroup' } }]
      PurchasingGroup,
      @Semantics.text: true
      cast ( _PurchasingGroup.PurchasingGroupName as mm_a_purg_grp_name )               as  PurchasingGroupName,
      CompanyCode,

      /* Supplier */
      @Consumption.labelElement: 'SupplierName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'C_MM_SmplSupplierValueHelp', element : 'Supplier' } }]

      Supplier,
      @Semantics.text: true
      cast ( _Supplier.SupplierName as suppliername )                                   as  SupplierName,
      @Consumption.labelElement: 'CountryName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'C_MM_CountryValueHelp', element : 'SupplierCountry' } }]
      cast( _Supplier.Country as mm_a_supplier_country ) as SupplierCountry,
      @Semantics.text: true
      _Supplier._CountryText[1: Language = $session.system_language].CountryName,

      /* Item Data */
      @Consumption.labelElement: 'MaterialName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'C_MM_MaterialValueHelp', element : 'Material' } }]
      Material,
      @Semantics.text: true
      _Material.MaterialName,
      @Consumption.labelElement: 'MaterialGroupName'
      SupplierEvalByTime.MaterialGroup,
      @Semantics.text: true
      _MaterialGroup.MaterialGroupName,
      @Consumption.labelElement: 'PlantName'
      SupplierEvalByTime.Plant,
      @Semantics.text: true
      _Plant.PlantName,

   //@ObjectModel.foreignKey.association: '_PurchasingCategory'

      @ObjectModel.text.element: ['PurgCatName']
      @Consumption.labelElement: 'PurgCatName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'I_PurchasingCategoryValueHelp', element : 'PurchasingCategory' } }]
      _PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory                                 as PurchasingCategory,
      @Semantics.text: true
      _PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName                                        as PurgCatName,
      
      @EndUserText.label: 'Purchasing Document Category'
     @ObjectModel.text.element: ['PurchasingDocumentCategoryName']  
     @Consumption.labelElement: 'PurchasingDocumentCategoryName'
     @Consumption.valueHelpDefinition: [{ entity: { name : 'C_PurchasingDocCategoryVH', element : 'PurchasingDocumentCategory' } }]  
     PurchasingDocumentCategory,
     @Semantics.text: true
     _PurchasingDocumentCategory._Text[1: Language = $session.system_language].PurchasingDocumentCategoryName as PurchasingDocumentCategoryName,
      

      /* Measures */
      @DefaultAggregation: #AVG
      cast (  TimeVarianceInDays as mm_a_overdue_days )                                 as  TimeVarianceInDays,

      @DefaultAggregation: #AVG
      cast ( TimeVarianceInPct as mmpur_ana_timevar_statdelivpct )                                   as  TimeVarianceInPct, // changed the DE to avoid numeric overflow error , as this filed holds the variance and not percentage mm_a_timevar_statdeliv_pct 

      @DefaultAggregation: #AVG
      cast( TimeVarianceInPctByDelivDate as mm_a_variance_delivery_pct ) as TimeVarianceInPctByDelivDate,

      @DefaultAggregation: #AVG
//       0 as TimeVarianceScore,

      cast( case when UpdatedScore.IsScoreChanged = 'X' 
        then UpdatedScore.TimeVarianceScore
       else SupplierEvalByTime.TimeVarianceScore
      end as mm_a_timevar_score_statdeliv  )                                                      as  TimeVarianceScore,
//      

      @DefaultAggregation: #AVG
//      0 as TimeVarianceScoreByDelivDate

      cast (  TimeVarianceScoreByDelivDate as mm_a_timevarc_score_deliv_date) as TimeVarianceScoreByDelivDate,
 
      PurchaseOrderItemUniqueID,
      
      // @EndUserText.label: 'Purchase Order Count'

       @Aggregation.referenceElement: ['PurchaseOrder']
      @Aggregation.default: #COUNT_DISTINCT
       cast( 1 as mm_pur_ana_numbrofpurords ) as NumberOfPurchaseOrders, 
       
//      @Aggregation.referenceElement: ['PurchaseOrder']

//      @Aggregation.default: #COUNT_DISTINCT

//      cast(case when PurchasingDocumentCategory = 'F'

//              then 1

//            else 0

//       end as mm_pur_ana_numbrofpurords ) as NumberOfPurchaseOrders,

       
//      @EndUserText.label: 'Purchase Order Item Count'

      @Aggregation.referenceElement: ['PurchaseOrderItem']
      @DefaultAggregation: #SUM
//      @Aggregation.default: #COUNT_DISTINCT

       cast( 1 as mm_pur_ana_numbrofpurorditms ) as NumberOfPurchaseOrderItems 
    
//      @Aggregation.default: #COUNT_DISTINCT

//      cast(case when PurchasingDocumentCategory = 'F'

//              then 1

//            else 0

//       end as mm_pur_ana_numbrofpurorditms ) as NumberOfPurchaseOrderItems,

//       

//      @Aggregation.default: #COUNT_DISTINCT

//      cast(case when PurchasingDocumentCategory = 'L'

//              then 1

//            else 0

//       end as zm_pur_ana_numbrofschagmt ) as NumberOfSchedulingAgmt

//       

      //@EndUserText.label: 'Purchase Order Item Count'

//      @Aggregation.referenceElement: ['PurchaseOrderItemUniqueID']

//      @Aggregation.default: #COUNT_DISTINCT

//       cast( 1 as mm_pur_ana_numbrofpurorditms ) as NumberOfPurchaseOrderItems 

//      @DefaultAggregation: #SUM 

//      cast(case when PurchasingDocumentCategory = 'L'

//              then 1

//            else 0

//       end as mm_pur_ana_numbrofpurorditms ) as NumberOfSchedulingAgmtItems

            

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_MM_MATERIALGROUPVALUEHELP",
"C_MM_MATERIALVALUEHELP",
"C_MM_SUPPLIERVALUEHELP",
"C_PURCHASINGGROUPVALUEHELP",
"C_PURCHASINGORGVALUEHELP",
"I_CALENDARDATE",
"I_COUNTRYTEXT",
"I_PLANT",
"I_PURCHASINGCATEGORY",
"I_PURCHASINGCATEGORYMATLGROUP",
"I_PURCHASINGDOCUMENTCATEGORY",
"I_PURGDOCUMENTCATEGORYTEXT",
"P_TIMEVARIANCE1",
"P_TIMEVARIANCEUPDATEDSCORE"
],
"ASSOCIATED":
[
"C_MM_MATERIALGROUPVALUEHELP",
"C_MM_MATERIALVALUEHELP",
"C_MM_SUPPLIERVALUEHELP",
"C_PURCHASINGGROUPVALUEHELP",
"C_PURCHASINGORGVALUEHELP",
"I_CALENDARDATE",
"I_PLANT",
"I_PURCHASINGCATEGORYMATLGROUP",
"I_PURCHASINGDOCUMENTCATEGORY"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/