@AbapCatalog.sqlViewName: 'ISOLNORDERPROF'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@Metadata.allowExtensions: true
@EndUserText.label: 'Solution Business Profitability - Cube'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #REQUIRED
@VDM.viewType: #COMPOSITE
@Analytics.dataCategory: #CUBE
@ObjectModel.representativeKey: 'LedgerGLLineItem'
@Analytics.internalName: #LOCAL
@Search.searchable: false
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.modelingPattern: #ANALYTICAL_CUBE
@ObjectModel.supportedCapabilities: [ #ANALYTICAL_PROVIDER,
#SQL_DATA_SOURCE,
#CDS_MODELING_DATA_SOURCE ]
define view I_SolnOrderProfitabilityCube
as select from I_GLAccountLineItemSemTag as I_GLAccountLineItemSemTag
association [0..1] to I_MargAnlysProdAndSrvcObjType as _ObjectType on $projection.AccountAssignmentType = _ObjectType.MarginAnalysisObjectType
//association [0..1] to I_BusinessSolutionOrderStdVH as _SolutionOrder on $projection.BusinessSolutionOrder = _SolutionOrder.BusinessSolutionOrder
association [0..1] to I_FiscalCalYearPeriodForCoCode as _FiscalYearPeriodNew on $projection.FiscalYearPeriod = _FiscalYearPeriodNew.FiscalYearPeriod
and $projection.CompanyCode = _FiscalYearPeriodNew.CompanyCode
association [1..1] to E_JournalEntryItem as _Extension on $projection.SourceLedger = _Extension.SourceLedger
and $projection.CompanyCode = _Extension.CompanyCode
and $projection.FiscalYear = _Extension.FiscalYear
and $projection.AccountingDocument = _Extension.AccountingDocument
and $projection.LedgerGLLineItem = _Extension.LedgerGLLineItem
{
@ObjectModel.foreignKey.association: '_Ledger'
@Environment.sql.passValue: true
key Ledger,
@ObjectModel.foreignKey.association: '_SourceLedger'
key SourceLedger,
@ObjectModel.foreignKey.association: '_CompanyCode'
@Environment.sql.passValue: true
key CompanyCode,
@ObjectModel.foreignKey.association: '_FiscalYear'
@Environment.sql.passValue: true
key FiscalYear,
@ObjectModel.foreignKey.association: '_JournalEntry'
key AccountingDocument,
key LedgerGLLineItem,
@ObjectModel.foreignKey.association: '_Hierarchy'
@Environment.sql.passValue: true
key GLAccountHierarchy,
@ObjectModel.foreignKey.association: '_SemanticTag'
key SemanticTag,
@Semantics.businessDate.from: true
key ValidityStartDate,
@Semantics.businessDate.to: true
key ValidityEndDate,
@ObjectModel.foreignKey.association: '_LedgerFiscalYear'
LedgerFiscalYear,
@ObjectModel.foreignKey.association: '_FiscalPeriod'
FiscalPeriod,
@ObjectModel.foreignKey.association: '_FiscalYearPeriodNew'
//cast( FiscalYearPeriod as abap.char( 7 ) ) as FiscalYearPeriod,
FiscalYearPeriod,
FiscalYearVariant,
@ObjectModel.foreignKey.association: '_ServiceContract'
ServiceContract,
@Analytics.internalName: #LOCAL
@ObjectModel.foreignKey.association: '_ServiceContractItem'
ServiceContractItem,
BusinessSolutionOrder,
BusinessSolutionOrderItem,
@ObjectModel.foreignKey.association: '_ProviderContract'
ProviderContract,
@ObjectModel.foreignKey.association: '_ProviderContractItem'
ProviderContractItem,
@ObjectModel.foreignKey.association: '_ServiceContractType'
ServiceContractType,
@ObjectModel.foreignKey.association: '_ObjectType'
AccountAssignmentType,
@ObjectModel.foreignKey.association: '_ProjectExternalID'
ProjectExternalID,
@ObjectModel.foreignKey.association: '_ProfitCenter'
ProfitCenter,
@ObjectModel.foreignKey.association: '_ServiceDocumentType'
ServiceDocumentType,
@ObjectModel.foreignKey.association: '_ServiceDocument'
ServiceDocument,
@ObjectModel.foreignKey.association: '_ServiceDocumentItem'
ServiceDocumentItem,
@ObjectModel.foreignKey.association: '_BillToParty'
BillToParty,
@ObjectModel.foreignKey.association: '_BusinessTransactionType'
BusinessTransactionType,
@ObjectModel.foreignKey.association: '_Customer'
Customer,
@ObjectModel.foreignKey.association: '_CustomerGroup'
CustomerGroup,
@ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'
GLAccount,
CustomerSupplierIndustry,
@ObjectModel.foreignKey.association: '_SoldProduct'
SoldProduct,
@ObjectModel.foreignKey.association: '_SoldProductGroup'
SoldProductGroup,
@ObjectModel.foreignKey.association: '_SalesOrder'
SalesOrder,
@ObjectModel.foreignKey.association: '_SalesOrderItem'
SalesOrderItem,
@ObjectModel.foreignKey.association: '_SalesOrganization'
SalesOrganization,
@ObjectModel.foreignKey.association: '_ShipToParty'
ShipToParty,
@ObjectModel.foreignKey.association: '_ChartOfAccounts'
ChartOfAccounts,
@ObjectModel.foreignKey.association: '_ControllingArea'
ControllingArea,
@ObjectModel.foreignKey.association: '_BaseUnit'
@Semantics.unitOfMeasure:true
BaseUnit,
@DefaultAggregation: #SUM
@Semantics: { quantity : {unitOfMeasure: 'BaseUnit'} }
Quantity,
BillableControl,
@ObjectModel.foreignKey.association: '_DistributionChannel'
DistributionChannel,
OrganizationDivision,
@ObjectModel.foreignKey.association: '_Equipment'
Equipment,
@ObjectModel.foreignKey.association: '_FunctionalArea'
FunctionalArea,
Material,
@ObjectModel.foreignKey.association: '_PartnerCostCtrActivityType'
PartnerCostCtrActivityType,
PersonnelNumber,
@ObjectModel.foreignKey.association: '_Plant'
Plant,
@ObjectModel.foreignKey.association: '_CustomerSupplierCountry'
CustomerSupplierCountry,
cast( WBSElement as fis_wbs_no_conv preserving type ) as WBSElement,
@ObjectModel.foreignKey.association: '_SalesDistrict'
SalesDistrict,
//////////////////////////////////////////////////////////////////////
// Key Figures with Semantic Tag
//////////////////////////////////////////////////////////////////////
@Semantics.currencyCode:true
CompanyCodeCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
BilledRevenueAmtInCoCodeCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
RecognizableCostAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
RecognizedRevnAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
RecognizedCOGSAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
RecognizedMarginAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
RevenueAdjustmentAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
COGSAdjustmentAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
DeferredCOGSAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
DeferredRevenueAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
AccruedRevenueAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
AccruedCOGSAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
ImminentLossRsrvAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
SalesDeductReserveAmtInCCCrcy,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
UnrlzdCostsReserveAmtInCCCrcy,
///////////////////////////////////////////////////////////////////////
// Associations
///////////////////////////////////////////////////////////////////////
_ProjectExternalID,
_SourceLedger,
_JournalEntry,
_CompanyCodeCurrency,
_BaseUnit,
_Hierarchy,
_SemanticTag,
_CurrentProfitCenter,
_CustomerSupplierCountry,
_GLAccountInCompanyCode,
_ObjectType,
//_SolutionOrder,
_CompanyCode,
_FiscalYear,
//_FiscalYearPeriod,
_Ledger,
_SalesOrder,
_SalesOrderItem,
_ServiceContract,
_ServiceContractItem,
_Customer,
_CustomerGroup,
_ShipToParty,
_SoldProduct,
_SoldProductGroup,
_ProfitCenter,
_ServiceDocumentType,
_ServiceDocument,
_ServiceDocumentItem,
_SalesOrganization,
_BillToParty,
_BusinessTransactionType,
_ChartOfAccounts,
_ControllingArea,
_DistributionChannel,
_Equipment,
_FunctionalArea,
_GLAccountInChartOfAccounts,
_PartnerCostCtrActivityType,
_Plant,
_SalesDistrict,
_ServiceContractType,
_LedgerFiscalYear,
_FiscalPeriod,
_FiscalYearVariant,
_FiscalYearPeriodNew,
_ProviderContract,
_ProviderContractItem
}
where
(( AccountAssignmentType = 'PR' and ControllingObjectClass = 'PA' )
or AccountAssignmentType = 'EO'
or AccountAssignmentType = 'SV'
or AccountAssignmentType = 'SC'
) and BusinessSolutionOrder != ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_GLACCOUNTLINEITEMSEMTAG"
],
"ASSOCIATED":
[
"E_JOURNALENTRYITEM",
"I_BUSINESSTRANSACTIONTYPE",
"I_CHARTOFACCOUNTS",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTERACTIVITYTYPE",
"I_COUNTRY",
"I_CURRENCY",
"I_CUSTOMER",
"I_CUSTOMERGROUP",
"I_DISTRIBUTIONCHANNEL",
"I_EQUIPMENT",
"I_FINANCIALSTATEMENTHIERARCHY",
"I_FISCALCALYEARPERIODFORCOCODE",
"I_FISCALYEARFORCOMPANYCODE",
"I_FISCALYEARPERIODFORCMPNYCODE",
"I_FISCALYEARVARIANT",
"I_FUNCTIONALAREA",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_GLACCOUNTINCOMPANYCODE",
"I_JOURNALENTRY",
"I_LEDGER",
"I_MARGANLYSPRODANDSRVCOBJTYPE",
"I_PLANT",
"I_PRODUCT",
"I_PRODUCTGROUP",
"I_PROFITCENTER",
"I_PROJECTBYEXTERNALID",
"I_PROVIDERCONTRACT",
"I_PROVIDERCONTRACTITEM",
"I_SALESDISTRICT",
"I_SALESORDER",
"I_SALESORDERITEM",
"I_SALESORGANIZATION",
"I_SEMANTICTAG",
"I_SERVICEDOCUMENTTYPE",
"I_SRVCDOCBYDOCUMENTTYPE",
"I_SRVCDOCITEMBYDOCUMENTTYPE",
"I_UNITOFMEASURE"
],
"BASE":
[
"I_GLACCOUNTLINEITEMSEMTAG"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/