@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
@VDM.private: true
@VDM.viewType: #CONSUMPTION
define view entity P_PE_GLAccountLineItemSemTag
with parameters
P_ReportingCurrency : glo_reporting_currency
as select from I_GLAccountLineItem as GLAccountLineItem
inner join I_SemTagGLAccount as SemTagGLAccount on SemTagGLAccount.GLAccount = GLAccountLineItem.AlternativeGLAccount
and SemTagGLAccount.ChartOfAccounts = GLAccountLineItem.CountryChartOfAccounts
{
@ObjectModel.foreignKey.association : '_Ledger'
key GLAccountLineItem.Ledger,
@ObjectModel.foreignKey.association : '_SourceLedger'
key GLAccountLineItem.SourceLedger,
@ObjectModel.foreignKey.association : '_CompanyCode'
key GLAccountLineItem.CompanyCode,
@ObjectModel.foreignKey.association : '_FiscalYear'
key GLAccountLineItem.FiscalYear,
@ObjectModel.foreignKey.association : '_JournalEntry'
key GLAccountLineItem.AccountingDocument,
key GLAccountLineItem.LedgerGLLineItem,
@ObjectModel.foreignKey.association : '_Hierarchy'
key SemTagGLAccount.GLAccountHierarchy,
@ObjectModel.foreignKey.association : '_SemanticTag'
key SemTagGLAccount.SemanticTag,
@Semantics.businessDate.from : true
key SemTagGLAccount.ValidityStartDate,
@Semantics.businessDate.to: true
key SemTagGLAccount.ValidityEndDate,
@ObjectModel.foreignKey.association : '_LedgerFiscalYearForVariant'
GLAccountLineItem.LedgerFiscalYear,
@ObjectModel.foreignKey.association : '_LedgerFiscalYearForVariant'
GLAccountLineItem.FiscalYearVariant,
@ObjectModel.foreignKey.association : '_FiscalPeriodForVariant'
GLAccountLineItem.FiscalPeriod,
@ObjectModel.foreignKey.association : '_FiscalCalendarDate'
GLAccountLineItem.PostingDate,
@ObjectModel.foreignKey.association : '_AccountingDocumentCategory'
GLAccountLineItem.AccountingDocumentCategory,
@ObjectModel.foreignKey.association : '_ChartOfAccounts'
GLAccountLineItem.ChartOfAccounts,
@ObjectModel.foreignKey.association : '_GLAccountInChartOfAccounts'
GLAccountLineItem.GLAccount,
@ObjectModel.foreignKey.association : '_AlternativeGLAccount'
GLAccountLineItem.AlternativeGLAccount,
@ObjectModel.foreignKey.association : '_CountryChartOfAccounts'
GLAccountLineItem.CountryChartOfAccounts,
cast ( $parameters .P_ReportingCurrency as glo_reporting_currency ) as ReportingCurrency,
@Aggregation.default : #SUM
@Semantics: { amount : {currencyCode: 'ReportingCurrency'} }
cast (
case $parameters .P_ReportingCurrency
when GLAccountLineItem.CompanyCodeCurrency
then GLAccountLineItem.AmountInCompanyCodeCurrency
when GLAccountLineItem.GlobalCurrency
then GLAccountLineItem.AmountInGlobalCurrency
when GLAccountLineItem.TransactionCurrency
then GLAccountLineItem.AmountInTransactionCurrency
when GLAccountLineItem.FreeDefinedCurrency1
then GLAccountLineItem.AmountInFreeDefinedCurrency1
when GLAccountLineItem.FreeDefinedCurrency2
then GLAccountLineItem.AmountInFreeDefinedCurrency2
when GLAccountLineItem.FreeDefinedCurrency3
then GLAccountLineItem.AmountInFreeDefinedCurrency3
when GLAccountLineItem.FreeDefinedCurrency4
then GLAccountLineItem.AmountInFreeDefinedCurrency4
when GLAccountLineItem.FreeDefinedCurrency5
then GLAccountLineItem.AmountInFreeDefinedCurrency5
when GLAccountLineItem.FreeDefinedCurrency6
then GLAccountLineItem.AmountInFreeDefinedCurrency6
when GLAccountLineItem.FreeDefinedCurrency7
then GLAccountLineItem.AmountInFreeDefinedCurrency7
when GLAccountLineItem.FreeDefinedCurrency8
then GLAccountLineItem.AmountInFreeDefinedCurrency8
end as glo_amount_rptg_crcy preserving type ) as AmountInReportingCurrency,
GLAccountLineItem._Ledger,
GLAccountLineItem._SourceLedger,
GLAccountLineItem._JournalEntry,
GLAccountLineItem._CompanyCode,
GLAccountLineItem._FiscalYear,
GLAccountLineItem._FiscalPeriodForVariant,
GLAccountLineItem._FiscalCalendarDate,
GLAccountLineItem._LedgerFiscalYearForVariant,
GLAccountLineItem._GLAccountInChartOfAccounts,
GLAccountLineItem._ChartOfAccounts,
GLAccountLineItem._AccountingDocumentCategory,
GLAccountLineItem._AlternativeGLAccount,
GLAccountLineItem._CountryChartOfAccounts,
SemTagGLAccount._SemanticTag,
SemTagGLAccount._Hierarchy
}
where
(
GLAccountLineItem.FunctionalArea = ''
and SemTagGLAccount.IsFunctionalAreaPermitted = 'X'
)
or SemTagGLAccount.SemanticTag = 'NTINC_ALAC'
or SemTagGLAccount.IsFunctionalAreaPermitted = ''
or SemTagGLAccount.IsFunctionalAreaPermitted is null
or GLAccountLineItem.GLAccountType = 'X' // Balance Sheet Account
or GLAccountLineItem.GLAccountType = 'C' // Cash Account
or GLAccountLineItem.GLAccountType = 'S' // Secondary Costs
or GLAccountLineItem.GLAccountType = 'P' // Primary Costs or Revenue
or GLAccountLineItem.GLAccountType = 'N' // Nonoperating Expense or Income
Depth:
1
2
3
4
5
All
Reload
P_PE_GLAccountLineItemSemTag view_entity