I_PurgDocRemovedHistory

DDL: I_PURGDOCREMOVEDHISTORY SQL: IMMPURDOCRH Type: view BASIC

Removed Purchasing Document Item History

I_PurgDocRemovedHistory is a Basic CDS View that provides data about "Removed Purchasing Document Item History" in SAP S/4HANA. It reads from 1 data source (ekbeh) and exposes 64 fields with key fields PurchasingDocument, PurchasingDocumentItem, AccountAssignmentNumber, PurchasingHistoryDocumentType, PurchasingHistoryDocumentYear. It has 9 associations to related views.

Data Sources (1)

SourceAliasJoin Type
ekbeh ekbeh from

Associations (9)

CardinalityTargetAliasCondition
[1..1] I_PurchasingDocument _PurchasingDocument $projection.PurchasingDocument = _PurchasingDocument.PurchasingDocument
[1..1] I_PurchasingDocumentItem _PurchasingDocumentItem $projection.PurchasingDocument = _PurchasingDocumentItem.PurchasingDocument and $projection.PurchasingDocumentItem = _PurchasingDocumentItem.PurchasingDocumentItem
[1..1] I_UnitOfMeasure _OrderQuantityUnit $projection.orderquantityunit = _OrderQuantityUnit.UnitOfMeasure
[1..1] I_UnitOfMeasure _OrderPriceUnit $projection.orderpriceunit = _OrderPriceUnit.UnitOfMeasure
[1..1] I_UnitOfMeasure _DeliveryQuantityUnit $projection.DeliveryQuantityUnit = _DeliveryQuantityUnit.UnitOfMeasure
[1..1] I_UnitOfMeasure _BaseUnit $projection.baseunit = _BaseUnit.UnitOfMeasure
[1..1] I_Currency _Currency $projection.Currency = _Currency.Currency
[1..1] I_Currency _CompanyCodeCurrency $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
[1..1] I_Currency _PurchasingDocumentCurrency $projection.PurchasingDocumentCurrency = _PurchasingDocumentCurrency.Currency

Annotations (12)

NameValueLevelField
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName IMMPURDOCRH view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Removed Purchasing Document Item History view
VDM.viewType #BASIC view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (64)

KeyFieldSource TableSource FieldDescription
KEY PurchasingDocument ekbeh ebeln Source PurchDoc
KEY PurchasingDocumentItem ekbeh ebelp Item pur. doc.
KEY AccountAssignmentNumber ekbeh zekkn Account Assgmt No.
KEY PurchasingHistoryDocumentType ekbeh vgabe Transact. Type
KEY PurchasingHistoryDocumentYear ekbeh gjahr Settlement Year
KEY PurchasingHistoryDocument ekbeh belnr SD Document
KEY PurchasingHistoryDocumentItem ekbeh buzei Posting View Item
PurchasingHistoryCategory ekbeh bewtp PO History Cat.
GoodsMovementType ekbeh bwart Valuation Type
PostingDate ekbeh budat Posting Date
Currency ekbeh waers Transaction Currency
DebitCreditCode ekbeh shkzg Returns
IsCompletelyDelivered ekbeh elikz Delivery Completion
ReferenceDocumentFiscalYear ekbeh lfgja Year Cur.Period
InvtryMgmtReferenceDocument ekbeh lfbnr Reference Doc.
InvtryMgmtRefDocumentItem ekbeh lfpos Ref. Doc. Item
Material ekbeh matnr Vehicle Model
Plant ekbeh werks Receiving Plant
RvslOfGoodsReceiptIsAllowed ekbeh xwsbr RevGR desp. IR
PricingDocument ekbeh knumv Doc. Condition
TaxCode ekbeh mwskz Tax Code
DocumentDate ekbeh bldat Journal Entry Date
CreatedByUser ekbeh ernam User Name
InventoryValuationType ekbeh bwtar Valuation Type
DocumentReferenceID ekbeh xblnr Reference
DeliveryQuantityUnit ekbeh lsmeh Del. Note Unit
ManufacturerMaterial ekbeh ematn MPN: Material
AccountingDocumentCreationDate ekbeh cpudt Imported On
PurgHistDocumentCreationTime ekbeh cputm Time
Quantity ekbeh menge WarrCountValue
PurOrdAmountInCompanyCodeCrcy ekbeh dmbtr Loc. amount
PurchaseOrderAmount ekbeh wrbtr Gross Amount
QtyInPurchaseOrderPriceUnit ekbeh bpmng Qty. in OPUn
GRIRAcctClrgAmtInCoCodeCrcy ekbeh arewr Ord.GRIR.Val
GdsRcptBlkdStkQtyInOrdQtyUnit ekbeh wesbs GR Bl.St. OUn
GdsRcptBlkdStkQtyInOrdPrcUnit ekbeh bpwes GR blocked stck
InvoiceAmtInCoCodeCrcy ekbeh reewr Ord.Set.Value
ShipgInstrnSupplierCompliance ekbeh evere Compliance
InvoiceAmountInFrgnCurrency ekbeh refwr Inv.Value in FC
QuantityInDeliveryQtyUnit ekbeh lsmng Del. Note Qty
GRIRAcctClrgAmtInTransacCrcy ekbeh areww GR/IR clr.value
QuantityInBaseUnit ekbeh bamng Quantity
Batch ekbeh charg Chargeable Proc.
GRIRAcctClrgAmtInOrdTrnsacCrcy ekbeh arewb GR/IR clr.value
InvoiceAmtInPurOrdTransacCrcy ekbeh rewrb FC invoice amnt
VltdGdsRcptBlkdStkQtyInOrdUnit ekbeh wesbb Val. GR BlStock OUn
VltdGdsRcptBlkdQtyInOrdPrcUnit ekbeh bpweb Val. GR BS OPUn
IsToBeAcceptedAtOrigin ekbeh weora Origin Accept.
ExchangeRateDifferenceAmount ekbeh kudif Exch.Rate Diff.
ExchangeRate
DeliveryDocument ekbeh vbeln_st Delivery
DeliveryDocumentItem ekbeh vbelp_st Item
OrderPriceUnit _PurchasingDocumentItem OrderPriceUnit Order Price Un.
OrderQuantityUnit _PurchasingDocumentItem OrderQuantityUnit Sales Unit
BaseUnit _PurchasingDocumentItem BaseUnit Unit of Measure
PurchasingDocumentCurrency _PurchasingDocument DocumentCurrency Document Currency
CompanyCodeCurrency
_OrderQuantityUnit _OrderQuantityUnit
_OrderPriceUnit _OrderPriceUnit
_DeliveryQuantityUnit _DeliveryQuantityUnit
_BaseUnit _BaseUnit
_Currency _Currency
_CompanyCodeCurrency _CompanyCodeCurrency
_PurchasingDocumentCurrency _PurchasingDocumentCurrency

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 I_PurgDocRemovedHistory.
-- 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: IMMPURDOCRH

CREATE VIEW I_PurgDocRemovedHistory AS
SELECT
  ekbeh.ebeln AS PurchasingDocument,
  ekbeh.ebelp AS PurchasingDocumentItem,
  ekbeh.zekkn AS AccountAssignmentNumber,
  ekbeh.vgabe AS PurchasingHistoryDocumentType,
  ekbeh.gjahr AS PurchasingHistoryDocumentYear,
  ekbeh.belnr AS PurchasingHistoryDocument,
  ekbeh.buzei AS PurchasingHistoryDocumentItem,
  ekbeh.bewtp AS PurchasingHistoryCategory,
  ekbeh.bwart AS GoodsMovementType,
  ekbeh.budat AS PostingDate,
  ekbeh.waers AS Currency,
  ekbeh.shkzg AS DebitCreditCode,
  ekbeh.elikz AS IsCompletelyDelivered,
  ekbeh.lfgja AS ReferenceDocumentFiscalYear,
  ekbeh.lfbnr AS InvtryMgmtReferenceDocument,
  ekbeh.lfpos AS InvtryMgmtRefDocumentItem,
  ekbeh.matnr AS Material,
  ekbeh.werks AS Plant,
  ekbeh.xwsbr AS RvslOfGoodsReceiptIsAllowed,
  ekbeh.knumv AS PricingDocument,
  ekbeh.mwskz AS TaxCode,
  ekbeh.bldat AS DocumentDate,
  ekbeh.ernam AS CreatedByUser,
  ekbeh.bwtar AS InventoryValuationType,
  ekbeh.xblnr AS DocumentReferenceID,
  ekbeh.lsmeh AS DeliveryQuantityUnit,
  ekbeh.ematn AS ManufacturerMaterial,
  ekbeh.cpudt AS AccountingDocumentCreationDate,
  ekbeh.cputm AS PurgHistDocumentCreationTime,
  ekbeh.menge AS Quantity,
  ekbeh.dmbtr AS PurOrdAmountInCompanyCodeCrcy,
  ekbeh.wrbtr AS PurchaseOrderAmount,
  ekbeh.bpmng AS QtyInPurchaseOrderPriceUnit,
  ekbeh.arewr AS GRIRAcctClrgAmtInCoCodeCrcy,
  ekbeh.wesbs AS GdsRcptBlkdStkQtyInOrdQtyUnit,
  ekbeh.bpwes AS GdsRcptBlkdStkQtyInOrdPrcUnit,
  ekbeh.reewr AS InvoiceAmtInCoCodeCrcy,
  ekbeh.evere AS ShipgInstrnSupplierCompliance,
  ekbeh.refwr AS InvoiceAmountInFrgnCurrency,
  ekbeh.lsmng AS QuantityInDeliveryQtyUnit,
  ekbeh.areww AS GRIRAcctClrgAmtInTransacCrcy,
  ekbeh.bamng AS QuantityInBaseUnit,
  ekbeh.charg AS Batch,
  ekbeh.arewb AS GRIRAcctClrgAmtInOrdTrnsacCrcy,
  ekbeh.rewrb AS InvoiceAmtInPurOrdTransacCrcy,
  ekbeh.wesbb AS VltdGdsRcptBlkdStkQtyInOrdUnit,
  ekbeh.bpweb AS VltdGdsRcptBlkdQtyInOrdPrcUnit,
  ekbeh.weora AS IsToBeAcceptedAtOrigin,
  ekbeh.kudif AS ExchangeRateDifferenceAmount,
  cast( ekbeh.wkurs as fis_exchange_rate ) AS ExchangeRate,
  ekbeh.vbeln_st AS DeliveryDocument,
  ekbeh.vbelp_st AS DeliveryDocumentItem,
  _PurchasingDocumentItem.OrderPriceUnit AS OrderPriceUnit,
  _PurchasingDocumentItem.OrderQuantityUnit AS OrderQuantityUnit,
  _PurchasingDocumentItem.BaseUnit AS BaseUnit,
  _PurchasingDocument.DocumentCurrency AS PurchasingDocumentCurrency,
  _PurchasingDocument._CompanyCode.Currency AS CompanyCodeCurrency
FROM ekbeh
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]
LEFT OUTER JOIN I_UnitOfMeasure AS _OrderQuantityUnit ON orderquantityunit = _OrderQuantityUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _OrderPriceUnit ON orderpriceunit = _OrderPriceUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _DeliveryQuantityUnit ON DeliveryQuantityUnit = _DeliveryQuantityUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _BaseUnit ON baseunit = _BaseUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _Currency ON Currency = _Currency.Currency  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _CompanyCodeCurrency ON CompanyCodeCurrency = _CompanyCodeCurrency.Currency  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _PurchasingDocumentCurrency ON PurchasingDocumentCurrency = _PurchasingDocumentCurrency.Currency  -- association [1..1]
;