P_MX_JournalEntryGRHistory

DDL: P_MX_JOURNALENTRYGRHISTORY SQL: PMXJEGRHIST Type: view COMPOSITE

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)

SourceAliasJoin Type
I_PurchaseOrderHistoryBasic GoodsReceiptHistory inner
I_JournalEntryItem JournalEntryDetails from

Annotations (10)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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 */
;