C_PurOrdRefDocPC
Reference Documents PO Creation - Purchase Contract Items
C_PurOrdRefDocPC is a Consumption CDS View that provides data about "Reference Documents PO Creation - Purchase Contract Items" in SAP S/4HANA. It reads from 5 data sources (I_PurOrdAcctAssignmentTP, I_PurchaseContractRelevance, I_PurchaseContract, I_PurchaseContractItem, I_SalesOrderItem) and exposes 91 fields with key fields PurchaseOrder, PurchaseOrderItem, AccountAssignmentNumber. It has 20 associations to related views.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_PurOrdAcctAssignmentTP | AccAssLine | left_outer |
| I_PurchaseContractRelevance | ctr_consumption | left_outer |
| I_PurchaseContract | ctr_header | left_outer |
| I_PurchaseContractItem | ctr_item | from |
| I_SalesOrderItem | so_item | left_outer |
Associations (20)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_Purordmaintaincustproj | _Project | $projection.WBSElementInternalID = _Project.WBSElementInternalID |
| [0..1] | I_Supplier | _Supplier | $projection.Supplier = _Supplier.Supplier |
| [0..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [0..1] | I_PurchasingGroup | _PurgGrp | $projection.PurchasingGroup = _PurgGrp.PurchasingGroup |
| [0..1] | I_CostCenterText | _CostCenterText | $projection.ControllingArea = _CostCenterText.ControllingArea and $projection.CostCenter = _CostCenterText.CostCenter and $projection.ValidityEndDate = _CostCenterText.ValidityEndDate and _CostCenterText.Language = $session.system_language |
| [0..1] | I_MaterialText | _MaterialText | $projection.ManufacturerMaterial = _MaterialText.Material and _MaterialText.Language = $session.system_language |
| [0..1] | I_MaterialGroupText | _MaterialGroupText | $projection.MaterialGroup = _MaterialGroupText.MaterialGroup and _MaterialGroupText.Language = $session.system_language |
| [0..1] | I_UnitOfMeasureText | _UnitOfMeasureText | $projection.PurchaseOrderPriceUnit = _UnitOfMeasureText.UnitOfMeasure and _UnitOfMeasureText.Language = $session.system_language |
| [0..1] | I_BusinessPartner | _BusinessPartner | $projection.ServicePerformer = _BusinessPartner.BusinessPartner |
| [0..1] | I_GlAccountTextInCompanycode | _GlAccountTextInCompanycode | $projection.GLAccount = _GlAccountTextInCompanycode.GLAccount and $projection.CompanyCode = _GlAccountTextInCompanycode.CompanyCode and _GlAccountTextInCompanycode.Language = $session.system_language ------------------------------------------------------------------------------------------- -- Value-Help Associations -- ------------------------------------------------------------------------------------------- |
| [0..1] | C_PurchasingGroupValueHelp | _PurchasingGroupVH | _PurchasingGroupVH.PurchasingGroup = $projection.PurchasingGroup |
| [0..*] | C_MM_SupplierValueHelp | _SupplierValueHelp | _SupplierValueHelp.Supplier = $projection.Supplier |
| [0..*] | C_MM_MaterialValueHelp | _MaterialValueHelp | _MaterialValueHelp.Material = $projection.ManufacturerMaterial |
| [0..*] | C_MM_ServicePerformerValueHelp | _ServicePerformerValueHelp | _ServicePerformerValueHelp.ServicePerformer = $projection.ServicePerformer |
| [0..1] | C_MM_MaterialGroupValueHelp | _MaterialGroupVH | _MaterialGroupVH.MaterialGroup = $projection.MaterialGroup |
| [0..*] | C_MM_PlantValueHelp | _PlantValueHelp | _PlantValueHelp.Plant = $projection.Plant |
| [0..1] | I_MM_SalesOrderValueHelp | _SalesOrder | _SalesOrder.SalesOrder = $projection.SalesOrder |
| [0..1] | I_MM_CostCenterValueHelp | _CostCenter | _CostCenter.CostCenter = $projection.CostCenter and _CostCenter.ControllingArea = $projection.ControllingArea and _CostCenter.ValidityEndDate = $projection.ValidityEndDate |
| [0..1] | I_MM_WBSElementValueHelp | _WBSElementVH | _WBSElementVH.WBSElementInternalID = $projection.WBSElementInternalID and _WBSElementVH.WBSElementExternalID = $projection.WBSElement |
| [0..1] | I_MM_ControllingAreaVH | _ControllingAreaValueHelp | $projection.ControllingArea = _ControllingAreaValueHelp.ControllingArea |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.sqlViewName | CPURORDREFDOCPC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Reference Documents PO Creation - Purchase Contract Items | view | |
| Search.searchable | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view |
Fields (91)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | I_PurchaseContractItem | PurchaseContract | Purchasing Doc. |
| KEY | PurchaseOrderItem | I_PurchaseContractItem | PurchaseContractItem | Item |
| KEY | AccountAssignmentNumber | I_PurOrdAcctAssignmentTP | AccountAssignmentNumber | Account Assgmt No. |
| PurchasingInfoRecord | ||||
| PurchasingOrganization | I_PurchaseContract | PurchasingOrganization | Purchasing Organization | |
| PurchasingInfoRecordCategory | Purchasing Info Record Category | |||
| Plant | I_PurchaseContractItem | Plant | Valuation Area | |
| FixedSupplier | Fixed Vendor | |||
| FixedSupplierName | Desired Vendor | |||
| PurchaseRequisition | ||||
| PurchaseRequisitionItem | ||||
| PlantName | _Plant | PlantName | Plant Name | |
| PurchasingDocument | I_PurchaseContractItem | PurchaseContract | Purchasing Doc. | |
| PurchasingDocumentCategory | ||||
| IsAdvancedPurchaseOrder | ||||
| PurchasingDocumentDeletionCode | I_PurchaseContract | PurchasingDocumentDeletionCode | Del. Indicator | |
| StorageLocation | I_PurchaseContractItem | StorageLocation | StorageLocation | |
| ManufacturerMaterial | I_PurchaseContractItem | ManufacturerMaterial | MPN: Material | |
| Material | I_PurchaseContractItem | Material | Vehicle Model | |
| MaterialName | _MaterialText | MaterialName | Material Description | |
| MaterialType | ||||
| MaterialGroup | I_PurchaseContractItem | MaterialGroup | Product Group | |
| MaterialGroupName | _MaterialGroupText | MaterialGroupName | prod Grp Desc. | |
| Supplier | I_PurchaseContract | Supplier | Supplier | |
| SupplierName | _Supplier | SupplierName | Supplier Name | |
| PurchasingDocumentType | I_PurchaseContract | PurchaseContractType | Order Type | |
| PurchasingDocumentSubtype | ||||
| PurchasingDocumentItemText | I_PurchaseContractItem | PurchaseContractItemText | Short Text | |
| PurchaseOrderQty | ||||
| PurchaseOrderQuantityUnit | I_PurchaseContractItem | OrderQuantityUnit | Sales Unit | |
| PurchaseOrderNetPriceAmount | I_PurchaseContractItem | ContractNetPriceAmount | Net Price | |
| Currency | I_PurchaseContract | DocumentCurrency | Document Currency | |
| PurchaseOrderNetPriceQuantity | I_PurchaseContractItem | NetPriceQuantity | Price Unit | |
| PurchaseOrderPriceUnit | I_PurchaseContractItem | OrderPriceUnit | Order Price Un. | |
| PurchaseOrderPriceUnitName | _UnitOfMeasureText | UnitOfMeasureLongName | ||
| PurchasingGroup | I_PurchaseContract | PurchasingGroup | Purchasing Group | |
| PurchasingGroupName | _PurgGrp | PurchasingGroupName | Purchasing Grp. Name | |
| CompanyCode | I_PurchaseContract | CompanyCode | Receiver Company Code | |
| CompanyCodeName | ||||
| PurchaseRequisitionItemText | Purchase Requisition Item Text | |||
| PurchasingDocumentCondition | ||||
| PricingProcedure | ||||
| ValidityStartDate | I_PurchaseContract | ValidityStartDate | Validity Start Date | |
| ValidityEndDate | I_PurchaseContract | ValidityEndDate | ValidTo | |
| ContractConsumptionInPct | I_PurchaseContractRelevance | ContractConsumptionInPct | Consumption Pct | |
| GoodsReceiptIsExpected | ||||
| GoodsReceiptIsNonValuated | ||||
| InvoiceIsExpected | ||||
| InvoiceIsGoodsReceiptBased | ||||
| OverdelivTolrtdLmtRatioInPct | ||||
| UnlimitedOverdeliveryIsAllowed | ||||
| UnderdelivTolrtdLmtRatioInPct | ||||
| OrderItemQtyToBaseQtyNmrtr | ||||
| OrderItemQtyToBaseQtyDnmntr | ||||
| PurchaseOrderItemCategory | ||||
| IsDeleted | ||||
| ServicePerformer | ||||
| ServicePerformerName | ||||
| ProductType | ||||
| RefPurchaseOutlineAgreement | ||||
| RefPurchOutlineAgrmtItem | ||||
| SupplierMaterialNumber | ||||
| DeliveryDate | ||||
| PerformancePeriodStartDate | ||||
| PerformancePeriodEndDate | ||||
| OrderPriceUnitToOrderUnitNmrtr | ||||
| OrdPriceUnitToOrderUnitDnmntr | ||||
| CustomerProjectName | _Project | CustomerProjectName | ||
| ProfitCenter | I_PurOrdAcctAssignmentTP | ProfitCenter | Profit Center | |
| WBSElementInternalID | I_PurOrdAcctAssignmentTP | WBSElementInternalID | WBS Internal ID | |
| WBSElement | _Project | WBSElement | WBS Element | |
| FunctionalArea | I_PurOrdAcctAssignmentTP | FunctionalArea | Sendr Fctl Area | |
| GLAccount | I_PurOrdAcctAssignmentTP | GLAccount | General Ledger | |
| GLAccountName | _GlAccountTextInCompanycode | GLAccountName | Short Text | |
| CostCenter | I_PurOrdAcctAssignmentTP | CostCenter | Cost Center | |
| CostCenterName | _CostCenterText | CostCenterName | Name | |
| ControllingArea | I_PurOrdAcctAssignmentTP | ControllingArea | Controlling Area | |
| SalesOrder | I_PurOrdAcctAssignmentTP | SalesOrder | SD Document | |
| SalesOrderItem | I_PurOrdAcctAssignmentTP | SalesOrderItem | Sales Order Item | |
| PurReqnDescription | Purchase Requisition Description | |||
| _BusinessPartner | _BusinessPartner | |||
| _PurchasingGroupVH | _PurchasingGroupVH | |||
| _SupplierValueHelp | _SupplierValueHelp | |||
| _MaterialValueHelp | _MaterialValueHelp | |||
| _ServicePerformerValueHelp | _ServicePerformerValueHelp | |||
| _MaterialGroupVH | _MaterialGroupVH | |||
| _PlantValueHelp | _PlantValueHelp | |||
| _WBSElementVH | _WBSElementVH | |||
| _CostCenter | _CostCenter | |||
| _SalesOrder | _SalesOrder | |||
| _ControllingAreaValueHelp | _ControllingAreaValueHelp |
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 C_PurOrdRefDocPC.
-- 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: CPURORDREFDOCPC
CREATE VIEW C_PurOrdRefDocPC AS
SELECT
ctr_item.PurchaseContract AS PurchaseOrder,
ctr_item.PurchaseContractItem AS PurchaseOrderItem,
AccAssLine.AccountAssignmentNumber AS AccountAssignmentNumber,
'' AS PurchasingInfoRecord,
ctr_header.PurchasingOrganization AS PurchasingOrganization,
cast('' as esokz) AS PurchasingInfoRecordCategory,
ctr_item.Plant AS Plant,
cast('' as abap.char(10)) AS FixedSupplier,
cast('' as abap.char(10)) AS FixedSupplierName,
cast('' as abap.char(10)) AS PurchaseRequisition,
cast('' as abap.numc(5)) AS PurchaseRequisitionItem,
_Plant.PlantName AS PlantName,
ctr_item.PurchaseContract AS PurchasingDocument,
'K' AS PurchasingDocumentCategory,
'' AS IsAdvancedPurchaseOrder,
ctr_header.PurchasingDocumentDeletionCode AS PurchasingDocumentDeletionCode,
ctr_item.StorageLocation AS StorageLocation,
ctr_item.ManufacturerMaterial AS ManufacturerMaterial,
ctr_item.Material AS Material,
_MaterialText.MaterialName AS MaterialName,
'' AS MaterialType,
ctr_item.MaterialGroup AS MaterialGroup,
_MaterialGroupText.MaterialGroupName AS MaterialGroupName,
ctr_header.Supplier AS Supplier,
_Supplier.SupplierName AS SupplierName,
ctr_header.PurchaseContractType AS PurchasingDocumentType,
'' AS PurchasingDocumentSubtype,
ctr_item.PurchaseContractItemText AS PurchasingDocumentItemText,
cast(0 as abap.dec( 13, 3 )) AS PurchaseOrderQty,
ctr_item.OrderQuantityUnit AS PurchaseOrderQuantityUnit,
ctr_item.ContractNetPriceAmount AS PurchaseOrderNetPriceAmount,
ctr_header.DocumentCurrency AS Currency,
ctr_item.NetPriceQuantity AS PurchaseOrderNetPriceQuantity,
ctr_item.OrderPriceUnit AS PurchaseOrderPriceUnit,
_UnitOfMeasureText.UnitOfMeasureLongName AS PurchaseOrderPriceUnitName,
ctr_header.PurchasingGroup AS PurchasingGroup,
_PurgGrp.PurchasingGroupName AS PurchasingGroupName,
ctr_header.CompanyCode AS CompanyCode,
cast('' as abap.char(25)) AS CompanyCodeName,
cast('' as abap.char(40)) AS PurchaseRequisitionItemText,
'' AS PurchasingDocumentCondition,
'' AS PricingProcedure,
ctr_header.ValidityStartDate AS ValidityStartDate,
ctr_header.ValidityEndDate AS ValidityEndDate,
ctr_consumption.ContractConsumptionInPct AS ContractConsumptionInPct,
'' AS GoodsReceiptIsExpected,
'' AS GoodsReceiptIsNonValuated,
'' AS InvoiceIsExpected,
'' AS InvoiceIsGoodsReceiptBased,
cast(0 as abap.dec( 5, 1 )) AS OverdelivTolrtdLmtRatioInPct,
'' AS UnlimitedOverdeliveryIsAllowed,
cast(0 as abap.dec( 5, 1 )) AS UnderdelivTolrtdLmtRatioInPct,
cast(0 as abap.dec( 5, 0 )) AS OrderItemQtyToBaseQtyNmrtr,
cast(0 as abap.dec( 5, 0 )) AS OrderItemQtyToBaseQtyDnmntr,
'' AS PurchaseOrderItemCategory,
'' AS IsDeleted,
'' AS ServicePerformer,
'' AS ServicePerformerName,
'' AS ProductType,
'' AS RefPurchaseOutlineAgreement,
cast('00000' as abap.numc(5)) AS RefPurchOutlineAgrmtItem,
'' AS SupplierMaterialNumber,
cast('00000000' as abap.dats) AS DeliveryDate,
cast('00000000' as abap.dats) AS PerformancePeriodStartDate,
cast('00000000' as abap.dats) AS PerformancePeriodEndDate,
cast(0 as abap.dec( 5, 0 )) AS OrderPriceUnitToOrderUnitNmrtr,
cast(0 as abap.dec( 5, 0 )) AS OrdPriceUnitToOrderUnitDnmntr,
_Project.CustomerProjectName AS CustomerProjectName,
AccAssLine.ProfitCenter AS ProfitCenter,
AccAssLine.WBSElementInternalID AS WBSElementInternalID,
_Project.WBSElement AS WBSElement,
AccAssLine.FunctionalArea AS FunctionalArea,
AccAssLine.GLAccount AS GLAccount,
_GlAccountTextInCompanycode.GLAccountName AS GLAccountName,
AccAssLine.CostCenter AS CostCenter,
_CostCenterText.CostCenterName AS CostCenterName,
AccAssLine.ControllingArea AS ControllingArea,
AccAssLine.SalesOrder AS SalesOrder,
AccAssLine.SalesOrderItem AS SalesOrderItem,
cast('' as abap.char(4)) AS PurReqnDescription
FROM I_PurchaseContractItem AS ctr_item
LEFT OUTER JOIN I_PurchaseContract AS ctr_header ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PurchaseContractRelevance AS ctr_consumption ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PurOrdAcctAssignmentTP AS AccAssLine ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SalesOrderItem AS so_item ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_Purordmaintaincustproj AS _Project ON WBSElementInternalID = _Project.WBSElementInternalID -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant -- association [0..1]
LEFT OUTER JOIN I_PurchasingGroup AS _PurgGrp ON PurchasingGroup = _PurgGrp.PurchasingGroup -- association [0..1]
LEFT OUTER JOIN I_CostCenterText AS _CostCenterText ON ControllingArea = _CostCenterText.ControllingArea AND CostCenter = _CostCenterText.CostCenter AND ValidityEndDate = _CostCenterText.ValidityEndDate AND _CostCenterText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_MaterialText AS _MaterialText ON ManufacturerMaterial = _MaterialText.Material AND _MaterialText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_MaterialGroupText AS _MaterialGroupText ON MaterialGroup = _MaterialGroupText.MaterialGroup AND _MaterialGroupText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasureText AS _UnitOfMeasureText ON PurchaseOrderPriceUnit = _UnitOfMeasureText.UnitOfMeasure AND _UnitOfMeasureText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_BusinessPartner AS _BusinessPartner ON ServicePerformer = _BusinessPartner.BusinessPartner -- association [0..1]
LEFT OUTER JOIN I_GlAccountTextInCompanycode AS _GlAccountTextInCompanycode ON GLAccount = _GlAccountTextInCompanycode.GLAccount AND CompanyCode = _GlAccountTextInCompanycode.CompanyCode AND _GlAccountTextInCompanycode.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN C_PurchasingGroupValueHelp AS _PurchasingGroupVH ON _PurchasingGroupVH.PurchasingGroup = PurchasingGroup -- association [0..1]
LEFT OUTER JOIN C_MM_SupplierValueHelp AS _SupplierValueHelp ON _SupplierValueHelp.Supplier = Supplier -- association [0..*]
LEFT OUTER JOIN C_MM_MaterialValueHelp AS _MaterialValueHelp ON _MaterialValueHelp.Material = ManufacturerMaterial -- association [0..*]
LEFT OUTER JOIN C_MM_ServicePerformerValueHelp AS _ServicePerformerValueHelp ON _ServicePerformerValueHelp.ServicePerformer = ServicePerformer -- association [0..*]
LEFT OUTER JOIN C_MM_MaterialGroupValueHelp AS _MaterialGroupVH ON _MaterialGroupVH.MaterialGroup = MaterialGroup -- association [0..1]
LEFT OUTER JOIN C_MM_PlantValueHelp AS _PlantValueHelp ON _PlantValueHelp.Plant = Plant -- association [0..*]
LEFT OUTER JOIN I_MM_SalesOrderValueHelp AS _SalesOrder ON _SalesOrder.SalesOrder = SalesOrder -- association [0..1]
LEFT OUTER JOIN I_MM_CostCenterValueHelp AS _CostCenter ON _CostCenter.CostCenter = CostCenter AND _CostCenter.ControllingArea = ControllingArea AND _CostCenter.ValidityEndDate = ValidityEndDate -- association [0..1]
LEFT OUTER JOIN I_MM_WBSElementValueHelp AS _WBSElementVH ON _WBSElementVH.WBSElementInternalID = WBSElementInternalID AND _WBSElementVH.WBSElementExternalID = WBSElement -- association [0..1]
LEFT OUTER JOIN I_MM_ControllingAreaVH AS _ControllingAreaValueHelp ON ControllingArea = _ControllingAreaValueHelp.ControllingArea -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA