P_MX_JournalEntryGRHistory
P_MX_JournalEntryGRHistory is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_PurchaseOrderHistoryBasic, I_JournalEntryItem) and exposes 12 fields with key fields Ledger, CompanyCode, AccountingDocument, FiscalYear.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchaseOrderHistoryBasic | GoodsReceiptHistory | inner |
| I_JournalEntryItem | JournalEntryDetails | from |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMXJEGRHIST | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #P | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (12)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Ledger | I_JournalEntryItem | Ledger | Ledger |
| KEY | CompanyCode | I_JournalEntryItem | CompanyCode | Receiver Company Code |
| KEY | AccountingDocument | I_JournalEntryItem | AccountingDocument | Journal Entry |
| KEY | FiscalYear | |||
| ReferenceDocument | I_PurchaseOrderHistoryBasic | ReferenceDocument | Reference Document | |
| ReferenceDocumentFiscalYear | ||||
| ReferenceDocumentItem | ||||
| PurchasingHistoryDocument | I_PurchaseOrderHistoryBasic | PurchasingHistoryDocument | ||
| PurchasingHistoryDocumentYear | ||||
| PurchasingHistoryDocumentItem | ||||
| PurchasingDocument | I_JournalEntryItem | PurchasingDocument | Purchasing Document | |
| PurchasingDocumentItem | I_JournalEntryItem | PurchasingDocumentItem | Purchasing Doc. Item |
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_JournalEntryGRHistory.
-- 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: PMXJEGRHIST
CREATE VIEW P_MX_JournalEntryGRHistory AS
SELECT
JournalEntryDetails.Ledger AS Ledger,
JournalEntryDetails.CompanyCode AS CompanyCode,
JournalEntryDetails.AccountingDocument AS AccountingDocument,
cast( JournalEntryDetails.FiscalYear as fis_gjahr_no_conv preserving type ) AS FiscalYear,
GoodsReceiptHistory.ReferenceDocument AS ReferenceDocument,
cast( GoodsReceiptHistory.ReferenceDocumentFiscalYear as fis_gjahr_no_conv preserving type ) AS ReferenceDocumentFiscalYear,
concat('00', GoodsReceiptHistory.ReferenceDocumentItem) AS ReferenceDocumentItem,
GoodsReceiptHistory.PurchasingHistoryDocument AS PurchasingHistoryDocument,
cast( GoodsReceiptHistory.PurchasingHistoryDocumentYear as fis_gjahr_no_conv preserving type ) AS PurchasingHistoryDocumentYear,
concat('00', GoodsReceiptHistory.PurchasingHistoryDocumentItem) AS PurchasingHistoryDocumentItem,
JournalEntryDetails.PurchasingDocument AS PurchasingDocument,
JournalEntryDetails.PurchasingDocumentItem AS PurchasingDocumentItem
FROM I_JournalEntryItem AS JournalEntryDetails
INNER JOIN I_PurchaseOrderHistoryBasic AS GoodsReceiptHistory ON /* join condition not captured in parsed metadata */
;
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