C_PurOrdRefDocPO

DDL: C_PURORDREFDOCPO SQL: CPURORDREFDOCPO Type: view CONSUMPTION

Reference Documents for PO Creation - Purchase Order Items

C_PurOrdRefDocPO is a Consumption CDS View that provides data about "Reference Documents for PO Creation - Purchase Order Items" in SAP S/4HANA. It reads from 3 data sources (I_PurOrdAcctAssignmentTP, I_PurchaseOrder, I_PurchaseOrderItem) and exposes 70 fields with key fields PurchaseOrder, PurchaseOrderItem, AccountAssignmentNumber. It has 21 associations to related views.

Data Sources (3)

SourceAliasJoin Type
I_PurOrdAcctAssignmentTP AccAssLine left_outer
I_PurchaseOrder po_header left_outer
I_PurchaseOrderItem po_item from

Associations (21)

CardinalityTargetAliasCondition
[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..1] C_MM_SupplierValueHelp _SupplierValueHelp _SupplierValueHelp.Supplier = $projection.Supplier and _SupplierValueHelp.CompanyCode = $projection.CompanyCode
[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
[0..1] R_PurchaseReqnItem _PurchaseReqnItem _PurchaseReqnItem.PurchaseRequisition = $projection.PurchaseRequisition and _PurchaseReqnItem.PurchaseRequisitionItem = $projection.PurchaseRequisitionItem

Annotations (13)

NameValueLevelField
VDM.viewType #CONSUMPTION view
AbapCatalog.sqlViewName CPURORDREFDOCPO view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Reference Documents for PO Creation - Purchase Order 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
UI.headerInfo.typeName Purchasing Document Item view
UI.headerInfo.typeNamePlural Purchasing Document Items view

Fields (70)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder I_PurchaseOrderItem PurchaseOrder Purchasing Document
KEY PurchaseOrderItem I_PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
KEY AccountAssignmentNumber I_PurOrdAcctAssignmentTP AccountAssignmentNumber Account Assignment Number
PurchasingInfoRecord
PurchaseRequisition Purchase Requisition
PurchaseRequisitionItemText Purchase Requisition Item Text
PurchaseRequisitionItem
PurchasingOrganization I_PurchaseOrder PurchasingOrganization Purchasing Organization
PurchasingInfoRecordCategory Purchasing Info Record Category
Plant I_PurchaseOrderItem Plant Valuation Area
PlantName _Plant PlantName Plant Name
PurchasingDocument I_PurchaseOrderItem PurchaseOrder Purchasing Document
PurchasingDocumentCategory
IsAdvancedPurchaseOrder
PurchasingDocumentDeletionCode I_PurchaseOrderItem PurchasingDocumentDeletionCode Del. Indicator
FixedSupplier Fixed Supplier
FixedSupplierName I_PurchaseOrder Supplier Desired Supplier
ManufacturerMaterial I_PurchaseOrderItem ManufacturerMaterial MPN: Material
Material I_PurchaseOrderItem Material Vehicle Model
MaterialName _MaterialText MaterialName Material Description
MaterialType I_PurchaseOrderItem MaterialType Material Type
MaterialGroup I_PurchaseOrderItem MaterialGroup Product Group
MaterialGroupName _MaterialGroupText MaterialGroupName prod Grp Desc.
Supplier I_PurchaseOrder Supplier Supplier
SupplierName _Supplier SupplierName Supplier Name
PurchasingDocumentType I_PurchaseOrder PurchaseOrderType PO Type
PurchasingDocumentSubtype I_PurchaseOrder PurchaseOrderSubtype Control
PurchasingDocumentItemText I_PurchaseOrderItem PurchaseOrderItemText Purchasing Document Item Text
PurchaseOrderQty I_PurchaseOrderItem OrderQuantity Quantity
PurchaseOrderQuantityUnit I_PurchaseOrderItem PurchaseOrderQuantityUnit Order Unit
PurchaseOrderNetPriceAmount I_PurchaseOrderItem NetPriceAmount Net Price
Currency I_PurchaseOrder DocumentCurrency Document Currency
PurchaseOrderNetPriceQuantity I_PurchaseOrderItem NetPriceQuantity Price Unit
PurchaseOrderPriceUnit I_PurchaseOrderItem OrderPriceUnit Order Price Un.
PurchaseOrderPriceUnitName _UnitOfMeasureText UnitOfMeasureLongName
PurchasingGroup I_PurchaseOrder PurchasingGroup Purchasing Group
PurchasingGroupName _PurgGrp PurchasingGroupName Purchasing Grp. Name
CompanyCode I_PurchaseOrder CompanyCode Receiver Company Code
CompanyCodeName
PurchasingDocumentCondition I_PurchaseOrder PurchasingDocumentCondition Doc. Condition
ServicePerformer I_PurchaseOrderItem ServicePerformer Service Performer
ServicePerformerName _BusinessPartner BusinessPartnerName Extracted Customer Name
CustomerProjectName _Project CustomerProjectName Customer Project Name
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
ValidityStartDate I_PurchaseOrder ValidityStartDate Validity Start Date
ValidityEndDate I_PurchaseOrder ValidityEndDate ValidTo
ContractConsumptionInPct 0
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
_GlAccountTextInCompanycode _GlAccountTextInCompanycode
_PurchaseReqnItem _PurchaseReqnItem

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_PurOrdRefDocPO.
-- 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: CPURORDREFDOCPO

CREATE VIEW C_PurOrdRefDocPO AS
SELECT
  po_item.PurchaseOrder AS PurchaseOrder,
  po_item.PurchaseOrderItem AS PurchaseOrderItem,
  AccAssLine.AccountAssignmentNumber AS AccountAssignmentNumber,
  cast('' as abap.char(10)) AS PurchasingInfoRecord,
  cast('' as abap.char(10)) AS PurchaseRequisition,
  cast('' as abap.char(40)) AS PurchaseRequisitionItemText,
  cast('' as abap.numc(5)) AS PurchaseRequisitionItem,
  po_header.PurchasingOrganization AS PurchasingOrganization,
  cast('' as abap.char(1)) AS PurchasingInfoRecordCategory,
  po_item.Plant AS Plant,
  _Plant.PlantName AS PlantName,
  po_item.PurchaseOrder AS PurchasingDocument,
  'F' AS PurchasingDocumentCategory,
  '' AS IsAdvancedPurchaseOrder,
  po_item.PurchasingDocumentDeletionCode AS PurchasingDocumentDeletionCode,
  cast('' as abap.char(10)) AS FixedSupplier,
  po_header.Supplier AS FixedSupplierName,
  po_item.ManufacturerMaterial AS ManufacturerMaterial,
  po_item.Material AS Material,
  _MaterialText.MaterialName AS MaterialName,
  po_item.MaterialType AS MaterialType,
  po_item.MaterialGroup AS MaterialGroup,
  _MaterialGroupText.MaterialGroupName AS MaterialGroupName,
  po_header.Supplier AS Supplier,
  _Supplier.SupplierName AS SupplierName,
  po_header.PurchaseOrderType AS PurchasingDocumentType,
  po_header.PurchaseOrderSubtype AS PurchasingDocumentSubtype,
  po_item.PurchaseOrderItemText AS PurchasingDocumentItemText,
  po_item.OrderQuantity AS PurchaseOrderQty,
  po_item.PurchaseOrderQuantityUnit AS PurchaseOrderQuantityUnit,
  po_item.NetPriceAmount AS PurchaseOrderNetPriceAmount,
  po_header.DocumentCurrency AS Currency,
  po_item.NetPriceQuantity AS PurchaseOrderNetPriceQuantity,
  po_item.OrderPriceUnit AS PurchaseOrderPriceUnit,
  _UnitOfMeasureText.UnitOfMeasureLongName AS PurchaseOrderPriceUnitName,
  po_header.PurchasingGroup AS PurchasingGroup,
  _PurgGrp.PurchasingGroupName AS PurchasingGroupName,
  po_header.CompanyCode AS CompanyCode,
  cast('' as abap.char(25)) AS CompanyCodeName,
  po_header.PurchasingDocumentCondition AS PurchasingDocumentCondition,
  po_item.ServicePerformer AS ServicePerformer,
  _BusinessPartner.BusinessPartnerName AS ServicePerformerName,
  _Project.CustomerProjectName AS CustomerProjectName,
  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,
  po_header.ValidityStartDate AS ValidityStartDate,
  po_header.ValidityEndDate AS ValidityEndDate,
  0 AS ContractConsumptionInPct,
  AccAssLine.ControllingArea AS ControllingArea,
  AccAssLine.SalesOrder AS SalesOrder,
  AccAssLine.SalesOrderItem AS SalesOrderItem,
  cast('' as abap.char(4)) AS PurReqnDescription
FROM I_PurchaseOrderItem AS po_item
LEFT OUTER JOIN I_PurchaseOrder AS po_header 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 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 AND _SupplierValueHelp.CompanyCode = CompanyCode  -- association [0..1]
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]
LEFT OUTER JOIN R_PurchaseReqnItem AS _PurchaseReqnItem ON _PurchaseReqnItem.PurchaseRequisition = PurchaseRequisition AND _PurchaseReqnItem.PurchaseRequisitionItem = PurchaseRequisitionItem  -- association [0..1]
;