C_RequisitionTypeAnalysis

DDL: C_REQUISITIONTYPEANALYSIS SQL: CMMREQTYPEANA Type: view CONSUMPTION

Purchase Requisition Type Analysis

C_RequisitionTypeAnalysis is a Consumption CDS View (Cube) that provides data about "Purchase Requisition Type Analysis" in SAP S/4HANA. It reads from 3 data sources (P_RequisitionTypeAnalysis, I_PurchasingCategoryMatlGroup, I_CalendarDate). It has 8 associations to related views. It is used in 2 Fiori applications: Purchase Requisition Item Changes, Purchase Requisition Item Types.

Data Sources (3)

SourceAliasJoin Type
P_RequisitionTypeAnalysis P_RequisitionTypeAnalysis from
I_PurchasingCategoryMatlGroup PurchasingCategoryMatlGroup left_outer
I_CalendarDate RelevantDates left_outer

Parameters (3)

NameTypeDefault
P_DateFunction datefunctionid
P_StartDate vdm_validitystart
P_EndDate vdm_validityend

Associations (8)

CardinalityTargetAliasCondition
[1..1] I_Purreqvaluationarea _PurReqValuationArea $projection.Plant = _PurReqValuationArea.ValuationArea
[1..1] C_MM_MaterialValueHelp _Material $projection.Material = _Material.Material and $projection.Plant = _Material.Plant
[1..1] I_MaterialGroup _MaterialGroup $projection.MaterialGroup = _MaterialGroup.MaterialGroup
[1..1] C_PurchasingGroupValueHelp _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[1..1] C_PurchasingOrgValueHelp _PurchasingOrg $projection.PurchasingOrganization = _PurchasingOrg.PurchasingOrganization
[1..1] I_PurReqnItemClassfctn _PurReqnItemClassfctn $projection.PurReqnItemClassification = _PurReqnItemClassfctn.PurReqnItemClassification
[1..1] I_PurReqnCreationInd _PurReqnCreationInd $projection.PurReqnOrigin = _PurReqnCreationInd.PurReqnOrigin
[1..1] I_Supplier _Supplier RequisitionItem.FixedSupplier = _Supplier.Supplier

Annotations (15)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
AbapCatalog.sqlViewName CMMREQTYPEANA view
Analytics.dataCategory #CUBE view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Purchase Requisition Type Analysis view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
Metadata.allowExtensions true view
AccessControl.personalData.blocking #NOT_REQUIRED view
OData.publish true view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view

Fiori Apps (2)

App IDApp NameTypeDescription
F2015 Purchase Requisition Item Changes Analytical
F2016 Purchase Requisition Item Types Analytical

Purchase Requisition Item Changes

Business Role: Strategic Buyer

This app displays the absolute number of item changes in the last 365 days from the current date. All changes to items are logged.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:•M_BANF_EKG•M_BANF_EKO•M_BANF_WRK•F_BKPF_BUKThe KPI is displayed in the following views:•By Supplier•By Material Group•By Purchasing Group•By Purchasing Organization•Document•TrendThis app displays the absolute number of item changes in the last 365 days from the current date. All changes to items are logged. The catalog role Materials Management - Purchasing Strategy (SAP_BCR_MM_PUR_STRATEGY) is required to access the app.

Purchase Requisition Item Types

Business Role: Strategic Buyer

You can use this app to identify the number of free-text items created from the GUI in the last 365 days (from the current date). The requisitions for which material was specified are shown as number of material items created (GUI) at the time of creation. Similarly, the number of material items, free text items, and catalog items created from the Fiori app are also shown in the application.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:•M_BANF_EKG•M_BANF_EKO•M_BANF_WRK•F_BKPF_BUKThe KPI is displayed in the following views:•By Supplier•By Material Group•By Purchasing Group•By Purchasing Organization•Document•Trend

@ClientHandling.algorithm: #SESSION_VARIABLE //Inserted by VDM CDS Suite Plugin

@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #L  //Inserted by VDM CDS Suite Plugin

@AbapCatalog.sqlViewName: 'CMMREQTYPEANA'
@Analytics.dataCategory: #CUBE
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Purchase Requisition Type Analysis'
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #CHECK
@Metadata.allowExtensions:true
@AccessControl.personalData.blocking: #NOT_REQUIRED
@OData.publish: true
@Metadata.ignorePropagatedAnnotations:true
@ObjectModel.supportedCapabilities: [ #ANALYTICAL_PROVIDER ]
@ObjectModel.modelingPattern: #ANALYTICAL_CUBE

define view C_RequisitionTypeAnalysis

  with parameters
    @Consumption.defaultValue: 'PREVIOUSYEARTODATE'
    @Consumption.valueHelpDefinition: [{
      entity: {
        name:'C_GregorianCalDateFuncVH',
        element:'DateFunction'
      }
    }]
    P_DateFunction : datefunctionid,

    @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    : vdm_validitystart,

    @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      : vdm_validityend

  as select from    P_RequisitionTypeAnalysis( P_StartDate:$parameters.P_StartDate , P_EndDate: $parameters.P_EndDate) as RequisitionItem

    left outer join I_CalendarDate                                                                                     as RelevantDates               on RequisitionItem.CreationDate = RelevantDates.CalendarDate

    left outer join I_PurchasingCategoryMatlGroup                                                                      as PurchasingCategoryMatlGroup on RequisitionItem.MaterialGroup = PurchasingCategoryMatlGroup.MaterialGroup

  association [1..1] to I_Purreqvaluationarea      as _PurReqValuationArea  on  $projection.Plant = _PurReqValuationArea.ValuationArea

  association [1..1] to C_MM_MaterialValueHelp     as _Material             on  $projection.Material = _Material.Material
                                                                            and $projection.Plant    = _Material.Plant
  association [1..1] to I_MaterialGroup            as _MaterialGroup        on  $projection.MaterialGroup = _MaterialGroup.MaterialGroup
  association [1..1] to C_PurchasingGroupValueHelp as _PurchasingGroup      on  $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
  association [1..1] to C_PurchasingOrgValueHelp   as _PurchasingOrg        on  $projection.PurchasingOrganization = _PurchasingOrg.PurchasingOrganization

  association [1..1] to I_PurReqnItemClassfctn     as _PurReqnItemClassfctn on  $projection.PurReqnItemClassification = _PurReqnItemClassfctn.PurReqnItemClassification
  
  association [1..1] to I_PurReqnCreationInd       as _PurReqnCreationInd   on  $projection.PurReqnOrigin = _PurReqnCreationInd.PurReqnOrigin
  
  association [1..1] to I_Supplier                 as _Supplier             on  RequisitionItem.FixedSupplier = _Supplier.Supplier
{

  key RequisitionItem.PurchaseRequisition,
      @EndUserText.label: 'Requisition Item'
  key RequisitionItem.PurchaseRequisitionItem,
      //  key AccountAssignment.CostCenter,


      @ObjectModel.text.element: ['PurchasingGroupName'] //Inserted by VDM CDS Suite Plugin

      @Consumption.labelElement: 'PurchasingGroupName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'C_PurchasingGroupValueHelp', element : 'PurchasingGroup' } }]
      PurchasingGroup,
      @Semantics.text: true
      _PurchasingGroup.PurchasingGroupName,
      @ObjectModel.text.element: ['PurchasingOrganizationName'] //Inserted by VDM CDS Suite Plugin

      @Consumption.labelElement: 'PurchasingOrganizationName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'C_PurchasingOrgValueHelp', element : 'PurchasingOrganization' } }]
      @EndUserText.label: 'Purchasing Organization'
      PurchasingOrganization,
      @Semantics.text: true
      _PurchasingOrg.PurchasingOrganizationName,
      @ObjectModel.text.element: ['SupplierName'] //Inserted by VDM CDS Suite Plugin

      @Consumption.labelElement: 'SupplierName'
      cast(RequisitionItem.FixedSupplier as flief )                                                                             as FixedSupplier,
      @Semantics.text: true
      _Supplier.SupplierName,

      @ObjectModel.text.element: ['MaterialGroupName'] //Inserted by VDM CDS Suite Plugin

      @Consumption.labelElement: 'MaterialGroupName'
      RequisitionItem.MaterialGroup,
      @Semantics.text: true
      _MaterialGroup._Text[1: Language = $session.system_language].MaterialGroupName,
      @ObjectModel.text.element: ['MaterialName'] //Inserted by VDM CDS Suite Plugin

      @Consumption.labelElement: 'MaterialName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'C_MM_MaterialValueHelp', element : 'Material' } }]
      Material,
      @Semantics.text: true
      _Material.MaterialName,
      @ObjectModel.text.element: ['PlantName'] //Inserted by VDM CDS Suite Plugin

      @Consumption.labelElement: 'PlantName'
      Plant,
      @Semantics.text: true
      _Material.PlantName,
      
      @Semantics.unitOfMeasure: true
      BaseUnit,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @DefaultAggregation: null
      @EndUserText.label: 'Quantity Requested'
      RequestedQuantity,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      @DefaultAggregation: null
      @EndUserText.label: 'Price Unit'
      PurReqnPriceQuantity,
      @Semantics.currencyCode: true
      PurReqnItemCurrency,
      @Semantics.amount.currencyCode: 'PurReqnItemCurrency'
      @DefaultAggregation: null
      PurchaseRequisitionPrice,
      
     // @Consumption.hidden: true

      @EndUserText.label: 'Purchasing Category (Deprecated)'
      @VDM.lifecycle.status:#DEPRECATED
      @VDM.lifecycle.successor: 'PurgCatRelatedToMaterialGroup'
      @ObjectModel.text.element: ['PurgCatName']
      @Consumption.labelElement: 'PurgCatName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'I_PurchasingCategoryValueHelp', element : 'PurchasingCategory' } }]
      PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory                                                        as PurchasingCategory,

      @ObjectModel.text.element: ['PurgCatName']
      @Consumption.labelElement: 'PurgCatName'
      @Consumption.valueHelpDefinition: [{ entity: { name : 'I_PurchasingCategoryValueHelp', element : 'PurchasingCategory' } }]
      cast(coalesce(PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory ,'') as /srmsmc/purchasing_category_id ) as PurgCatRelatedToMaterialGroup,

      @Semantics.text: true
      PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName                                                               as PurgCatName,

      @Consumption.valueHelpDefinition: [{ entity: { name : 'C_MM_CompanyCodeValueHelp', element : 'CompanyCode' } }]
      _PurReqValuationArea.CompanyCode, // changed as PR company code sould be from valuation area 

        
      CreatedByUser,
      
      @ObjectModel.text.element: ['PurReqnOriginDesc']
      @EndUserText.label: 'Origin'
      @EndUserText.quickInfo: 'Origin'
      PurReqnOrigin,
      @Semantics.text: true
      _PurReqnCreationInd._Text[1: Language = $session.system_language].PurReqnOriginDesc,
      
      @Consumption.hidden: true
      CreationDate,
      RelevantDates.CalendarYear,
      RelevantDates.CalendarQuarter,
      RelevantDates.CalendarMonth,
      RelevantDates.CalendarWeek,

      @ObjectModel.text.element: ['PurReqItemClassificationText']
      PurReqnItemClassification,
      @Semantics.text: true
      _PurReqnItemClassfctn._PurReqnItemClassfctnText[1:Language = $session.system_language].PurReqItemClassificationText,
      @DefaultAggregation: #SUM
      cast(  1 as mm_a_purchasereqnitemcount )                                                                                  as PurchaseRequisitionItemCount,

      @DefaultAggregation: #SUM
      NmbrOfFreeTxtItmCrtedFrmSSP,

      @DefaultAggregation: #SUM
      NmbrOfMaterialItmCrtedFrmSSP,

      @DefaultAggregation: #SUM
      NmbrOfCatalogItmCrtedFrmSSP,

      @DefaultAggregation: #SUM
      NmbrOfMaterialItmCrtedManually,

      @DefaultAggregation: #SUM
      NmbrOfFreeTxtItmCrtedManually,
      
      @DefaultAggregation: #SUM
      NmbrOfMatlItmCrtedFrmExtSrce

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_MM_MATERIALVALUEHELP",
"C_PURCHASINGGROUPVALUEHELP",
"C_PURCHASINGORGVALUEHELP",
"I_CALENDARDATE",
"I_MATERIALGROUP",
"I_MATERIALGROUPTEXT",
"I_PURCHASINGCATEGORY",
"I_PURCHASINGCATEGORYMATLGROUP",
"I_PURREQNCREATIONIND",
"I_PURREQNCREATIONINDTEXT",
"I_PURREQNITEMCLASSFCTN",
"I_PURREQNITEMCLASSFCTNTEXT",
"I_PURREQVALUATIONAREA",
"I_SUPPLIER",
"P_REQUISITIONTYPEANALYSIS"
],
"ASSOCIATED":
[
"C_MM_MATERIALVALUEHELP",
"C_PURCHASINGGROUPVALUEHELP",
"C_PURCHASINGORGVALUEHELP",
"I_MATERIALGROUP",
"I_PURREQNCREATIONIND",
"I_PURREQNITEMCLASSFCTN",
"I_PURREQVALUATIONAREA",
"I_SUPPLIER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/