P_CntrlPurContractItems

DDL: P_CNTRLPURCONTRACTITEMS SQL: PCNTRLCTRITEM Type: view CONSUMPTION

Central Purchase Contract Items

P_CntrlPurContractItems is a Consumption CDS View that provides data about "Central Purchase Contract Items" in SAP S/4HANA. It reads from 3 data sources (R_CentralPurchaseContract, I_CntrlPurchaseContractItem, I_CntrlPurContrDistribution) and exposes 35 fields with key fields CentralPurchaseContract, CentralPurchaseContractItem, DistributionKey. It has 1 association to related views.

Data Sources (3)

SourceAliasJoin Type
R_CentralPurchaseContract CentralContract inner
I_CntrlPurchaseContractItem CentralContractItem from
I_CntrlPurContrDistribution Distribution inner

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate bedat
P_EndDate bedat

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_CntrlPurContrReleaseHistory ReleaseHistory CentralContractItem.CentralPurchaseContract = ReleaseHistory.CentralPurchaseContract and CentralContractItem.CentralPurchaseContractItem = ReleaseHistory.CentralPurchaseContractItem and Distribution.DistributionKey = ReleaseHistory.DistributionKey and ReleaseHistory.ReleaseOrderItemIsDeleted = ''

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PCNTRLCTRITEM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Central Purchase Contract Items view
VDM.private true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (35)

KeyFieldSource TableSource FieldDescription
KEY CentralPurchaseContract I_CntrlPurchaseContractItem CentralPurchaseContract Purchasing Doc.
KEY CentralPurchaseContractItem I_CntrlPurchaseContractItem CentralPurchaseContractItem Item in Central Purchase Contract
KEY DistributionKey I_CntrlPurContrDistribution DistributionKey Distr. Number
PurchaseContractType R_CentralPurchaseContract PurchaseContractType Order Type
PurchasingOrganization R_CentralPurchaseContract PurchasingOrganization Purchasing Organization
PurchasingGroup R_CentralPurchaseContract PurchasingGroup Purchasing Group
Plant I_CntrlPurchaseContractItem Plant Valuation Area
CompanyCode R_CentralPurchaseContract CompanyCode Receiver Company Code
ProcmtHubPurchasingOrg
ProcmtHubPurchasingGroup
Supplier Supplier Supplier
ProcmtHubCompanyCode
ProcmtHubPlant
PurchasingDocumentCategory R_CentralPurchaseContract PurchasingDocumentCategory Doc. Category
ValidityStartDate ValidityStartDate Validity Start Date
ValidityEndDate ValidityEndDate ValidTo
CreatedByUser CreatedByUser User Name
CreationDate CreationDate Time Stamp
Material I_CntrlPurchaseContractItem Material Vehicle Model
MaterialGroup I_CntrlPurchaseContractItem MaterialGroup Product Group
ProductType ProductType Product Type Group
PurchasingDocumentItemCategory PurchasingDocumentItemCategory Item Category
PurchasingCentralMaterial PurchasingCentralMaterial Material
ExtContractForPurg ReleaseHistory ExtContractForPurg Contract
ExtContractItemForPurg ReleaseHistory ExtContractItemForPurg Item
OrderQuantityUnit I_CntrlPurchaseContractItem OrderQuantityUnit Sales Unit
PurchasingProcessingStatus PurchasingProcessingStatus Proc. State
ItemDistributionStatus I_CntrlPurContrDistribution ItemDistributionStatus Distributn Status
ReleaseOrderItemOrderQuantity
TargetQuantity I_CntrlPurContrDistribution TargetQuantity Target Quantity
DisplayCurrency
ContractNetPriceAmount I_CntrlPurchaseContractItem ContractNetPriceAmount Net Price
LogicalSystem
ProcurementHubSourceSystem
PurgDocChangeRequestStatus R_CentralPurchaseContract PurgDocChangeRequestStatus Change Request Stat.

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

CREATE VIEW P_CntrlPurContractItems AS
SELECT
  CentralContractItem.CentralPurchaseContract AS CentralPurchaseContract,
  CentralContractItem.CentralPurchaseContractItem AS CentralPurchaseContractItem,
  Distribution.DistributionKey AS DistributionKey,
  CentralContract.PurchaseContractType AS PurchaseContractType,
  CentralContract.PurchasingOrganization AS PurchasingOrganization,
  CentralContract.PurchasingGroup AS PurchasingGroup,
  CentralContractItem.Plant AS Plant,
  CentralContract.CompanyCode AS CompanyCode,
  cast( Distribution.PurchasingOrganization as mmpur_d_be_purchorg ) AS ProcmtHubPurchasingOrg,
  cast( Distribution.PurchasingGroup as mm_a_be_purch_group ) AS ProcmtHubPurchasingGroup,
  Supplier,
  cast( Distribution.CompanyCode as mmpur_d_be_cocode ) AS ProcmtHubCompanyCode,
  cast( Distribution.Plant as mmpur_d_plant ) AS ProcmtHubPlant,
  CentralContract.PurchasingDocumentCategory AS PurchasingDocumentCategory,
  ValidityStartDate,
  ValidityEndDate,
  CreatedByUser,
  CreationDate,
  CentralContractItem.Material AS Material,
  CentralContractItem.MaterialGroup AS MaterialGroup,
  ProductType,
  PurchasingDocumentItemCategory,
  PurchasingCentralMaterial,
  ReleaseHistory.ExtContractForPurg AS ExtContractForPurg,
  ReleaseHistory.ExtContractItemForPurg AS ExtContractItemForPurg,
  CentralContractItem.OrderQuantityUnit AS OrderQuantityUnit,
  PurchasingProcessingStatus,
  Distribution.ItemDistributionStatus AS ItemDistributionStatus,
  cast(sum( ReleaseHistory.ReleaseOrderItemOrderQuantity ) as mm_a_release_order_quantity) AS ReleaseOrderItemOrderQuantity,
  Distribution.TargetQuantity AS TargetQuantity,
  cast( $parameters.P_DisplayCurrency as displaycurrency) AS DisplayCurrency,
  CentralContractItem.ContractNetPriceAmount AS ContractNetPriceAmount,
  cast( Distribution.LogicalSystem as mmpur_d_source_sys ) AS LogicalSystem,
  cast( Distribution.LogicalSystem as mmpur_d_source_sys ) AS ProcurementHubSourceSystem,
  CentralContract.PurgDocChangeRequestStatus AS PurgDocChangeRequestStatus
FROM I_CntrlPurchaseContractItem AS CentralContractItem
INNER JOIN R_CentralPurchaseContract AS CentralContract ON /* join condition not captured in parsed metadata */
INNER JOIN I_CntrlPurContrDistribution AS Distribution ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CntrlPurContrReleaseHistory AS ReleaseHistory ON CentralContractItem.CentralPurchaseContract = ReleaseHistory.CentralPurchaseContract AND CentralContractItem.CentralPurchaseContractItem = ReleaseHistory.CentralPurchaseContractItem AND Distribution.DistributionKey = ReleaseHistory.DistributionKey AND ReleaseHistory.ReleaseOrderItemIsDeleted = ''  -- association [1..1]
;