P_PurchaseContractLeakage

DDL: P_PURCHASECONTRACTLEAKAGE SQL: PMMCONTRLEAKAGE Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

P_PurchaseContractLeakage

P_PurchaseContractLeakage is a Consumption CDS View that provides data about "P_PurchaseContractLeakage" in SAP S/4HANA. It reads from 2 data sources (I_PurchaseOrder, I_PurchaseOrderItem) and exposes 30 fields with key fields PurchaseOrder, PurchaseOrderItem, AccountAssignmentNumber. Part of development package ODATA_MM_ANALYTICS.

Data Sources (2)

SourceAliasJoin Type
I_PurchaseOrder PurchaseOrder inner
I_PurchaseOrderItem PurchaseOrderItem from

Parameters (2)

NameTypeDefault
P_StartDate bedat
P_EndDate bedat

Annotations (8)

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

Fields (30)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder
KEY PurchaseOrderItem I_PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
KEY AccountAssignmentNumber AccountAssignment AccountAssignmentNumber Account Assgmt No.
PurchaseOrderCategory PurchaseOrderCategory Doc. Category
PurchaseOrderType PurchaseOrderType PO Type
PurchaseOrderItemCategory PurchaseOrderItemCategory Item Category
Material I_PurchaseOrderItem Material Vehicle Model
Plant I_PurchaseOrderItem Plant Valuation Area
MaterialGroup I_PurchaseOrderItem MaterialGroup Product Group
Supplier I_PurchaseOrder Supplier Supplier
PurchasingOrganization I_PurchaseOrder PurchasingOrganization Purchasing Organization
PurchasingGroup I_PurchaseOrder PurchasingGroup Purchasing Group
DocumentCurrency I_PurchaseOrder DocumentCurrency Document Currency
MultipleAcctAssgmtDistribution MultipleAcctAssgmtDistribution Distribution
CompanyCode I_PurchaseOrder CompanyCode Receiver Company Code
ReceivingCompanyCode I_PurchaseOrderItem CompanyCode Receiver Company Code
ProfitCenter AccountAssignment ProfitCenter Profit Center
ControllingArea AccountAssignment ControllingArea Controlling Area
CostCenter AccountAssignment CostCenter Cost Center
WBSElementInternalID AccountAssignment WBSElementInternalID WBS Internal ID
GLAccount AccountAssignment GLAccount General Ledger
PurchaseOrderDate I_PurchaseOrder PurchaseOrderDate PO Date
CreatedByUser I_PurchaseOrder CreatedByUser User Name
NetAmount Stated Amount
NetPriceAmount Net Price
PurgDocNetAmount Net Value
MultipleAcctAssgmtDistrPercent AccountAssignment MultipleAcctAssgmtDistrPercent Distribution
IsReturnsItem IsReturnsItem Returns Item
Quantity AccountAssignment Quantity Value
NetPriceQuantity NetPriceQuantity Price Unit

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_PurchaseContractLeakage.
-- 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: PMMCONTRLEAKAGE
-- Parameters: P_StartDate : bedat, P_EndDate : bedat

CREATE VIEW P_PurchaseContractLeakage AS
SELECT
  cast( PurchaseOrderItem.PurchaseOrder as vdm_purchaseorder) AS PurchaseOrder,
  PurchaseOrderItem.PurchaseOrderItem AS PurchaseOrderItem,
  AccountAssignment.AccountAssignmentNumber AS AccountAssignmentNumber,
  PurchaseOrderCategory,
  PurchaseOrderType,
  PurchaseOrderItemCategory,
  PurchaseOrderItem.Material AS Material,
  PurchaseOrderItem.Plant AS Plant,
  PurchaseOrderItem.MaterialGroup AS MaterialGroup,
  PurchaseOrder.Supplier AS Supplier,
  PurchaseOrder.PurchasingOrganization AS PurchasingOrganization,
  PurchaseOrder.PurchasingGroup AS PurchasingGroup,
  PurchaseOrder.DocumentCurrency AS DocumentCurrency,
  MultipleAcctAssgmtDistribution,
  PurchaseOrder.CompanyCode AS CompanyCode,
  PurchaseOrderItem.CompanyCode AS ReceivingCompanyCode,
  AccountAssignment.ProfitCenter AS ProfitCenter,
  AccountAssignment.ControllingArea AS ControllingArea,
  AccountAssignment.CostCenter AS CostCenter,
  AccountAssignment.WBSElementInternalID AS WBSElementInternalID,
  AccountAssignment.GLAccount AS GLAccount,
  PurchaseOrder.PurchaseOrderDate AS PurchaseOrderDate,
  PurchaseOrder.CreatedByUser AS CreatedByUser,
  cast(NetAmount as purchase_order_net_amount) AS NetAmount,
  cast(NetPriceAmount as purchase_order_net_amount) AS NetPriceAmount,
  cast(PurgDocNetAmount as purchase_order_net_amount) AS PurgDocNetAmount,
  AccountAssignment.MultipleAcctAssgmtDistrPercent AS MultipleAcctAssgmtDistrPercent,
  IsReturnsItem,
  AccountAssignment.Quantity AS Quantity,
  NetPriceQuantity
FROM I_PurchaseOrderItem AS PurchaseOrderItem
INNER JOIN I_PurchaseOrder AS PurchaseOrder ON /* join condition not captured in parsed metadata */
;