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.
@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:#LOCALdefineview C_MX_JournalEntryDetailsCube
withparameters@EndUserText.label: 'Alternative Account'
P_AlternativeGLAccount : figlmx_prim
asselectdistinctfrom I_JournalEntryOperationalView as JournalEntry
innerjoin 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,
keycast( 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
( casewhen JournalEntry._JournalEntry.DocumentReferenceID = '' or
JournalEntry._JournalEntry.DocumentReferenceID isnullthen 'Sin descripción'
else JournalEntry._JournalEntry.DocumentReferenceID
end )
else JournalEntry._JournalEntry.AccountingDocumentHeaderText endas 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
endas GLAccount,
cast( case JournalEntry.DocumentItemText
when '' then 'Sin descripción'
else JournalEntry.DocumentItemText endas farp_sgtxt preserving type) as DocumentItemText,
'' as PaymentMethod,
cast( '' as fimx_external_payment_method ) as MX_ExternalPaymentMethod
}
// inorder to enable performance optimizations for nested loops in the Auxiliary of Folios report, we must keep the full foreign keyassociation 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":""
}
}*/