P_Purchasecontractleakage3

DDL: P_PURCHASECONTRACTLEAKAGE3 SQL: PMMCONTRLEAKAGE3 Type: view CONSUMPTION

P_Purchasecontractleakage3 is a Consumption CDS View in SAP S/4HANA. It reads from 3 data sources (P_ReleaseDocumentationValues7, I_PurchaseOrder, I_PurchaseOrderItem) and exposes 14 fields with key fields PurchaseOrder, PurchaseOrderItem.

Data Sources (3)

SourceAliasJoin Type
P_ReleaseDocumentationValues7 P_ReleaseDocumentationValues7 inner
I_PurchaseOrder PurchaseOrder inner
I_PurchaseOrderItem PurchaseOrderItem from

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate bedat
P_EndDate bedat

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PMMCONTRLEAKAGE3 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder I_PurchaseOrder PurchaseOrder Purchasing Document
KEY PurchaseOrderItem I_PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
Material I_PurchaseOrderItem Material Vehicle Model
Plant I_PurchaseOrderItem Plant Valuation Area
PurchaseOrderDate I_PurchaseOrder PurchaseOrderDate PO Date
MaterialGroup I_PurchaseOrderItem MaterialGroup Product Group
Supplier I_PurchaseOrder Supplier Supplier
PurchasingOrganization I_PurchaseOrder PurchasingOrganization Purchasing Organization
PurchasingGroup I_PurchaseOrder PurchasingGroup Purchasing Group
CompanyCode I_PurchaseOrderItem CompanyCode Receiver Company Code
DocumentCurrency I_PurchaseOrderItem DocumentCurrency Document Currency
IsReturnsItem I_PurchaseOrderItem IsReturnsItem Returns Item
NetAmount
MaxContractAmount

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_Purchasecontractleakage3.
-- 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: PMMCONTRLEAKAGE3
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : bedat, P_EndDate : bedat

CREATE VIEW P_Purchasecontractleakage3 AS
SELECT
  PurchaseOrder.PurchaseOrder AS PurchaseOrder,
  PurchaseOrderItem.PurchaseOrderItem AS PurchaseOrderItem,
  PurchaseOrderItem.Material AS Material,
  PurchaseOrderItem.Plant AS Plant,
  PurchaseOrder.PurchaseOrderDate AS PurchaseOrderDate,
  PurchaseOrderItem.MaterialGroup AS MaterialGroup,
  PurchaseOrder.Supplier AS Supplier,
  PurchaseOrder.PurchasingOrganization AS PurchasingOrganization,
  PurchaseOrder.PurchasingGroup AS PurchasingGroup,
  PurchaseOrderItem.CompanyCode AS CompanyCode,
  PurchaseOrderItem.DocumentCurrency AS DocumentCurrency,
  PurchaseOrderItem.IsReturnsItem AS IsReturnsItem,
  cast(PurchaseOrderItem.NetAmount as abap.curr(21,2)) AS NetAmount,
  max(ContractItemDetails.UnreleasedAmount) AS MaxContractAmount
FROM I_PurchaseOrderItem AS PurchaseOrderItem
INNER JOIN I_PurchaseOrder AS PurchaseOrder ON /* join condition not captured in parsed metadata */
INNER JOIN P_ReleaseDocumentationValues7 ON /* join condition not captured in parsed metadata */
;