P_MX_JrnlEntrForeignCompDets
P_MX_JrnlEntrForeignCompDets is a Consumption CDS View in SAP S/4HANA. It reads from 4 data sources (I_StRpJournalEntryHeaderLog, P_MX_JrnlEntrItmInvcDetails, P_MX_JrnlEntrItmInvcDetails, P_JrnlEntrAddlClrgInformation) and exposes 36 fields with key fields SourceLedger, Ledger, CompanyCode, AccountingDocument, FiscalYear.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_StRpJournalEntryHeaderLog | I_StRpJournalEntryHeaderLog | inner |
| P_MX_JrnlEntrItmInvcDetails | P_MX_JrnlEntrItmInvcDetails | from |
| P_MX_JrnlEntrItmInvcDetails | P_MX_JrnlEntrItmInvcDetails | inner |
| P_JrnlEntrAddlClrgInformation | PaidInvoices | union_all |
Parameters (4)
| Name | Type | Default |
|---|---|---|
| P_Ledger | fins_ledger | |
| P_FiscalYear | fis_gjahr_no_conv | |
| P_FromPostingDate | fis_budat_from | |
| P_ToPostingDate | fis_budat_to |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMXJEFRGNCOMP | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #P | view |
Fields (36)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SourceLedger | JournalEntryItem | SourceLedger | Source Ledger |
| KEY | Ledger | JournalEntryItem | Ledger | Ledger |
| KEY | CompanyCode | JournalEntryItem | CompanyCode | Company Code |
| KEY | AccountingDocument | JournalEntryItem | AccountingDocument | Clearing Journal Entry |
| KEY | FiscalYear | JournalEntryItem | FiscalYear | Fiscal Year of Clearing Journal Entry |
| KEY | AccountingDocumentItem | JournalEntryItem | AccountingDocumentItem | Posting View Item |
| KEY | StatryRptgEntity | JournalEntryItem | StatryRptgEntity | Reporting Entity |
| KEY | StatryRptCategory | JournalEntryItem | StatryRptCategory | Report ID |
| KEY | StatryRptRunID | JournalEntryItem | StatryRptRunID | Report Run ID |
| TaxNumber1 | JournalEntryItem | TaxNumber1 | VAT Reg. No. | |
| DocumentReferenceID | JournalEntryItem | DocumentReferenceID | Reference | |
| AmountInTransactionCurrency | JournalEntryItem | AmountInTransactionCurrency | Pt Crcy Amt | |
| TransactionCurrency | JournalEntryItem | TransactionCurrency | Transaction Currency | |
| ExchangeRate | JournalEntryItem | ExchangeRate | Exchange rate | |
| PaymentMethod | JournalEntryItem | PaymentMethod | Pymt Meth. | |
| JrnlEntryCntrySpecificRef5 | JournalEntryItem | JrnlEntryCntrySpecificRef5 | Country/Region Specific Reference 5 | |
| P_Ledger | ||||
| P_FiscalYear | ||||
| P_FromPostingDate | ||||
| SourceLedger | Source Ledger | |||
| KEY | Ledger | InvoiceDetails | Ledger | Ledger |
| KEY | CompanyCode | P_JrnlEntrAddlClrgInformation | ClearingCompanyCode | Company Code |
| KEY | AccountingDocument | P_JrnlEntrAddlClrgInformation | ClearingAccountingDocument | Clearing Journal Entry |
| KEY | FiscalYear | P_JrnlEntrAddlClrgInformation | ClearingDocFiscalYear | Fiscal Year of Clearing Journal Entry |
| KEY | AccountingDocumentItem | InvoiceDetails | AccountingDocumentItem | Posting View Item |
| KEY | StatryRptgEntity | InvoiceDetails | StatryRptgEntity | Reporting Entity |
| KEY | StatryRptCategory | InvoiceDetails | StatryRptCategory | Report ID |
| KEY | StatryRptRunID | InvoiceDetails | StatryRptRunID | Report Run ID |
| TaxNumber1 | InvoiceDetails | TaxNumber1 | VAT Reg. No. | |
| DocumentReferenceID | InvoiceDetails | DocumentReferenceID | Reference | |
| AmountInTransactionCurrency | Pt Crcy Amt | |||
| TransactionCurrency | InvoiceDetails | TransactionCurrency | Transaction Currency | |
| ExchangeRate | InvoiceDetails | ExchangeRate | Exchange rate | |
| PaymentMethod | InvoiceDetails | PaymentMethod | Pymt Meth. | |
| JrnlEntryCntrySpecificRef5 | InvoiceDetails | JrnlEntryCntrySpecificRef5 | Country/Region Specific Reference 5 | |
| IsOriginalDocument |
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 P_MX_JrnlEntrForeignCompDets.
-- 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.
-- SQL view name: PMXJEFRGNCOMP
-- Parameters: P_Ledger : fins_ledger, P_FiscalYear : fis_gjahr_no_conv, P_FromPostingDate : fis_budat_from, P_ToPostingDate : fis_budat_to
CREATE VIEW P_MX_JrnlEntrForeignCompDets AS
SELECT
JournalEntryItem.SourceLedger AS SourceLedger,
JournalEntryItem.Ledger AS Ledger,
JournalEntryItem.CompanyCode AS CompanyCode,
JournalEntryItem.AccountingDocument AS AccountingDocument,
JournalEntryItem.FiscalYear AS FiscalYear,
JournalEntryItem.AccountingDocumentItem AS AccountingDocumentItem,
JournalEntryItem.StatryRptgEntity AS StatryRptgEntity,
JournalEntryItem.StatryRptCategory AS StatryRptCategory,
JournalEntryItem.StatryRptRunID AS StatryRptRunID,
JournalEntryItem.TaxNumber1 AS TaxNumber1,
JournalEntryItem.DocumentReferenceID AS DocumentReferenceID,
JournalEntryItem.AmountInTransactionCurrency AS AmountInTransactionCurrency,
JournalEntryItem.TransactionCurrency AS TransactionCurrency,
JournalEntryItem.ExchangeRate AS ExchangeRate,
JournalEntryItem.PaymentMethod AS PaymentMethod,
JournalEntryItem.JrnlEntryCntrySpecificRef5 AS JrnlEntryCntrySpecificRef5,
'X' as IsOriginalDocument AS P_Ledger,
P_FiscalYear : $parameters.P_FiscalYear AS P_FiscalYear,
P_FromPostingDate : $parameters.P_FromPostingDate AS P_FromPostingDate,
'' AS IsOriginalDocument
FROM P_MX_JrnlEntrItmInvcDetails
INNER JOIN P_MX_JrnlEntrItmInvcDetails ON /* join condition not captured in parsed metadata */
INNER JOIN I_StRpJournalEntryHeaderLog ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): P_JrnlEntrAddlClrgInformation
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA