C_MX_JournalEntryDetailsCube

DDL: C_MX_JOURNALENTRYDETAILSCUBE SQL: CMXJRNLENTRYC Type: view CONSUMPTION

Mexico Journal Entry Details Cube

C_MX_JournalEntryDetailsCube is a Consumption CDS View (Cube) that provides data about "Mexico Journal Entry Details Cube" in SAP S/4HANA. It reads from 1 data source (I_StRpJournalEntryHeaderLog) and exposes 15 fields with key fields SourceLedger, Ledger, CompanyCode, FiscalYear, AccountingDocument.

Data Sources (1)

SourceAliasJoin Type
I_StRpJournalEntryHeaderLog I_StRpJournalEntryHeaderLog inner

Parameters (1)

NameTypeDefault
P_AlternativeGLAccount figlmx_prim

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName CMXJRNLENTRYC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Mexico Journal Entry Details Cube view
Analytics.dataCategory #CUBE view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view
AccessControl.personalData.blocking #NOT_REQUIRED view
Analytics.internalName #LOCAL view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger JournalEntry SourceLedger
KEY Ledger JournalEntry Ledger
KEY CompanyCode JournalEntry CompanyCode
KEY FiscalYear
KEY AccountingDocument JournalEntry AccountingDocument
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptCategory I_StRpJournalEntryHeaderLog StatryRptCategory
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
DocumentReferenceID
PostingDate JournalEntry PostingDate
DocumentDate JournalEntry DocumentDate
AccountingDocumentType JournalEntry AccountingDocumentType
GLAccountendasGLAccount
PaymentMethod
MX_ExternalPaymentMethod
@AbapCatalog.sqlViewName: 'CMXJRNLENTRYC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Mexico Journal Entry Details Cube'
@Analytics: { dataCategory: #CUBE }
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: { sizeCategory: #XL , serviceQuality: #D, dataClass: #MIXED }
@Metadata: {
  ignorePropagatedAnnotations:true,
  allowExtensions: true
}
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Analytics.internalName:#LOCAL
define view C_MX_JournalEntryDetailsCube
  with parameters
    @EndUserText.label: 'Alternative Account'
    P_AlternativeGLAccount : figlmx_prim

  as select distinct from I_JournalEntryOperationalView as JournalEntry

    inner join            I_StRpJournalEntryHeaderLog on  I_StRpJournalEntryHeaderLog.CompanyCode        = JournalEntry.CompanyCode
                                                      and I_StRpJournalEntryHeaderLog.FiscalYear         = JournalEntry.FiscalYear
                                                      and I_StRpJournalEntryHeaderLog.AccountingDocument = JournalEntry.AccountingDocument

{
  key JournalEntry.SourceLedger,
  key JournalEntry.Ledger,
  key JournalEntry.CompanyCode,
  key cast( JournalEntry.FiscalYear as fis_gjahr_no_conv preserving type )        as FiscalYear,
  key JournalEntry.AccountingDocument,
  key I_StRpJournalEntryHeaderLog.StatryRptgEntity,
  key I_StRpJournalEntryHeaderLog.StatryRptCategory,
  key I_StRpJournalEntryHeaderLog.StatryRptRunID,

      cast( case JournalEntry._JournalEntry.AccountingDocumentHeaderText
              when '' then
              ( case
                  when  JournalEntry._JournalEntry.DocumentReferenceID = '' or
                        JournalEntry._JournalEntry.DocumentReferenceID is null then 'Sin descripción'
                  else  JournalEntry._JournalEntry.DocumentReferenceID
                end )
              else JournalEntry._JournalEntry.AccountingDocumentHeaderText end as bktxt) as AccountingDocumentHeaderText,

      JournalEntry._JournalEntry.DocumentReferenceID,

      JournalEntry.PostingDate,
      JournalEntry.DocumentDate,
      JournalEntry.AccountingDocumentType,
      // required for Auxiliary of Folios

      case $parameters.P_AlternativeGLAccount
        when 'X'
          then JournalEntry.AlternativeGLAccount
        else JournalEntry.GLAccount
      end                                        as GLAccount,

      cast( case JournalEntry.DocumentItemText
              when '' then 'Sin descripción'
              else JournalEntry.DocumentItemText end as farp_sgtxt preserving type)      as DocumentItemText,

      ''                                                                                 as PaymentMethod,
      cast( '' as fimx_external_payment_method )                                         as MX_ExternalPaymentMethod
}
// in order to enable performance optimizations for nested loops in the Auxiliary of Folios report, we must keep the full foreign key association to the compensation node

// for this, we need to expose the GL account and JE item text fields. Since the Auxiliary of Folios doesn't report document item details, we take the first JE item.

where
      JournalEntry.AccountingDocumentCategory <> 'S' --Noted Items
  and JournalEntry.LedgerGLLineItem           =  '000001'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"I_JOURNALENTRYOPERATIONALVIEW",
"I_STRPJOURNALENTRYHEADERLOG"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/