P_GetLastPostingDate

DDL: P_GETLASTPOSTINGDATE SQL: PGETLASTPOSTDATE Type: view COMPOSITE

P_GetLastPostingDate is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_MaterialDocumentRecord, I_PurchasingDocumentItem) and exposes 3 fields with key fields PurchaseOrder, PurchaseOrderItem.

Data Sources (2)

SourceAliasJoin Type
I_MaterialDocumentRecord _MaterialDocumentRecord inner
I_PurchasingDocumentItem _PurchasingDocumentItem from

Annotations (9)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.sqlViewName PGETLASTPOSTDATE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder Purchasing Document
KEY PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
LastPostingDateOfMaterialDoc

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_GetLastPostingDate.
-- 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: PGETLASTPOSTDATE

CREATE VIEW P_GetLastPostingDate AS
SELECT
  PurchaseOrder,
  PurchaseOrderItem,
  max(_MaterialDocumentRecord.PostingDate) AS LastPostingDateOfMaterialDoc
FROM I_PurchasingDocumentItem AS _PurchasingDocumentItem
INNER JOIN I_MaterialDocumentRecord AS _MaterialDocumentRecord ON /* join condition not captured in parsed metadata */
;