P_PE_GLAccountLineItemSemTag

DDL: P_PE_GLACCOUNTLINEITEMSEMTAG Type: view_entity CONSUMPTION Package: GLO_FIN_IS_PE

Peru - G/L Account Line Item with Semantic Tag

P_PE_GLAccountLineItemSemTag is a Consumption CDS View that provides data about "Peru - G/L Account Line Item with Semantic Tag" in SAP S/4HANA. It reads from 2 data sources (I_GLAccountLineItem, I_SemTagGLAccount) and exposes 35 fields with key fields Ledger, SourceLedger, CompanyCode, FiscalYear, AccountingDocument. Part of development package GLO_FIN_IS_PE.

Data Sources (2)

SourceAliasJoin Type
I_GLAccountLineItem GLAccountLineItem from
I_SemTagGLAccount SemTagGLAccount inner

Parameters (1)

NameTypeDefault
P_ReportingCurrency glo_reporting_currency

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (35)

KeyFieldSource TableSource FieldDescription
KEY Ledger I_GLAccountLineItem Ledger
KEY SourceLedger I_GLAccountLineItem SourceLedger
KEY CompanyCode I_GLAccountLineItem CompanyCode
KEY FiscalYear I_GLAccountLineItem FiscalYear
KEY AccountingDocument I_GLAccountLineItem AccountingDocument
KEY LedgerGLLineItem I_GLAccountLineItem LedgerGLLineItem
KEY GLAccountHierarchy I_SemTagGLAccount GLAccountHierarchy
KEY SemanticTag I_SemTagGLAccount SemanticTag
KEY ValidityStartDate I_SemTagGLAccount ValidityStartDate
KEY ValidityEndDate I_SemTagGLAccount ValidityEndDate
LedgerFiscalYear I_GLAccountLineItem LedgerFiscalYear
FiscalYearVariant I_GLAccountLineItem FiscalYearVariant
FiscalPeriod I_GLAccountLineItem FiscalPeriod
PostingDate I_GLAccountLineItem PostingDate
AccountingDocumentCategory I_GLAccountLineItem AccountingDocumentCategory
ChartOfAccounts I_GLAccountLineItem ChartOfAccounts
GLAccount I_GLAccountLineItem GLAccount
AlternativeGLAccount I_GLAccountLineItem AlternativeGLAccount
CountryChartOfAccounts I_GLAccountLineItem CountryChartOfAccounts
ReportingCurrency
_Ledger I_GLAccountLineItem _Ledger
_SourceLedger I_GLAccountLineItem _SourceLedger
_JournalEntry I_GLAccountLineItem _JournalEntry
_CompanyCode I_GLAccountLineItem _CompanyCode
_FiscalYear I_GLAccountLineItem _FiscalYear
_FiscalPeriodForVariant I_GLAccountLineItem _FiscalPeriodForVariant
_FiscalCalendarDate I_GLAccountLineItem _FiscalCalendarDate
_LedgerFiscalYearForVariant I_GLAccountLineItem _LedgerFiscalYearForVariant
_GLAccountInChartOfAccounts I_GLAccountLineItem _GLAccountInChartOfAccounts
_ChartOfAccounts I_GLAccountLineItem _ChartOfAccounts
_AccountingDocumentCategory I_GLAccountLineItem _AccountingDocumentCategory
_AlternativeGLAccount I_GLAccountLineItem _AlternativeGLAccount
_CountryChartOfAccounts I_GLAccountLineItem _CountryChartOfAccounts
_SemanticTag I_SemTagGLAccount _SemanticTag
_Hierarchy I_SemTagGLAccount _Hierarchy
@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