@ClientHandling.algorithm: #SESSION_VARIABLE //Inserted by VDM CDS Suite Plugin
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XXL
@AbapCatalog.sqlViewName: 'CMMNONMNGDPUSPN3'
@VDM.viewType: #CONSUMPTION
@Analytics.dataCategory: #CUBE
@Metadata.allowExtensions: true
@EndUserText.label: 'Non Managed Purchasing Spend Cube'
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.authorizationCheck: #CHECK
@Metadata.ignorePropagatedAnnotations:true
@ObjectModel.supportedCapabilities: [ #ANALYTICAL_PROVIDER ]
@ObjectModel.modelingPattern: #ANALYTICAL_CUBE
define view C_NonMngdPurchasingSpend3
with parameters
P_DisplayCurrency : displaycurrency,
P_DateFunction : datefunctionid,
P_StartDate: mm_a_delivery_date,
P_EndDate: mm_a_delivery_date,
P_Language : sylangu
as select from P_NonMngdPurchasingSpend( P_DisplayCurrency : $parameters.P_DisplayCurrency,
P_StartDate : $parameters.P_StartDate,
P_EndDate : $parameters.P_EndDate ) as NonManaged2
left outer join I_PurchasingCategoryMatlGroup as PurchasingCategoryMatlGroup on NonManaged2.MaterialGroup = PurchasingCategoryMatlGroup.MaterialGroup
left outer join I_CalendarDate as CalendarDate on PostingDate = CalendarDate.CalendarDate
association [1..*] to I_CostCenter as _CostCenter on $projection.CostCenter = _CostCenter.CostCenter
and $projection.ControllingArea = _CostCenter.ControllingArea
association [0..1] to I_GLAccount as _GLAccount on $projection.GLAccount = _GLAccount.GLAccount // 2937033
and $projection.CompanyCode = _GLAccount.CompanyCode // 2937033
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode // 2937033
association [0..1] to I_ControllingArea as _ControllingArea on $projection.ControllingArea = _ControllingArea.ControllingArea
association [1..1] to I_User as _User on $projection.AccountingDocCreatedByUser = _User.UserID
association [1..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant
association [1..1] to I_Material as _Material on $projection.Material = _Material.Material
association [1..1] to I_Product as _Product on $projection.Product = _Product.Product
association [1..1] to I_MaterialGroup as _MaterialGroup on $projection.MaterialGroup = _MaterialGroup.MaterialGroup
association [1..1] to I_ProductGroup as _ProductGroup on $projection.ProductGroup = _ProductGroup.MaterialGroup
association [1..1] to I_Supplier as _Supplier on $projection.Supplier = _Supplier.Supplier
{
@Semantics.fiscal.year: true
FiscalYear,
cast( AccountingDocument as mm_a_accounting_document ) as AccountingDocument,
@ObjectModel.foreignKey.association: '_Supplier'
//@ObjectModel.text.element: ['SupplierName'] //Inserted by VDM CDS Suite Plugin
//Commented by VDM CDS Suite Plugin:@Consumption.labelElement: 'SupplierName'
//Commented by VDM CDS Suite Plugin:
cast ( Supplier as odata_lifnr ) as Supplier,
@ObjectModel.foreignKey.association: '_CompanyCode' // 2937033
CompanyCode,
@ObjectModel.foreignKey.association: '_GLAccount' // 2937033
GLAccount,
AccountingDocumentType,
AccountingDocCreatedByUser,
PostingDate,
@VDM.lifecycle.status:#DEPRECATED
@VDM.lifecycle.successor: 'WBSElementInternalID'
WBSElement,
WBSElementInternalID,
//@ObjectModel.text.association: '_CostCenter._Text'
@ObjectModel.foreignKey.association: '_CostCenter'
CostCenter,
@ObjectModel.foreignKey.association: '_ControllingArea'
ControllingArea,
@Analytics.internalName: #LOCAL
@ObjectModel.foreignKey.association: '_Product'
Material as Product,
@VDM.lifecycle.status:#DEPRECATED
@VDM.lifecycle.successor: 'Product'
@ObjectModel.foreignKey.association: '_Material'
Material,
@Analytics.internalName: #LOCAL
@ObjectModel.foreignKey.association: '_ProductGroup'
NonManaged2.MaterialGroup as ProductGroup,
@VDM.lifecycle.status:#DEPRECATED
@VDM.lifecycle.successor: 'ProductGroup'
@ObjectModel.foreignKey.association: '_MaterialGroup'
NonManaged2.MaterialGroup,
@ObjectModel.text.element: ['PurgCatName']
@Consumption.labelElement: 'PurgCatName'
PurchasingCategoryMatlGroup._PurchasingCategory.PurchasingCategory as PurchasingCategory,
@Semantics.text: true
PurchasingCategoryMatlGroup._PurchasingCategory.PurgCatName as PurgCatName,
// PurchasingCategoryMatlGroup.PurgCatUUID as PurgCatUUID,
Fund,
cast( CompanyCodeCurrency as mm_a_cocode_currency ) as CompanyCodeCurrency,
ProfitCenter, // need profitcentername but the association is missing in "I_ReceivablesPayablesItem" view
@ObjectModel.foreignKey.association: '_Plant'
//@ObjectModel.text.element: ['PlantName'] //Inserted by VDM CDS Suite Plugin
//Commented by VDM CDS Suite Plugin:@Consumption.labelElement: 'PlantName'
//Commented by VDM CDS Suite Plugin:
Plant,
// @Semantics.text: true
// _Plant.PlantName,
//_CostCenter,
// @Semantics.text: true
// _CostCenter._Text[1: Language = $parameters.P_Language].CostCenterDescription,
// @Semantics.text: true
// _MaterialGroup._Text[1: Language = $parameters.P_Language].MaterialGroupName as MaterialGroupName,
// //_Material,
// @Semantics.text: true
// _Material._Text[1: Language = $parameters.P_Language].MaterialName as MaterialName,
@Semantics.calendar.year: true
CalendarDate.CalendarYear,
CalendarDate.CalendarQuarter,
CalendarDate.CalendarMonth,
CalendarDate.CalendarWeek,
cast( _User.UserDescription as mm_a_user_description ) as CreatedByUserFullName,
@DefaultAggregation:#SUM
@Semantics.amount.currencyCode:'DisplayCurrency'
cast( case when PurchaseOrder = '' then TotalSpendAmount
else 0
end as nonmanaged_spend_amount ) as NonManagedSpendAmount,
@DefaultAggregation:#SUM
@Semantics.amount.currencyCode:'DisplayCurrency'
cast( TotalSpendAmount as mm_a_total_spend_amount ) as TotalSpendAmount,
@Semantics.currencyCode:true
cast( :P_DisplayCurrency as displaycurrency ) as DisplayCurrency,
_Supplier,
_Product,
_ProductGroup,
@VDM.lifecycle.status:#DEPRECATED
@VDM.lifecycle.successor: '_ProductGroup'
_MaterialGroup,
@VDM.lifecycle.status:#DEPRECATED
@VDM.lifecycle.successor: '_Product'
_Material,
_Plant,
_ControllingArea,
_CostCenter,
_CompanyCode, // 2937033
_GLAccount // 2937033
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CALENDARDATE",
"I_PURCHASINGCATEGORY",
"I_PURCHASINGCATEGORYMATLGROUP",
"I_USER",
"P_NONMNGDPURCHASINGSPEND"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTER",
"I_GLACCOUNT",
"I_MATERIAL",
"I_MATERIALGROUP",
"I_PLANT",
"I_PRODUCT",
"I_PRODUCTGROUP",
"I_SUPPLIER",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/