R_PurgDocHistoryDeliveryCost

DDL: R_PURGDOCHISTORYDELIVERYCOST SQL: RMMPURHISDLVCOST Type: view COMPOSITE

Purchasing History Delivery Cost

R_PurgDocHistoryDeliveryCost is a Composite CDS View that provides data about "Purchasing History Delivery Cost" in SAP S/4HANA. It reads from 2 data sources (R_PurgDocHistDeliveryCostBsc, R_PurgDocHistDelivCostRemoved) and exposes 69 fields with key fields PurchasingDocument, PurchasingDocumentItem, PricingProcedureStep, PricingProcedureCounter, PurchasingHistoryDocumentType. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
R_PurgDocHistDeliveryCostBsc DeliveryCostHistoryBsc from
R_PurgDocHistDelivCostRemoved RemovedDeliveryCostHistory union_all

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_PurchasingDocument _PurchasingDocument $projection.PurchasingDocument = _PurchasingDocument.PurchasingDocument
[1..1] I_PurchasingDocumentItem _PurchasingDocumentItem $projection.PurchasingDocument = _PurchasingDocumentItem.PurchasingDocument and $projection.PurchasingDocumentItem = _PurchasingDocumentItem.PurchasingDocumentItem

Annotations (12)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName RMMPURHISDLVCOST view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
EndUserText.label Purchasing History Delivery Cost view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (69)

KeyFieldSource TableSource FieldDescription
KEY PurchasingDocument R_PurgDocHistDeliveryCostBsc PurchasingDocument Purchasing Document
KEY PurchasingDocumentItem R_PurgDocHistDeliveryCostBsc PurchasingDocumentItem Purchasing Doc. Item
KEY PricingProcedureStep R_PurgDocHistDeliveryCostBsc PricingProcedureStep Step Number
KEY PricingProcedureCounter R_PurgDocHistDeliveryCostBsc PricingProcedureCounter Pricing Procedure Counter
KEY PurchasingHistoryDocumentType R_PurgDocHistDeliveryCostBsc PurchasingHistoryDocumentType Transact. Type
KEY PurchasingHistoryDocumentYear R_PurgDocHistDeliveryCostBsc PurchasingHistoryDocumentYear Settlement Year
KEY PurchasingHistoryDocument R_PurgDocHistDeliveryCostBsc PurchasingHistoryDocument SD Document
KEY PurchasingHistoryDocumentItem R_PurgDocHistDeliveryCostBsc PurchasingHistoryDocumentItem Posting View Item
PurchasingHistoryCategory R_PurgDocHistDeliveryCostBsc PurchasingHistoryCategory PO History Cat.
PostingDate R_PurgDocHistDeliveryCostBsc PostingDate Posting Date for GR
Quantity R_PurgDocHistDeliveryCostBsc Quantity Value
PurOrdAmountInCompanyCodeCrcy R_PurgDocHistDeliveryCostBsc PurOrdAmountInCompanyCodeCrcy Loc. amount
PurchaseOrderAmount R_PurgDocHistDeliveryCostBsc PurchaseOrderAmount Gross Amount
Currency R_PurgDocHistDeliveryCostBsc Currency Valuation Crcy
GRIRAcctClrgAmtInCoCodeCrcy R_PurgDocHistDeliveryCostBsc GRIRAcctClrgAmtInCoCodeCrcy Ord.GRIR.Val
DebitCreditCode R_PurgDocHistDeliveryCostBsc DebitCreditCode Single-Character Flag
DocumentReferenceID R_PurgDocHistDeliveryCostBsc DocumentReferenceID Reference
Supplier R_PurgDocHistDeliveryCostBsc Supplier Supplier
PurgHistDocumentCreationDate R_PurgDocHistDeliveryCostBsc PurgHistDocumentCreationDate Imported On
PurgHistDocumentCreationTime R_PurgDocHistDeliveryCostBsc PurgHistDocumentCreationTime Time
InvoiceAmtInCoCodeCrcy R_PurgDocHistDeliveryCostBsc InvoiceAmtInCoCodeCrcy Ord.Set.Value
InvoiceAmountInFrgnCurrency R_PurgDocHistDeliveryCostBsc InvoiceAmountInFrgnCurrency Invc. Amt Frgn Crcy
InventoryValuationType R_PurgDocHistDeliveryCostBsc InventoryValuationType Valuation Type
ConditionType R_PurgDocHistDeliveryCostBsc ConditionType Condition type
QtyInPurchaseOrderPriceUnit R_PurgDocHistDeliveryCostBsc QtyInPurchaseOrderPriceUnit Qty in OPUn
GRIRAcctClrgAmtInTransacCrcy R_PurgDocHistDeliveryCostBsc GRIRAcctClrgAmtInTransacCrcy GR/IR clr.value
CreatedByUser R_PurgDocHistDeliveryCostBsc CreatedByUser User Name
GRIRAcctClrgAmtInOrdTrnsacCrcy R_PurgDocHistDeliveryCostBsc GRIRAcctClrgAmtInOrdTrnsacCrcy GR/IR clr.value
InvoiceAmtInPurOrdTransacCrcy R_PurgDocHistDeliveryCostBsc InvoiceAmtInPurOrdTransacCrcy FC invoice amnt
ExchangeRateDifferenceAmount R_PurgDocHistDeliveryCostBsc ExchangeRateDifferenceAmount Exch.Rate Diff.
ExchangeRate R_PurgDocHistDeliveryCostBsc ExchangeRate Exchange rate
OrderPriceUnit OrderPriceUnit Order Price Un.
OrderQuantityUnit OrderQuantityUnit Sales Unit
DocumentCurrency PurchasingDocumentCurrency Document Currency
PurchasingDocument Purchasing Document
KEY PurchasingDocumentItem R_PurgDocHistDelivCostRemoved PurchasingDocumentItem Purchasing Doc. Item
KEY PricingProcedureStep R_PurgDocHistDelivCostRemoved PricingProcedureStep Step Number
KEY PricingProcedureCounter R_PurgDocHistDelivCostRemoved PricingProcedureCounter Pricing Procedure Counter
KEY PurchasingHistoryDocumentType R_PurgDocHistDelivCostRemoved PurchasingHistoryDocumentType Transact. Type
KEY PurchasingHistoryDocumentYear R_PurgDocHistDelivCostRemoved PurchasingHistoryDocumentYear Settlement Year
KEY PurchasingHistoryDocument R_PurgDocHistDelivCostRemoved PurchasingHistoryDocument SD Document
KEY PurchasingHistoryDocumentItem R_PurgDocHistDelivCostRemoved PurchasingHistoryDocumentItem Posting View Item
PurchasingHistoryCategory R_PurgDocHistDelivCostRemoved PurchasingHistoryCategory PO History Cat.
PostingDate R_PurgDocHistDelivCostRemoved PostingDate Posting Date for GR
Quantity R_PurgDocHistDelivCostRemoved Quantity Value
PurOrdAmountInCompanyCodeCrcy R_PurgDocHistDelivCostRemoved PurOrdAmountInCompanyCodeCrcy Loc. amount
PurchaseOrderAmount R_PurgDocHistDelivCostRemoved PurchaseOrderAmount Gross Amount
Currency R_PurgDocHistDelivCostRemoved Currency Valuation Crcy
GRIRAcctClrgAmtInCoCodeCrcy R_PurgDocHistDelivCostRemoved GRIRAcctClrgAmtInCoCodeCrcy Ord.GRIR.Val
DebitCreditCode R_PurgDocHistDelivCostRemoved DebitCreditCode Single-Character Flag
DocumentReferenceID R_PurgDocHistDelivCostRemoved DocumentReferenceID Reference
Supplier R_PurgDocHistDelivCostRemoved Supplier Supplier
PurgHistDocumentCreationDate R_PurgDocHistDelivCostRemoved PurgHistDocumentCreationDate Imported On
PurgHistDocumentCreationTime R_PurgDocHistDelivCostRemoved PurgHistDocumentCreationTime Time
InvoiceAmtInCoCodeCrcy R_PurgDocHistDelivCostRemoved InvoiceAmtInCoCodeCrcy Ord.Set.Value
InvoiceAmountInFrgnCurrency R_PurgDocHistDelivCostRemoved InvoiceAmountInFrgnCurrency Invc. Amt Frgn Crcy
InventoryValuationType R_PurgDocHistDelivCostRemoved InventoryValuationType Valuation Type
ConditionType R_PurgDocHistDelivCostRemoved ConditionType Condition type
QtyInPurchaseOrderPriceUnit R_PurgDocHistDelivCostRemoved QtyInPurchaseOrderPriceUnit Qty in OPUn
GRIRAcctClrgAmtInTransacCrcy R_PurgDocHistDelivCostRemoved GRIRAcctClrgAmtInTransacCrcy GR/IR clr.value
CreatedByUser R_PurgDocHistDelivCostRemoved CreatedByUser User Name
GRIRAcctClrgAmtInOrdTrnsacCrcy R_PurgDocHistDelivCostRemoved GRIRAcctClrgAmtInOrdTrnsacCrcy GR/IR clr.value
InvoiceAmtInPurOrdTransacCrcy R_PurgDocHistDelivCostRemoved InvoiceAmtInPurOrdTransacCrcy FC invoice amnt
ExchangeRateDifferenceAmount R_PurgDocHistDelivCostRemoved ExchangeRateDifferenceAmount Exch.Rate Diff.
ExchangeRate R_PurgDocHistDelivCostRemoved ExchangeRate Exchange rate
OrderPriceUnit OrderPriceUnit Order Price Un.
OrderQuantityUnit OrderQuantityUnit Sales Unit
DocumentCurrency PurchasingDocumentCurrency Document Currency
CompanyCodeCurrency CompanyCodeCurrency Local Currency

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 R_PurgDocHistoryDeliveryCost.
-- 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: RMMPURHISDLVCOST

CREATE VIEW R_PurgDocHistoryDeliveryCost AS
SELECT
  DeliveryCostHistoryBsc.PurchasingDocument AS PurchasingDocument,
  DeliveryCostHistoryBsc.PurchasingDocumentItem AS PurchasingDocumentItem,
  DeliveryCostHistoryBsc.PricingProcedureStep AS PricingProcedureStep,
  DeliveryCostHistoryBsc.PricingProcedureCounter AS PricingProcedureCounter,
  DeliveryCostHistoryBsc.PurchasingHistoryDocumentType AS PurchasingHistoryDocumentType,
  DeliveryCostHistoryBsc.PurchasingHistoryDocumentYear AS PurchasingHistoryDocumentYear,
  DeliveryCostHistoryBsc.PurchasingHistoryDocument AS PurchasingHistoryDocument,
  DeliveryCostHistoryBsc.PurchasingHistoryDocumentItem AS PurchasingHistoryDocumentItem,
  DeliveryCostHistoryBsc.PurchasingHistoryCategory AS PurchasingHistoryCategory,
  DeliveryCostHistoryBsc.PostingDate AS PostingDate,
  DeliveryCostHistoryBsc.Quantity AS Quantity,
  DeliveryCostHistoryBsc.PurOrdAmountInCompanyCodeCrcy AS PurOrdAmountInCompanyCodeCrcy,
  DeliveryCostHistoryBsc.PurchaseOrderAmount AS PurchaseOrderAmount,
  DeliveryCostHistoryBsc.Currency AS Currency,
  DeliveryCostHistoryBsc.GRIRAcctClrgAmtInCoCodeCrcy AS GRIRAcctClrgAmtInCoCodeCrcy,
  DeliveryCostHistoryBsc.DebitCreditCode AS DebitCreditCode,
  DeliveryCostHistoryBsc.DocumentReferenceID AS DocumentReferenceID,
  DeliveryCostHistoryBsc.Supplier AS Supplier,
  DeliveryCostHistoryBsc.PurgHistDocumentCreationDate AS PurgHistDocumentCreationDate,
  DeliveryCostHistoryBsc.PurgHistDocumentCreationTime AS PurgHistDocumentCreationTime,
  DeliveryCostHistoryBsc.InvoiceAmtInCoCodeCrcy AS InvoiceAmtInCoCodeCrcy,
  DeliveryCostHistoryBsc.InvoiceAmountInFrgnCurrency AS InvoiceAmountInFrgnCurrency,
  DeliveryCostHistoryBsc.InventoryValuationType AS InventoryValuationType,
  DeliveryCostHistoryBsc.ConditionType AS ConditionType,
  DeliveryCostHistoryBsc.QtyInPurchaseOrderPriceUnit AS QtyInPurchaseOrderPriceUnit,
  DeliveryCostHistoryBsc.GRIRAcctClrgAmtInTransacCrcy AS GRIRAcctClrgAmtInTransacCrcy,
  DeliveryCostHistoryBsc.CreatedByUser AS CreatedByUser,
  DeliveryCostHistoryBsc.GRIRAcctClrgAmtInOrdTrnsacCrcy AS GRIRAcctClrgAmtInOrdTrnsacCrcy,
  DeliveryCostHistoryBsc.InvoiceAmtInPurOrdTransacCrcy AS InvoiceAmtInPurOrdTransacCrcy,
  DeliveryCostHistoryBsc.ExchangeRateDifferenceAmount AS ExchangeRateDifferenceAmount,
  DeliveryCostHistoryBsc.ExchangeRate AS ExchangeRate,
  OrderPriceUnit,
  OrderQuantityUnit,
  PurchasingDocumentCurrency AS DocumentCurrency,
  CompanyCodeCurrency
FROM R_PurgDocHistDeliveryCostBsc AS DeliveryCostHistoryBsc
LEFT OUTER JOIN I_PurchasingDocument AS _PurchasingDocument ON PurchasingDocument = _PurchasingDocument.PurchasingDocument  -- association [1..1]
LEFT OUTER JOIN I_PurchasingDocumentItem AS _PurchasingDocumentItem ON PurchasingDocument = _PurchasingDocumentItem.PurchasingDocument AND PurchasingDocumentItem = _PurchasingDocumentItem.PurchasingDocumentItem  -- association [1..1]
-- UNION ALL with additional select branch(es): R_PurgDocHistDelivCostRemoved
;