@AbapCatalog.sqlViewName: 'IMPJRNLCUBE'
@VDM.viewType: #COMPOSITE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Master Project Accounting Journal Entry Item Cube'
@ObjectModel.representativeKey: 'LedgerGLLineItem'
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@Analytics: { dataCategory: #CUBE, dataExtraction.enabled: true }
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.buffering.status: #NOT_ALLOWED
@Metadata.ignorePropagatedAnnotations: true
@AccessControl.personalData.blocking: #REQUIRED
@Metadata.allowExtensions:true
@AccessControl.personalData.blockingIndicator: ['FALSE']
define view I_MPJournalEntryItemCube
as select from I_JournalEntryItem
//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
association [0..1] to I_InternalOrder as _InternalOrder on $projection.OrderID = _InternalOrder.InternalOrder
association [0..1] to I_Order as _Order on $projection.OrderID = _Order.OrderID
{
@ObjectModel.foreignKey.association: '_SourceLedger'
key SourceLedger,
@ObjectModel.foreignKey.association: '_CompanyCode'
key CompanyCode,
@ObjectModel.foreignKey.association: '_FiscalYear'
//@Semantics.fiscal.year: true
key FiscalYear,
@ObjectModel.foreignKey.association: '_JournalEntry'
key AccountingDocument,
key LedgerGLLineItem,
@ObjectModel.foreignKey.association: '_Ledger'
key Ledger,
//@ObjectModel.foreignKey.association: '_LedgerFiscalYear'
//@Semantics.fiscal.year: true
LedgerFiscalYear,
GLRecordType,
_Ledger._Text[1: Language = $session.system_language].LedgerName as LedgerName,
cast( _CompanyCode.CompanyCodeName as fis_butxt preserving type ) as CompanyCodeName,
// Object which are dependent objects --> first
@ObjectModel.foreignKey.association: '_ChartOfAccounts'
ChartOfAccounts,
@ObjectModel.foreignKey.association: '_ControllingArea'
ControllingArea,
cast( _ControllingArea.ControllingAreaName as fis_bezei preserving type ) as ControllingAreaName,
///////////////////////////////////////////////////////////////////////////////
// .INCLUDE ACDOC_SI_00 Unified Journal Entry: Transaction, Currencies, Units
///////////////////////////////////////////////////////////////////////////////
//@ObjectModel.foreignKey.association: '_BusinessTransactionType'
BusinessTransactionType,
//@ObjectModel.foreignKey.association: '_ReferenceDocumentType'
ReferenceDocumentType,
ReferenceDocument,
ReferenceDocumentItem,
ReferenceDocumentItemGroup,
@ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'
GLAccount,
////////////////////////////////////////////////////////////////////////////////////
// .INCLUDE ACDOC_SI_GL_ACCAS Unified Journal Entry: G/L additional account assignments
////////////////////////////////////////////////////////////////////////////////////
@ObjectModel.foreignKey.association: '_CostCenter'
CostCenter,
//@ObjectModel.foreignKey.association: '_PartnerCostCenter'
PartnerCostCenter,
@ObjectModel.foreignKey.association: '_BusinessArea'
BusinessArea,
@ObjectModel.foreignKey.association: '_Segment'
Segment,
/////////////////////////////////////////////////////////////////////////////////////
// .INCLUDE ACDOC_SI_VALUE_DATA Unified Journal Entry: Value Fields
/////////////////////////////////////////////////////////////////////////////////////
@ObjectModel.foreignKey.association: '_TransactionCurrency'
@Semantics.currencyCode:true
TransactionCurrency as TransactionCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} } AmountInTransactionCurrency,
////////////////////////////////////
@Semantics.currencyCode:true
ControllingObjectCurrency as ControllingObjectCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'ControllingObjectCurrency'} } AmountInObjectCurrency,
@ObjectModel.foreignKey.association: '_BaseUnit'
@Semantics.unitOfMeasure:true
BaseUnit as BaseUnit,
@DefaultAggregation: #SUM
@Semantics: { quantity : {unitOfMeasure: 'BaseUnit'} } Quantity,
@DefaultAggregation: #SUM
@Semantics: { quantity : {unitOfMeasure: 'BaseUnit'} } FixedQuantity,
@ObjectModel.foreignKey.association: '_CostSourceUnit'
@Semantics.unitOfMeasure:true
CostSourceUnit,
@DefaultAggregation: #SUM
@Semantics: { quantity : {unitOfMeasure: 'CostSourceUnit'} } ValuationQuantity,
/////////////////////////////////////////////////////////////////////////////
// .INCLUDE ACDOC_SI_FIX Unified Journal Entry: Mandatory fields for G/L
////////////////////////////////////////////////////////////////////////////
//@ObjectModel.foreignKey.association: '_FiscalPeriod'
@Semantics.fiscal.period: true
FiscalPeriod,
//@Semantics.businessDate.at: true
cast (PostingDate as abap.char( 10 )) as PostingDate,
DocumentDate,
@ObjectModel.foreignKey.association: '_AccountingDocumentType'
AccountingDocumentType,
_AccountingDocumentType._Text[1: Language = $session.system_language].AccountingDocumentTypeName as AccountingDocumentTypeName,
AccountingDocumentItem,
AssignmentReference,
//@ObjectModel.foreignKey.association: '_AccountingDocumentCategory'
AccountingDocumentCategory,
//@ObjectModel.foreignKey.association: '_User'
AccountingDocCreatedByUser,
///////////////////////////////////////////////////////////////////////////
// .INCLUDE ACDOC_SI_GEN Unified Journal Entry: Fields for several subledgers
//////////////////////////////////////////////////////////////////////////
//@ObjectModel.foreignKey.association: '_PurchasingDocument'
PurchasingDocument,
//@ObjectModel.foreignKey.association: '_PurchasingDocumentItem'
PurchasingDocumentItem,
DocumentItemText,
@ObjectModel.foreignKey.association: '_SalesOrder'
SalesOrder,
//@ObjectModel.foreignKey.association: '_SalesOrderItem'
SalesOrderItem,
@ObjectModel.foreignKey.association: '_Material'
Material,
@ObjectModel.foreignKey.association: '_Plant'
Plant,
@ObjectModel.foreignKey.association: '_Supplier'
Supplier,
@ObjectModel.foreignKey.association: '_Customer'
Customer,
@ObjectModel.foreignKey.association: '_FinancialAccountType'
FinancialAccountType,
////////////////////////////////////////////////////////////////////////////
// .INCLUDE ACDOC_SI_CO Unified Journal Entry: CO fields
///////////////////////////////////////////////////////////////////////////
//@ObjectModel.foreignKey.association: '_ControllingObject'
ControllingObject,
PersonnelNumber,
AccountAssignment,
AccountAssignmentType,
//@ObjectModel.foreignKey.association: '_CostCtrActivityType'
CostCtrActivityType,
@ObjectModel.foreignKey.association: '_Order'
OrderID,
//@ObjectModel.foreignKey.association: '_OrderCategory'
OrderCategory,
//@ObjectModel.foreignKey.association: '_WBSElementInternalID'
//WBSElementInternalID,
@ObjectModel.foreignKey.association: '_WBSElement'
WBSElement,
@ObjectModel.foreignKey.association: '_WorkPackage'
WorkPackage,
@ObjectModel.foreignKey.association: '_Project'
Project,
//@ObjectModel.foreignKey.association: '_ProjectNetwork'
ProjectNetwork,
//@ObjectModel.foreignKey.association: '_RelatedNetworkActivity'
RelatedNetworkActivity,
//////////////////////////////////////////////////////////////////////
// .INCLUDE ACDOC_SI_COPA Unified Journal Entry: CO-PA fields
//////////////////////////////////////////////////////////////////////
//@ObjectModel.foreignKey.association: '_BillingDocumentType'
BillingDocumentType,
//@ObjectModel.foreignKey.association: '_SalesOrganization'
SalesOrganization,
//@ObjectModel.foreignKey.association: '_DistributionChannel'
DistributionChannel,
OrganizationDivision,
//CustomerSupplierCountry,
_SourceLedger,
_JournalEntry,
_CompanyCode,
_FiscalYear,
//_LedgerFiscalYear,
_ChartOfAccounts,
_ControllingArea,
//_BusinessTransactionType,
_TransactionCurrency,
_CostCenter,
_BaseUnit,
//_PartnerCostCenter,
_WBSElement,
//_WBSElementInternalID,
_Project,
//_PurchasingDocument,
_GLAccountInChartOfAccounts,
_GLAccountInCompanyCode,
_AccountingDocumentType,
//_PurchasingDocumentItem,
_WorkPackage,
_Ledger,
//_SalesOrderItem,
//_ReferenceDocumentType,
_Plant,
//_AccountingDocumentCategory,
_Supplier,
_Material,
_Customer,
//_CostCtrActivityType,
//_User,
_SalesOrder,
_InternalOrder,
_Order,
//_OrderCategory,
//_ControllingObject,
//_BillingDocumentType,
//_SalesOrganization,
//_DistributionChannel,
//_ProjectNetwork,
_CostSourceUnit,
_FinancialAccountType,
_BusinessArea,
_Segment
//_Extension Extensions must be local
}
where Ledger = '0L'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENTTYPE",
"I_ACCOUNTINGDOCUMENTTYPETEXT",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_JOURNALENTRYITEM",
"I_LEDGER",
"I_LEDGERTEXT"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTTYPE",
"I_BUSINESSAREA",
"I_CHARTOFACCOUNTS",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTER",
"I_CURRENCY",
"I_CUSTOMER",
"I_FINANCIALACCOUNTTYPE",
"I_FISCALYEARFORCOMPANYCODE",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_GLACCOUNTINCOMPANYCODE",
"I_INTERNALORDER",
"I_JOURNALENTRY",
"I_LEDGER",
"I_MATERIAL",
"I_ORDER",
"I_PLANT",
"I_PROJECT",
"I_SALESORDER",
"I_SEGMENT",
"I_SUPPLIER",
"I_UNITOFMEASURE",
"I_WBSELEMENT",
"I_WORKPACKAGE"
],
"BASE":
[
"I_JOURNALENTRYITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/