C_PurchaseOrderHistoryDP

DDL: C_PURCHASEORDERHISTORYDP Type: view_entity CONSUMPTION Package: MM_PUR_OPL_PROC_BDC

Purchase Order History

C_PurchaseOrderHistoryDP is a Consumption CDS View that provides data about "Purchase Order History" in SAP S/4HANA. It reads from 1 data source (I_PurchasingDocumentHistoryBsc) and exposes 78 fields with key fields PurchasingDocument, PurchasingDocumentItem, AccountAssignmentNumber, PurchasingHistoryDocumentType, PurchasingHistoryDocumentYear. It has 21 associations to related views. It is exposed through 1 OData service (DP_PURCHASEORDERHISTORY). Part of development package MM_PUR_OPL_PROC_BDC.

Data Sources (1)

SourceAliasJoin Type
I_PurchasingDocumentHistoryBsc I_PurchasingDocumentHistoryBsc from

Associations (21)

CardinalityTargetAliasCondition
[1..1] C_PurchasingDocumentCategoryDP _PurchasingDocumentCategory $projection.PurchasingDocumentCategory = _PurchasingDocumentCategory.PurchasingDocumentCategory
[1..1] I_PurchaseOrderHistCategory _PurchaseOrderHistCategory $projection.PurchasingHistoryCategory = _PurchaseOrderHistCategory.PurchaseOrderHistCategory
[0..1] I_GoodsMovementType _GoodsMovementType $projection.GoodsMovementType = _GoodsMovementType.GoodsMovementType
[1..1] I_Currency _Currency $projection.Currency = _Currency.Currency
[0..1] I_Product _Product $projection.Material = _Product.Product
[1..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_InventoryValuationType _InventoryValuationType $projection.InventoryValuationType = _InventoryValuationType.InventoryValuationType
[0..1] I_UnitOfMeasure _DeliveryQuantityUnit $projection.DeliveryQuantityUnit = _DeliveryQuantityUnit.UnitOfMeasure
[0..1] I_Product _ManufacturerMaterial $projection.ManufacturerMaterial = _ManufacturerMaterial.Product
[0..1] I_DeliveryDocument _DeliveryDocument $projection.DeliveryDocument = _DeliveryDocument.DeliveryDocument
[0..1] I_UnitOfMeasure _OrderPriceUnit $projection.OrderPriceUnit = _OrderPriceUnit.UnitOfMeasure
[1..1] I_UnitOfMeasure _PurchaseOrderQuantityUnit $projection.PurchaseOrderQuantityUnit = _PurchaseOrderQuantityUnit.UnitOfMeasure
[1..1] I_UnitOfMeasure _BaseUnit $projection.BaseUnit = _BaseUnit.UnitOfMeasure
[1..1] I_Currency _DocumentCurrency $projection.DocumentCurrency = _DocumentCurrency.Currency
[1..1] I_Currency _CompanyCodeCurrency $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
[1..1] C_PurchasingOrganizationDP _PurchasingOrganization $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
[1..1] C_PurchasingGroupDP _PurchasingGroup $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
[1..1] C_PurchaseOrderDP _PurchaseOrder $projection.PurchasingDocument = _PurchaseOrder.PurchaseOrder
[1..1] C_PurchaseOrderItemDP _PurchaseOrderItem $projection.PurchasingDocument = _PurchaseOrderItem.PurchaseOrder and $projection.PurchasingDocumentItem = _PurchaseOrderItem.PurchaseOrderItem
[1..1] C_PurSchedulingAgreementDP _PurSchedulingAgreementDP $projection.PurchasingDocument = _PurSchedulingAgreementDP.SchedulingAgreement
[1..1] C_PurSchedulingAgreementItemDP _PurSchedulingAgreementItemDP $projection.PurchasingDocument = _PurSchedulingAgreementItemDP.SchedulingAgreement and $projection.PurchasingDocumentItem = _PurSchedulingAgreementItemDP.SchedulingAgreementItem

Annotations (13)

NameValueLevelField
Metadata.allowExtensions true view
AccessControl.authorizationCheck #MANDATORY view
DataIntegration.deltaReplication.intended true view
EndUserText.label Purchase Order History view
AccessControl.personalData.blocking #REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #EXTERNAL_DATA_PROVIDER view
ObjectModel.sapObjectNodeType.name PurchaseOrderHistory view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XL view
VDM.viewType #CONSUMPTION view
PersonalData.entitySemantics #OTHER view

OData Services (1)

ServiceBindingVersionContractRelease
DP_PURCHASEORDERHISTORY DP_PURCHASEORDERHISTORY C2 NOT_RELEASED

Fields (78)

KeyFieldSource TableSource FieldDescription
KEY PurchasingDocument PurchasingDocument Purchasing Document
KEY PurchasingDocumentItem PurchasingDocumentItem Purchasing Doc. Item
KEY AccountAssignmentNumber AccountAssignmentNumber Account Assgmt No.
KEY PurchasingHistoryDocumentType PurchasingHistoryDocumentType Transact. Type
KEY PurchasingHistoryDocumentYear PurchasingHistoryDocumentYear Settlement Year
KEY PurchasingHistoryDocument PurchasingHistoryDocument SD Document
KEY PurchasingHistoryDocumentItem PurchasingHistoryDocumentItem Posting View Item
PurchasingDocumentCategory PurchasingDocumentCategory Doc. Category
PurchasingGroup PurchasingGroup Purchasing Group
PurchasingOrganization PurchasingOrganization Purchasing Organization
_PurchasingDocumentCategory _PurchasingDocumentCategory
_PurchaseOrderHistCategory _PurchaseOrderHistCategory
_PurchasingGroup _PurchasingGroup
_PurchasingOrganization _PurchasingOrganization
_CompanyCodeCurrency _CompanyCodeCurrency
_DocumentCurrency _DocumentCurrency
_BaseUnit _BaseUnit
_PurchaseOrderQuantityUnit _PurchaseOrderQuantityUnit
_OrderPriceUnit _OrderPriceUnit
_DeliveryDocument _DeliveryDocument
_ManufacturerMaterial _ManufacturerMaterial
_DeliveryQuantityUnit _DeliveryQuantityUnit
_InventoryValuationType _InventoryValuationType
_Plant _Plant
_Product _Product
_Currency _Currency
_GoodsMovementType _GoodsMovementType
QtyInPurchaseOrderPriceUnit QtyInPurchaseOrderPriceUnit Qty in OPUn
PurchaseOrderAmount PurchaseOrderAmount Gross Amount
PurOrdAmountInCompanyCodeCrcy PurOrdAmountInCompanyCodeCrcy Loc. amount
Quantity Quantity Value
AccountingDocumentCreationDate AccountingDocumentCreationDate Journal Entry Date
ManufacturerMaterial MPN: Material
DeliveryQuantityUnit DeliveryQuantityUnit Unit of measure
DocumentReferenceID DocumentReferenceID Reference
InventoryValuationType InventoryValuationType Valuation Type
DocumentDate DocumentDate Journal Entry Date
TaxCode TaxCode Tax Code
PricingDocument PricingDocument Document Condition
RvslOfGoodsReceiptIsAllowed RvslOfGoodsReceiptIsAllowed RevGR desp. IR
Plant Plant Valuation Area
Material Material Vehicle Model
ReferenceDocument InvtryMgmtReferenceDocument Reference Doc.
ReferenceDocumentFiscalYear ReferenceDocumentFiscalYear Year Cur.Period
IsCompletelyDelivered IsCompletelyDelivered Is completely delivered
Currency Currency Valuation Crcy
PostingDate PostingDate Posting Date for GR
GoodsMovementType GoodsMovementType Movement Type
PurchasingHistoryCategory PurchasingHistoryCategory PO History Cat.
GRIRAcctClrgAmtInCoCodeCrcy Ord.GRIR.Val
CompanyCodeCurrency Local Currency
DocumentCurrency Document Currency
BaseUnit BaseUnit Unit of Measure
PurchaseOrderQuantityUnit OrderQuantityUnit Sales Unit
OrderPriceUnit OrderPriceUnit Order Price Un.
DeliveryDocumentItem Outb. Delivery Item
DeliveryDocument DeliveryDocument Outbound Delivery
ExchangeRate ExchangeRate Exchange rate
ExchangeRateDifferenceAmount ExchangeRateDifferenceAmount Exch.Rate Diff.
IsToBeAcceptedAtOrigin IsToBeAcceptedAtOrigin Origin Accept.
VltdGdsRcptBlkdQtyInOrdPrcUnit VltdGdsRcptBlkdQtyInOrdPrcUnit Val. GR BS OPUn
VltdGdsRcptBlkdStkQtyInOrdUnit VltdGdsRcptBlkdStkQtyInOrdUnit Val. GR BlStock OUn
InvoiceAmtInPurOrdTransacCrcy InvoiceAmtInPurOrdTransacCrcy FC invoice amnt
GRIRAcctClrgAmtInOrdTrnsacCrcy GRIRAcctClrgAmtInOrdTrnsacCrcy Purchase Order Currency
QuantityInBaseUnit QuantityInBaseUnit Quantity in base unit
GRIRAcctClrgAmtInTransacCrcy GR/IR clr.value
QuantityInDeliveryQtyUnit QuantityInDeliveryQtyUnit Del. Note Qty
InvoiceAmountInFrgnCurrency InvoiceAmountInFrgnCurrency Invc. Amt Frgn Crcy
ShipgInstrnSupplierCompliance ShipgInstrnSupplierCompliance Compliance
InvoiceAmtInCoCodeCrcy InvoiceAmtInCoCodeCrcy Ord.Set.Value
GdsRcptBlkdStkQtyInOrdPrcUnit GdsRcptBlkdStkQtyInOrdPrcUnit GR blocked stck
GdsRcptBlkdStkQtyInOrdQtyUnit GdsRcptBlkdStkQtyInOrdQtyUnit GR Bl.St. OUn
PurchaseOrderType PurchasingDocumentType RFQ Type
IsEndOfPurposeBlocked IsEndOfPurposeBlocked Busin. Purp. Cmpltd.
_PurchaseOrder _PurchaseOrder
_PurchaseOrderItem _PurchaseOrderItem
_PurSchedulingAgreementDP _PurSchedulingAgreementDP
_PurSchedulingAgreementItemDP _PurSchedulingAgreementItemDP

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_PurchaseOrderHistoryDP.
-- 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.

CREATE VIEW C_PurchaseOrderHistoryDP AS
SELECT
  PurchasingDocument,
  PurchasingDocumentItem,
  AccountAssignmentNumber,
  PurchasingHistoryDocumentType,
  PurchasingHistoryDocumentYear,
  PurchasingHistoryDocument,
  PurchasingHistoryDocumentItem,
  PurchasingDocumentCategory,
  PurchasingGroup,
  PurchasingOrganization,
  QtyInPurchaseOrderPriceUnit,
  PurchaseOrderAmount,
  PurOrdAmountInCompanyCodeCrcy,
  Quantity,
  AccountingDocumentCreationDate,
  cast ( ManufacturerMaterial as ematn preserving type ) AS ManufacturerMaterial,
  DeliveryQuantityUnit,
  DocumentReferenceID,
  InventoryValuationType,
  DocumentDate,
  TaxCode,
  PricingDocument,
  RvslOfGoodsReceiptIsAllowed,
  Plant,
  Material,
  InvtryMgmtReferenceDocument AS ReferenceDocument,
  ReferenceDocumentFiscalYear,
  IsCompletelyDelivered,
  Currency,
  PostingDate,
  GoodsMovementType,
  PurchasingHistoryCategory,
  cast ( GRIRAcctClrgAmtInCoCodeCrcy as BT_GRIRAcctClrgAmtInCoCodeCrcy preserving type ) AS GRIRAcctClrgAmtInCoCodeCrcy,
  cast ( CompanyCodeCurrency as fis_hwaer preserving type ) AS CompanyCodeCurrency,
  cast ( PurchasingDocumentCurrency as vdm_documentcurrency preserving type ) AS DocumentCurrency,
  BaseUnit,
  OrderQuantityUnit AS PurchaseOrderQuantityUnit,
  OrderPriceUnit,
  cast( DeliveryDocumentItem as vdm_posnr_vl preserving type ) AS DeliveryDocumentItem,
  DeliveryDocument,
  ExchangeRate,
  ExchangeRateDifferenceAmount,
  IsToBeAcceptedAtOrigin,
  VltdGdsRcptBlkdQtyInOrdPrcUnit,
  VltdGdsRcptBlkdStkQtyInOrdUnit,
  InvoiceAmtInPurOrdTransacCrcy,
  GRIRAcctClrgAmtInOrdTrnsacCrcy,
  QuantityInBaseUnit,
  cast ( GRIRAcctClrgAmtInTransacCrcy as BT_GRIRAcctClrgAmtInTransCrcy preserving type ) AS GRIRAcctClrgAmtInTransacCrcy,
  QuantityInDeliveryQtyUnit,
  InvoiceAmountInFrgnCurrency,
  ShipgInstrnSupplierCompliance,
  InvoiceAmtInCoCodeCrcy,
  GdsRcptBlkdStkQtyInOrdPrcUnit,
  GdsRcptBlkdStkQtyInOrdQtyUnit,
  PurchasingDocumentType AS PurchaseOrderType,
  IsEndOfPurposeBlocked
FROM I_PurchasingDocumentHistoryBsc
LEFT OUTER JOIN C_PurchasingDocumentCategoryDP AS _PurchasingDocumentCategory ON PurchasingDocumentCategory = _PurchasingDocumentCategory.PurchasingDocumentCategory  -- association [1..1]
LEFT OUTER JOIN I_PurchaseOrderHistCategory AS _PurchaseOrderHistCategory ON PurchasingHistoryCategory = _PurchaseOrderHistCategory.PurchaseOrderHistCategory  -- association [1..1]
LEFT OUTER JOIN I_GoodsMovementType AS _GoodsMovementType ON GoodsMovementType = _GoodsMovementType.GoodsMovementType  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _Currency ON Currency = _Currency.Currency  -- association [1..1]
LEFT OUTER JOIN I_Product AS _Product ON Material = _Product.Product  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant  -- association [1..1]
LEFT OUTER JOIN I_InventoryValuationType AS _InventoryValuationType ON InventoryValuationType = _InventoryValuationType.InventoryValuationType  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _DeliveryQuantityUnit ON DeliveryQuantityUnit = _DeliveryQuantityUnit.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_Product AS _ManufacturerMaterial ON ManufacturerMaterial = _ManufacturerMaterial.Product  -- association [0..1]
LEFT OUTER JOIN I_DeliveryDocument AS _DeliveryDocument ON DeliveryDocument = _DeliveryDocument.DeliveryDocument  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _OrderPriceUnit ON OrderPriceUnit = _OrderPriceUnit.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _PurchaseOrderQuantityUnit ON PurchaseOrderQuantityUnit = _PurchaseOrderQuantityUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _BaseUnit ON BaseUnit = _BaseUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _DocumentCurrency ON DocumentCurrency = _DocumentCurrency.Currency  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _CompanyCodeCurrency ON CompanyCodeCurrency = _CompanyCodeCurrency.Currency  -- association [1..1]
LEFT OUTER JOIN C_PurchasingOrganizationDP AS _PurchasingOrganization ON PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization  -- association [1..1]
LEFT OUTER JOIN C_PurchasingGroupDP AS _PurchasingGroup ON PurchasingGroup = _PurchasingGroup.PurchasingGroup  -- association [1..1]
LEFT OUTER JOIN C_PurchaseOrderDP AS _PurchaseOrder ON PurchasingDocument = _PurchaseOrder.PurchaseOrder  -- association [1..1]
LEFT OUTER JOIN C_PurchaseOrderItemDP AS _PurchaseOrderItem ON PurchasingDocument = _PurchaseOrderItem.PurchaseOrder AND PurchasingDocumentItem = _PurchaseOrderItem.PurchaseOrderItem  -- association [1..1]
LEFT OUTER JOIN C_PurSchedulingAgreementDP AS _PurSchedulingAgreementDP ON PurchasingDocument = _PurSchedulingAgreementDP.SchedulingAgreement  -- association [1..1]
LEFT OUTER JOIN C_PurSchedulingAgreementItemDP AS _PurSchedulingAgreementItemDP ON PurchasingDocument = _PurSchedulingAgreementItemDP.SchedulingAgreement AND PurchasingDocumentItem = _PurSchedulingAgreementItemDP.SchedulingAgreementItem  -- association [1..1]
;