C_MX_JrnlEntrItmPaytDetailsC

DDL: C_MX_JRNLENTRITMPAYTDETAILSC Type: view CONSUMPTION Package: GLO_FIN_IS_GL_MX_JE

Journal Entries Items with Payments Cube

C_MX_JrnlEntrItmPaytDetailsC is a Consumption CDS View (Cube) that provides data about "Journal Entries Items with Payments Cube" in SAP S/4HANA. It reads from 3 data sources (P_MX_JrnlEntrItmPaytDetailsC, P_MX_JrnlEntryDistinctGLAcct, P_MX_JournalEntryPaymentItem) and exposes 28 fields with key fields SourceLedger, Ledger, CompanyCode, AccountingDocument, GLAccount. Part of development package GLO_FIN_IS_GL_MX_JE.

Data Sources (3)

SourceAliasJoin Type
P_MX_JrnlEntrItmPaytDetailsC P_MX_JrnlEntrItmPaytDetailsC from
P_MX_JrnlEntryDistinctGLAcct P_MX_JrnlEntryDistinctGLAcct inner
P_MX_JournalEntryPaymentItem Payments inner

Parameters (5)

NameTypeDefault
P_AlternativeGLAccount figlmx_prim
P_Ledger fins_ledger
P_FiscalYear fis_gjahr_no_conv
P_FromPostingDate fis_budat_from
P_ToPostingDate fis_budat_to

Annotations (14)

NameValueLevelField
AbapCatalog.compiler.compareFilter true view
AbapCatalog.sqlViewName CMXJEPAYMDETC view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
Analytics.dataCategory #CUBE view
Analytics.internalName #LOCAL view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Journal Entries Items with Payments Cube view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #CONSUMPTION view

Fields (28)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger JournalEntryItem SourceLedger Source Ledger
KEY Ledger JournalEntryItem Ledger Ledger
KEY CompanyCode JournalEntryItem CompanyCode Receiver Company Code
KEY AccountingDocument JournalEntryItem AccountingDocument Journal Entry
KEY GLAccount P_MX_JrnlEntryDistinctGLAcct GLAccount General Ledger
KEY DocumentItemText P_MX_JrnlEntryDistinctGLAcct DocumentItemText Text
KEY FiscalYear JournalEntryItem FiscalYear G/L Fiscal Year
KEY StatryRptgEntity StatryRptgEntity Reporting Entity
KEY StatryRptCategory StatryRptCategory Report ID
KEY StatryRptRunID StatryRptRunID Report Run ID
AccountingDocumentItem JournalEntryItem AccountingDocumentItem Posting View Item
PostingDate JournalEntryItem PostingDate Posting Date for GR
OutgoingCheque Check OutgoingCheque
dec95asExchangeRate
BankAccountelseendasubkntasBankAccount
BankelseendasubnklasBank
BankNameelseendasbankaasBankName
BankNameelseendasbankaasPayeeBankName
OrganizationBPName1 JournalEntryItem OrganizationBPName1 Name 1
TaxNumber1 JournalEntryItem TaxNumber1 VAT Reg. No.
HouseBankAccount Proposal HouseBankAccount House Bank Account
PaymentRecipient Proposal PaymentRecipient
PaymentMethodIsUsedForCheck
PaytMethIsUsdForBillOfExchange
PaytMethIsUsdForChkBillOfExch
PaymentMethod JournalEntryItem PaymentMethod Pymt Meth.
TransactionCode JournalEntryItem TransactionCode Transaction Code
LedgerGLLineItem

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view C_MX_JrnlEntrItmPaytDetailsC.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- Parameters: P_AlternativeGLAccount : figlmx_prim, P_Ledger : fins_ledger, P_FiscalYear : fis_gjahr_no_conv, P_FromPostingDate : fis_budat_from, P_ToPostingDate : fis_budat_to

CREATE VIEW C_MX_JrnlEntrItmPaytDetailsC AS
SELECT
  JournalEntryItem.SourceLedger AS SourceLedger,
  JournalEntryItem.Ledger AS Ledger,
  JournalEntryItem.CompanyCode AS CompanyCode,
  JournalEntryItem.AccountingDocument AS AccountingDocument,
  P_MX_JrnlEntryDistinctGLAcct.GLAccount AS GLAccount,
  P_MX_JrnlEntryDistinctGLAcct.DocumentItemText AS DocumentItemText,
  JournalEntryItem.FiscalYear AS FiscalYear,
  StatryRptgEntity,
  StatryRptCategory,
  StatryRptRunID,
  JournalEntryItem.AccountingDocumentItem AS AccountingDocumentItem,
  JournalEntryItem.PostingDate AS PostingDate,
  Check.OutgoingCheque AS OutgoingCheque,
  cast( case when JournalEntryItem.TransactionCode = 'FBCJ' or ( Proposal.ExchangeRate is null and JournalEntryItem.TransactionCurrency <> 'MXN' ) then JournalEntryItem.ExchangeRate when Proposal.PaymentCurrency <> 'MXN' and ( Proposal.PaymentCurrency is not null or Proposal.PaymentCurrency <> '' ) then Proposal.ExchangeRate else 0 end as abap.dec(9,5) ) as ExchangeRate AS dec95asExchangeRate,
  cast( case when JournalEntryItem.FinancialAccountType = 'K' and (Proposal.PayeeBankAccount is not null or Proposal.PayeeBankAccount <> '') and ( JournalEntryItem.Cheque is null or JournalEntryItem.Cheque = '' ) then Proposal.BankAccount when JournalEntryItem.FinancialAccountType = 'D' and (Proposal.PayeeBankAccount is not null or Proposal.PayeeBankAccount <> '') and ( JournalEntryItem.Cheque is null or JournalEntryItem.Cheque = '' ) then Proposal.PayeeBankAccount when JournalEntryItem.FinancialAccountType = 'D' and (Proposal.PayeeBankAccount is null or Proposal.PayeeBankAccount = '') then JournalEntryItem.BankAccount when JournalEntryItem.FinancialAccountType = 'K' and (Proposal.BankAccount is null or Proposal.BankAccount = '') then Payments.BankAccount else '' end as ubknt ) as BankAccount AS BankAccountelseendasubkntasBankAccount,
  cast( case when JournalEntryItem.FinancialAccountType = 'K' and Proposal.BankCountry is not null then case when Proposal.BankCountry = 'MX' then substring(Proposal.Bank, 1, 3) when Proposal.BankCountry <> 'MX' and Proposal.BankCountry <> '' and Proposal.BankCountry is not null then '999' else '' end when JournalEntryItem.FinancialAccountType = 'K' and Proposal.BankCountry is null and Payments.BankCountry is not null then case when Payments.BankCountry = 'MX' then substring(Bank.Bank, 1, 3) when Payments.BankCountry <> 'MX' and Payments.BankCountry <> '' and Payments.BankCountry is not null then '999' else '' end when JournalEntryItem.FinancialAccountType = 'D' and Proposal.PayeeBankCountry is not null then case when Proposal.PayeeBankCountry = 'MX' then substring(Proposal.PayeeBank, 1, 3) when Proposal.PayeeBankCountry <> 'MX' and Proposal.PayeeBankCountry <> '' and Proposal.PayeeBankCountry is not null then '999' else '' end when JournalEntryItem.FinancialAccountType = 'D' and Proposal.PayeeBankCountry is null then JournalEntryItem.Bank else '' end as ubnkl ) as Bank AS BankelseendasubnklasBank,
  cast( case when ExtPaymentMethodMapping.MX_ExternalPaymentMethod = '03' and Proposal.BankCountry <> 'MX' then Proposal._Bank.BankName else '' end as banka ) as BankName AS BankNameelseendasbankaasBankName,
  cast( case when ExtPaymentMethodMapping.MX_ExternalPaymentMethod = '03' and Proposal.PayeeBankCountry <> 'MX' then Proposal._PayeeBank.BankName else '' end as banka ) as PayeeBankName AS BankNameelseendasbankaasPayeeBankName,
  JournalEntryItem.OrganizationBPName1 AS OrganizationBPName1,
  JournalEntryItem.TaxNumber1 AS TaxNumber1,
  Proposal.HouseBankAccount AS HouseBankAccount,
  Proposal.PaymentRecipient AS PaymentRecipient,
  Proposal._PaymentMethod.PaymentMethodIsUsedForCheck AS PaymentMethodIsUsedForCheck,
  Proposal._PaymentMethod.PaytMethIsUsdForBillOfExchange AS PaytMethIsUsdForBillOfExchange,
  Proposal._PaymentMethod.PaytMethIsUsdForChkBillOfExch AS PaytMethIsUsdForChkBillOfExch,
  JournalEntryItem.PaymentMethod AS PaymentMethod,
  JournalEntryItem.TransactionCode AS TransactionCode,
  '' AS LedgerGLLineItem
FROM P_MX_JrnlEntrItmPaytDetailsC
INNER JOIN P_MX_JrnlEntryDistinctGLAcct ON /* join condition not captured in parsed metadata */
INNER JOIN P_MX_JournalEntryPaymentItem AS Payments ON /* join condition not captured in parsed metadata */
;