C_NO_SAFTJournalEntryCube

DDL: C_NO_SAFTJOURNALENTRYCUBE SQL: CNOSAFTJORENTC Type: view CONSUMPTION

SAF-T Norway Journal Entry Cube

C_NO_SAFTJournalEntryCube is a Consumption CDS View (Cube) that provides data about "SAF-T Norway Journal Entry Cube" in SAP S/4HANA. It reads from 2 data sources (I_JournalEntry, I_JournalEntryItem) and exposes 25 fields with key fields CompanyCode, FiscalYear, AccountingDocument, Ledger.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntry JournalEntry inner
I_JournalEntryItem JournalItem from

Parameters (4)

NameTypeDefault
P_Ledger fins_ledger
P_StartDate dats
P_EndDate dats
P_CompanyCode bukrs

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName CNOSAFTJORENTC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
Analytics.dataCategory #CUBE view
Metadata.allowExtensions true view
Analytics.internalName #LOCAL view
EndUserText.label SAF-T Norway Journal Entry Cube view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_JournalEntry CompanyCode
KEY FiscalYear I_JournalEntry FiscalYear
KEY AccountingDocument I_JournalEntry AccountingDocument
KEY Ledger I_JournalEntryItem Ledger
LedgerGroup I_JournalEntryItem SourceLedger
PostingDate I_JournalEntry PostingDate
JournalEntryType
CreationTime I_JournalEntry CreationTime
FiscalPeriod I_JournalEntry FiscalPeriod
DocumentDate I_JournalEntry DocumentDate
DocumentReferenceID I_JournalEntry DocumentReferenceID
AccountingDocumentType I_JournalEntry AccountingDocumentType
AccountingDocumentTypeName
AccountingDocumentCreationDate I_JournalEntry AccountingDocumentCreationDate
AccountingDocCreatedByUser I_JournalEntry AccountingDocCreatedByUser
AccountingDocumentHeaderText I_JournalEntry AccountingDocumentHeaderText
ExchangeRateelse0endasExchangeRate
CompanyCodeCurrency I_JournalEntry CompanyCodeCurrency
TransactionCurrency I_JournalEntry TransactionCurrency
DocumentTransaction
_CompanyCode I_JournalEntry _CompanyCode
_FiscalYear I_JournalEntry _FiscalYear
_FiscalPeriod I_JournalEntry _FiscalPeriod
_AccountingDocumentType I_JournalEntry _AccountingDocumentType
_Ledger I_JournalEntryItem _Ledger
@AbapCatalog.sqlViewName: 'CNOSAFTJORENTC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Analytics.dataCategory: #CUBE
@Metadata.allowExtensions:true
@Analytics.internalName:#LOCAL
@EndUserText.label: 'SAF-T Norway Journal Entry Cube'
define view C_NO_SAFTJournalEntryCube
  with parameters
    P_Ledger      : fins_ledger,
    P_StartDate   : dats,
    P_EndDate     : dats,
    P_CompanyCode : bukrs

  as select from I_JournalEntryItem as JournalItem
    inner join   I_JournalEntry     as JournalEntry on  JournalEntry.CompanyCode        = JournalItem.CompanyCode
                                                    and JournalEntry.FiscalYear         = JournalItem.FiscalYear
                                                    and JournalEntry.AccountingDocument = JournalItem.AccountingDocument
{

      @ObjectModel.foreignKey.association: '_CompanyCode'
  key JournalEntry.CompanyCode,
      @ObjectModel.foreignKey.association: '_FiscalYear'
  key JournalEntry.FiscalYear,
  key JournalEntry.AccountingDocument,
      @ObjectModel.foreignKey.association: '_Ledger'
  key JournalItem.Ledger,
      JournalItem.SourceLedger                                                                                                  as LedgerGroup,
      JournalEntry.PostingDate,
      cast( 'A' as fis_blart )                                                                                                  as JournalEntryType,
      JournalEntry.CreationTime,

      @ObjectModel.foreignKey.association: '_FiscalPeriod'
      JournalEntry.FiscalPeriod,
      JournalEntry.DocumentDate,
      JournalEntry.DocumentReferenceID,

      @ObjectModel.foreignKey.association: '_AccountingDocumentType'
      JournalEntry.AccountingDocumentType,
      coalesce(JournalEntry._AccountingDocumentTypeText[1: Language = $session.system_language].AccountingDocumentTypeName,' ') as AccountingDocumentTypeName,
      JournalEntry.AccountingDocumentCreationDate,
      JournalEntry.AccountingDocCreatedByUser,
      JournalEntry.AccountingDocumentHeaderText                                                                                 as AccountingDocumentHeaderText,

      case
       when JournalEntry.CompanyCodeCurrency <> JournalEntry.TransactionCurrency
       then JournalEntry.ExchangeRate
       else 0
      end                                                                                                                       as ExchangeRate,

      @Semantics.currencyCode:true
      JournalEntry.CompanyCodeCurrency,
      @Semantics.currencyCode:true
      JournalEntry.TransactionCurrency,

      concat(concat(JournalEntry.CompanyCode, JournalEntry.AccountingDocument), JournalEntry.FiscalYear )                       as DocumentTransaction,

      JournalEntry._CompanyCode,
      JournalEntry._FiscalYear,
      JournalEntry._FiscalPeriod,
      JournalEntry._AccountingDocumentType,
      JournalItem._Ledger
}
where
           JournalItem.Ledger                      = $parameters.P_Ledger
  and      JournalItem.LedgerGLLineItem            =  '000001'
  and      JournalEntry.PostingDate                between $parameters.P_StartDate and $parameters.P_EndDate
  and      JournalEntry.CompanyCode                = $parameters.P_CompanyCode
  and(
           JournalEntry.AccountingDocumentCategory =  ''
    or     JournalEntry.AccountingDocumentCategory =  'C'
    or     JournalEntry.AccountingDocumentCategory =  'J'
    or     JournalEntry.AccountingDocumentCategory =  'U'
    or     JournalEntry.AccountingDocumentCategory =  'L'
  )
  and(
    (
           JournalEntry._CompanyCode.Country       =  'NO'
      and(
           JournalItem.TaxCountry                  =  'NO'
        or JournalItem.TaxCountry                  =  ''
      )
    )
    or(
           JournalEntry._CompanyCode.Country       <> 'NO'
      and  JournalItem.TaxCountry                  =  'NO'
    )
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENTTYPETEXT",
"I_COMPANYCODE",
"I_JOURNALENTRY",
"I_JOURNALENTRYITEM"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTTYPE",
"I_COMPANYCODE",
"I_FISCALYEARFORCOMPANYCODE",
"I_FISCALYEARPERIODFORCMPNYCODE",
"I_LEDGER"
],
"BASE":
[
"I_JOURNALENTRY",
"I_JOURNALENTRYITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/