C_PurOrdMaintainRefDocument
PO Maintenance: Reference Document
C_PurOrdMaintainRefDocument is a Consumption CDS View that provides data about "PO Maintenance: Reference Document" in SAP S/4HANA. It reads from 1 data source (P_PurOrdMaintainRefDocumentAll) and exposes 38 fields with key fields PurchaseOrder, PurchaseOrderItem, PurchasingInfoRecord, PurchasingOrganization, PurchasingInfoRecordCategory. It has 10 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_PurOrdMaintainRefDocumentAll | P_PurOrdMaintainRefDocumentAll | from |
Associations (10)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_Purordmaintaincustproj | _CustProject | $projection.WBSElementInternalID = _CustProject.WBSElementInternalID |
| [0..1] | lfa1 | _Supplier | $projection.Supplier = _Supplier.lifnr |
| [0..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [0..1] | I_PurchasingGroup | _PurgGrp | $projection.PurchasingGroup = _PurgGrp.PurchasingGroup |
| [0..*] | I_CostCenterText | _CostCenterText | $projection.ControllingArea = _CostCenterText.ControllingArea and $projection.CostCenter = _CostCenterText.CostCenter |
| [0..*] | I_MaterialText | _MaterialText | $projection.Material = _MaterialText.Material |
| [0..*] | I_MaterialGroupText | _MaterialGroupText | $projection.MaterialGroup = _MaterialGroupText.MaterialGroup |
| [0..*] | I_UnitOfMeasureText | _UnitOfMeasureText | $projection.PurchaseOrderPriceUnit = _UnitOfMeasureText.UnitOfMeasure |
| [0..1] | I_BusinessPartner | _BusinessPartner | $projection.ServicePerformer = _BusinessPartner.BusinessPartner |
| [0..*] | I_GlAccountTextInCompanycode | _GlAccountTextInCompanycode | $projection.GLAccount = _GlAccountTextInCompanycode.GLAccount and $projection.CompanyCode = _GlAccountTextInCompanycode.CompanyCode |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.sqlViewName | CPOMAINTREFDOC | view | |
| EndUserText.label | PO Maintenance: Reference Document | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| VDM.lifecycle.status | #DEPRECATED | view |
Fields (38)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | Purchasing Document | |
| KEY | PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | |
| KEY | PurchasingInfoRecord | PurchasingInfoRecord | Info Record | |
| KEY | PurchasingOrganization | PurchasingOrganization | Purchasing Organization | |
| KEY | PurchasingInfoRecordCategory | PurchasingInfoRecordCategory | Infotype | |
| KEY | Plant | Plant | Valuation Area | |
| PlantName | _Plant | PlantName | Plant Name | |
| PurchasingDocumentCategory | PurchasingDocumentCategory | Doc. Category | ||
| Material | Material | Vehicle Model | ||
| MaterialGroup | MaterialGroup | Product Group | ||
| Supplier | Supplier | Supplier | ||
| SupplierName | _Supplier | name1 | PA text | |
| PurchasingDocumentType | PurchasingDocumentType | RFQ Type | ||
| PurchasingDocumentItemText | PurchasingDocumentItemText | Short Text | ||
| PurchaseOrderQty | PurchaseOrderQty | Purchase Order Quantity | ||
| PurchaseOrderQuantityUnit | PurchaseOrderQuantityUnit | Order Unit | ||
| PurchaseOrderNetPriceAmount | PurchaseOrderNetPriceAmount | Net Price | ||
| Currency | Currency | Valuation Crcy | ||
| PurchaseOrderNetPriceQuantity | PurchaseOrderNetPriceQuantity | Price Unit | ||
| PurchaseOrderPriceUnit | PurchaseOrderPriceUnit | Order Price Un. | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| PurchasingGroupName | _PurgGrp | PurchasingGroupName | Purchasing Grp. Name | |
| CompanyCode | CompanyCode | Receiver Company Code | ||
| IsDeleted | IsDeleted | TRUE | ||
| WBSElementInternalID | WBSElementInternalID | WBS Internal ID | ||
| CustomerProjectName | _CustProject | CustomerProjectName | ||
| SalesOrder | SalesOrder | SD Document | ||
| SalesOrderItem | SalesOrderItem | Sales Order Item | ||
| CostCenter | CostCenter | Cost Center | ||
| GLAccount | GLAccount | General Ledger | ||
| ControllingArea | ControllingArea | Controlling Area | ||
| ServicePerformer | ServicePerformer | Service Performer | ||
| _CostCenterText | _CostCenterText | |||
| _MaterialText | _MaterialText | |||
| _MaterialGroupText | _MaterialGroupText | |||
| _UnitOfMeasureText | _UnitOfMeasureText | |||
| _BusinessPartner | _BusinessPartner | |||
| _GlAccountTextInCompanycode | _GlAccountTextInCompanycode |
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_PurOrdMaintainRefDocument.
-- 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: CPOMAINTREFDOC
CREATE VIEW C_PurOrdMaintainRefDocument AS
SELECT
PurchaseOrder,
PurchaseOrderItem,
PurchasingInfoRecord,
PurchasingOrganization,
PurchasingInfoRecordCategory,
Plant,
_Plant.PlantName AS PlantName,
PurchasingDocumentCategory,
Material,
MaterialGroup,
Supplier,
_Supplier.name1 AS SupplierName,
PurchasingDocumentType,
PurchasingDocumentItemText,
PurchaseOrderQty,
PurchaseOrderQuantityUnit,
PurchaseOrderNetPriceAmount,
Currency,
PurchaseOrderNetPriceQuantity,
PurchaseOrderPriceUnit,
PurchasingGroup,
_PurgGrp.PurchasingGroupName AS PurchasingGroupName,
CompanyCode,
IsDeleted,
WBSElementInternalID,
_CustProject.CustomerProjectName AS CustomerProjectName,
SalesOrder,
SalesOrderItem,
CostCenter,
GLAccount,
ControllingArea,
ServicePerformer
FROM P_PurOrdMaintainRefDocumentAll
LEFT OUTER JOIN P_Purordmaintaincustproj AS _CustProject ON WBSElementInternalID = _CustProject.WBSElementInternalID -- association [0..1]
LEFT OUTER JOIN lfa1 AS _Supplier ON Supplier = _Supplier.lifnr -- 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 -- association [0..*]
LEFT OUTER JOIN I_MaterialText AS _MaterialText ON Material = _MaterialText.Material -- association [0..*]
LEFT OUTER JOIN I_MaterialGroupText AS _MaterialGroupText ON MaterialGroup = _MaterialGroupText.MaterialGroup -- association [0..*]
LEFT OUTER JOIN I_UnitOfMeasureText AS _UnitOfMeasureText ON PurchaseOrderPriceUnit = _UnitOfMeasureText.UnitOfMeasure -- association [0..*]
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 -- association [0..*]
;
Learn More
- S/4HANA CDS View Deprecation: What You Need to Know
- 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
- 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